diff options
| author | alex <alex@pdp7.net> | 2025-10-11 19:37:27 +0200 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2025-10-11 19:37:27 +0200 |
| commit | 0fe18fea1ddfb6ca4bd555af02625fde39bc7a78 (patch) | |
| tree | e0eb48a19aeee0cffbc713c7901479fbaee9396c /infrastructure/roles | |
| parent | 7dd4a64f2f7612efb581c881ca9d59fc8b949663 (diff) | |
Make iteration less verbose
Diffstat (limited to 'infrastructure/roles')
| -rw-r--r-- | infrastructure/roles/users/tasks/main.yaml | 8 |
1 files changed, 8 insertions, 0 deletions
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 }}" |
