Clean up ansible-lint violations in podman role

This commit is contained in:
2026-09-07 09:48:34 -04:00
parent 91a5307c1a
commit 86f84d3b70
2 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -188,7 +188,7 @@
- podman_project | length > 0
tags: podman_compose
- name: Update list of compose projects updated
- name: Update list of compose projects updated # noqa: no-handler
ansible.builtin.set_fact:
podman_compose_restart_list:
"{{ (podman_compose_restart_list | default([])) +
@@ -231,7 +231,7 @@
when: podman_project is defined and project.env is defined
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:
# noqa jinja[spacing]
podman_compose_restart_list: "{{
+12 -11
View File
@@ -108,17 +108,18 @@
database: passwd
key: "{{ item }}"
loop: "{{ podman_compose.keys() | list }}"
register: user_info
register: podman_users_info
loop_control:
label: "{{ item }}"
when: podman_compose is defined
- name: Set subuid base facts for podman users
ansible.builtin.set_fact:
podman_subuid_base: "{{ podman_subuid_base | default({}) | combine({
item.item: 100000 + ((item.ansible_facts.getent_passwd[item.item][1]
| int - 1000) * 65536) }) }}"
loop: "{{ user_info.results }}"
podman_subuid_base: "{{ podman_subuid_base | default({}) | combine(sub) }}"
vars:
uid: "{{ item.ansible_facts.getent_passwd[item.item][1] }}"
sub: "{{ {item.item: 100000 + ((uid | int - 1000) * 65536)} }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -130,7 +131,7 @@
create: true
backup: true
mode: "0644"
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -142,7 +143,7 @@
create: true
backup: true
mode: "0644"
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -163,7 +164,7 @@
mode: "0644"
access_time: preserve
modification_time: preserve
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -171,7 +172,7 @@
ansible.builtin.systemd_service:
name: "user@{{ item.ansible_facts.getent_passwd[item.item][1] }}.service"
state: started
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -179,7 +180,7 @@
ansible.builtin.wait_for:
path: "/run/user/{{ item.ansible_facts.getent_passwd[item.item][1] }}/bus"
timeout: 30
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"
@@ -196,7 +197,7 @@
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ uid }}/bus"
become: true
become_user: "{{ item.item }}"
loop: "{{ user_info.results }}"
loop: "{{ podman_users_info.results }}"
loop_control:
label: "{{ item.item }}"