call user specific config from all users task
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
# Make sure users exist on the system
|
# Make sure users exist on the system
|
||||||
- import_tasks: users/root.yml
|
# - import_tasks: users/root.yml
|
||||||
- import_tasks: users/rene.yml
|
# - import_tasks: users/rene.yml
|
||||||
- import_tasks: users/ansible.yml
|
# - import_tasks: users/ansible.yml
|
||||||
|
|
||||||
- name: users | all | repeating tasks for all users
|
- name: users | all | repeating tasks for all users
|
||||||
include_tasks: users/all.yml
|
include_tasks: users/all.yml
|
||||||
loop:
|
loop:
|
||||||
- rene
|
|
||||||
- root
|
- root
|
||||||
|
- rene
|
||||||
|
- ansible
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: user
|
loop_var: user
|
||||||
@@ -5,6 +5,9 @@
|
|||||||
split: ":"
|
split: ":"
|
||||||
fail_key: no # not required. If a supplied key is missing this will make the task fail if C(yes).
|
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
|
- name: users | {{ user }} | install public ssh keys
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: '{{ user }}'
|
user: '{{ user }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user