call user specific config from all users task

This commit is contained in:
rene
2022-03-18 15:51:38 +01:00
parent 423e0d0810
commit 4b2108b95f
2 changed files with 8 additions and 4 deletions

View File

@@ -1,12 +1,13 @@
# Make sure users exist on the system
- import_tasks: users/root.yml
- import_tasks: users/rene.yml
- import_tasks: users/ansible.yml
# - import_tasks: users/root.yml
# - import_tasks: users/rene.yml
# - import_tasks: users/ansible.yml
- name: users | all | repeating tasks for all users
include_tasks: users/all.yml
loop:
- rene
- root
- rene
- ansible
loop_control:
loop_var: user

View File

@@ -5,6 +5,9 @@
split: ":"
fail_key: no # not required. If a supplied key is missing this will make the task fail if C(yes).
- name: users | {{ user }} | include user specific parts
include_tasks: "{{ user }}.yml"
- name: users | {{ user }} | install public ssh keys
authorized_key:
user: '{{ user }}'