Build Windows Templates in RHV
This commit is contained in:
12
roles/ikke_t.podman_container_systemd/.yamllint.yml
Normal file
12
roles/ikke_t.podman_container_systemd/.yamllint.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
# 80 chars should be enough, but don't fail if a line is longer
|
||||
line-length:
|
||||
max: 80
|
||||
level: warning
|
||||
indentation:
|
||||
spaces: 2
|
||||
indent-sequences: whatever
|
||||
@@ -1,2 +1,2 @@
|
||||
install_date: Tue Apr 20 16:13:54 2021
|
||||
install_date: Wed Apr 21 16:48:42 2021
|
||||
version: 2.1.0
|
||||
|
||||
3
roles/ikke_t.podman_container_systemd/requirements.yml
Normal file
3
roles/ikke_t.podman_container_systemd/requirements.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
collections:
|
||||
- containers.podman
|
||||
37
roles/ikke_t.podman_container_systemd/tasks/check_subid.yml
Normal file
37
roles/ikke_t.podman_container_systemd/tasks/check_subid.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
|
||||
- name: check if user is in subuid file
|
||||
find:
|
||||
path: /etc/subuid
|
||||
contains: '^{{ container_run_as_user }}:.*$'
|
||||
register: uid_line_found
|
||||
when: container_run_as_user != 'root'
|
||||
|
||||
- name: check if group is in subgid file
|
||||
find:
|
||||
path: /etc/subgid
|
||||
contains: '^{{ container_run_as_group }}:.*$'
|
||||
register: gid_line_found
|
||||
when: container_run_as_group != 'root'
|
||||
|
||||
- name: ensure user is in subuid file, if it was missing
|
||||
lineinfile:
|
||||
path: /etc/subuid
|
||||
regexp: "^{{ container_run_as_user }}:.*"
|
||||
line: "{{ container_run_as_user }}:165536:65536"
|
||||
create: true
|
||||
mode: '0644'
|
||||
owner: root
|
||||
group: root
|
||||
when: container_run_as_user != 'root' and not uid_line_found.matched
|
||||
|
||||
- name: ensure group is in subgid file, if it was missing
|
||||
lineinfile:
|
||||
path: /etc/subgid
|
||||
regexp: "^{{ container_run_as_group }}:.*"
|
||||
line: "{{ container_run_as_group }}:165536:65536"
|
||||
create: true
|
||||
mode: '0644'
|
||||
owner: root
|
||||
group: root
|
||||
when: container_run_as_group != 'root' and not gid_line_found.matched
|
||||
Reference in New Issue
Block a user