mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +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"
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags: ['prepare', 'prepare-users']
|
||||
|
||||
- name: "Query groups available on server"
|
||||
ansible.builtin.getent:
|
||||
database: "group"
|
||||
tags: ['configure', 'configure-users']
|
||||
|
||||
- name: "Loop over users and include per-user tasks"
|
||||
include_tasks: "user.yml"
|
||||
loop: "{{ users | dict2items(key_name='name', value_name='attrs') }}"
|
||||
loop_control:
|
||||
loop_var: "user"
|
||||
label: "{{ user.name }}"
|
||||
tags: ['configure', 'configure-users']
|
||||
|
||||
- name: "Template sudoers.d managed file"
|
||||
template:
|
||||
|
@ -26,3 +30,4 @@
|
|||
mode: "0440"
|
||||
validate: "/usr/sbin/visudo -cf %s"
|
||||
become: true
|
||||
tags: ['configure', 'configure-users']
|
||||
|
|
Loading…
Reference in a new issue