mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-12 23:37:12 +00:00
feat(user): support partial execution with prepare
and configure
tags
This commit is contained in:
parent
f84376026b
commit
7bbae943d2
1 changed files with 5 additions and 0 deletions
|
@ -7,16 +7,20 @@
|
||||||
until: "task_result is success"
|
until: "task_result is success"
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 2
|
delay: 2
|
||||||
|
tags: ['prepare', 'prepare-users']
|
||||||
|
|
||||||
- name: "Query groups available on server"
|
- name: "Query groups available on server"
|
||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: "group"
|
database: "group"
|
||||||
|
tags: ['configure', 'configure-users']
|
||||||
|
|
||||||
- name: "Loop over users and include per-user tasks"
|
- name: "Loop over users and include per-user tasks"
|
||||||
include_tasks: "user.yml"
|
include_tasks: "user.yml"
|
||||||
loop: "{{ users | dict2items(key_name='name', value_name='attrs') }}"
|
loop: "{{ users | dict2items(key_name='name', value_name='attrs') }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: "user"
|
loop_var: "user"
|
||||||
|
label: "{{ user.name }}"
|
||||||
|
tags: ['configure', 'configure-users']
|
||||||
|
|
||||||
- name: "Template sudoers.d managed file"
|
- name: "Template sudoers.d managed file"
|
||||||
template:
|
template:
|
||||||
|
@ -26,3 +30,4 @@
|
||||||
mode: "0440"
|
mode: "0440"
|
||||||
validate: "/usr/sbin/visudo -cf %s"
|
validate: "/usr/sbin/visudo -cf %s"
|
||||||
become: true
|
become: true
|
||||||
|
tags: ['configure', 'configure-users']
|
||||||
|
|
Loading…
Reference in a new issue