call user specific config from all users task
This commit is contained in:
@@ -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
|
||||
@@ -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 }}'
|
||||
|
||||
Reference in New Issue
Block a user