Clean up ansible-lint violations in podman role
This commit is contained in:
@@ -188,7 +188,7 @@
|
|||||||
- podman_project | length > 0
|
- podman_project | length > 0
|
||||||
tags: podman_compose
|
tags: podman_compose
|
||||||
|
|
||||||
- name: Update list of compose projects updated
|
- name: Update list of compose projects updated # noqa: no-handler
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
podman_compose_restart_list:
|
podman_compose_restart_list:
|
||||||
"{{ (podman_compose_restart_list | default([])) +
|
"{{ (podman_compose_restart_list | default([])) +
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
when: podman_project is defined and project.env is defined
|
when: podman_project is defined and project.env is defined
|
||||||
tags: podman_compose
|
tags: podman_compose
|
||||||
|
|
||||||
- name: Update list of compose projects who updated their .env
|
- name: Update list of compose projects who updated their .env # noqa: no-handler
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
# noqa jinja[spacing]
|
# noqa jinja[spacing]
|
||||||
podman_compose_restart_list: "{{
|
podman_compose_restart_list: "{{
|
||||||
|
|||||||
+12
-11
@@ -108,17 +108,18 @@
|
|||||||
database: passwd
|
database: passwd
|
||||||
key: "{{ item }}"
|
key: "{{ item }}"
|
||||||
loop: "{{ podman_compose.keys() | list }}"
|
loop: "{{ podman_compose.keys() | list }}"
|
||||||
register: user_info
|
register: podman_users_info
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}"
|
label: "{{ item }}"
|
||||||
when: podman_compose is defined
|
when: podman_compose is defined
|
||||||
|
|
||||||
- name: Set subuid base facts for podman users
|
- name: Set subuid base facts for podman users
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
podman_subuid_base: "{{ podman_subuid_base | default({}) | combine({
|
podman_subuid_base: "{{ podman_subuid_base | default({}) | combine(sub) }}"
|
||||||
item.item: 100000 + ((item.ansible_facts.getent_passwd[item.item][1]
|
vars:
|
||||||
| int - 1000) * 65536) }) }}"
|
uid: "{{ item.ansible_facts.getent_passwd[item.item][1] }}"
|
||||||
loop: "{{ user_info.results }}"
|
sub: "{{ {item.item: 100000 + ((uid | int - 1000) * 65536)} }}"
|
||||||
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -130,7 +131,7 @@
|
|||||||
create: true
|
create: true
|
||||||
backup: true
|
backup: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -142,7 +143,7 @@
|
|||||||
create: true
|
create: true
|
||||||
backup: true
|
backup: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -163,7 +164,7 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
access_time: preserve
|
access_time: preserve
|
||||||
modification_time: preserve
|
modification_time: preserve
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -171,7 +172,7 @@
|
|||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: "user@{{ item.ansible_facts.getent_passwd[item.item][1] }}.service"
|
name: "user@{{ item.ansible_facts.getent_passwd[item.item][1] }}.service"
|
||||||
state: started
|
state: started
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -179,7 +180,7 @@
|
|||||||
ansible.builtin.wait_for:
|
ansible.builtin.wait_for:
|
||||||
path: "/run/user/{{ item.ansible_facts.getent_passwd[item.item][1] }}/bus"
|
path: "/run/user/{{ item.ansible_facts.getent_passwd[item.item][1] }}/bus"
|
||||||
timeout: 30
|
timeout: 30
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
@@ -196,7 +197,7 @@
|
|||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ uid }}/bus"
|
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ uid }}/bus"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ item.item }}"
|
become_user: "{{ item.item }}"
|
||||||
loop: "{{ user_info.results }}"
|
loop: "{{ podman_users_info.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item }}"
|
label: "{{ item.item }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user