From: alex Date: Sat, 11 Oct 2025 17:37:27 +0000 (+0200) Subject: Make iteration less verbose X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=0fe18fea1ddfb6ca4bd555af02625fde39bc7a78;p=infrastructure.git Make iteration less verbose --- diff --git a/infrastructure/roles/users/tasks/main.yaml b/infrastructure/roles/users/tasks/main.yaml index 43ecc25..b4e3448 100644 --- a/infrastructure/roles/users/tasks/main.yaml +++ b/infrastructure/roles/users/tasks/main.yaml @@ -5,12 +5,16 @@ groups: - sudo loop: "{{ users }}" + loop_control: + label: "{{ item.name }}" - name: accesible home directory (for web serving, for example) ansible.builtin.file: path: "/home/{{ item.name }}" state: directory mode: '0701' loop: "{{ users }}" + loop_control: + label: "{{ item.name }}" - name: create .ssh directory ansible.builtin.file: path: "/home/{{ item.name }}/.ssh" @@ -18,6 +22,8 @@ owner: "{{ item.name }}" group: "{{ item.name }}" loop: "{{ users }}" + loop_control: + label: "{{ item.name }}" - name: set authorized keys ansible.builtin.copy: dest: "/home/{{ item.name }}/.ssh/authorized_keys" @@ -26,3 +32,5 @@ mode: '0400' content: "{{ item.authorized_keys }}" loop: "{{ users }}" + loop_control: + label: "{{ item.name }}"