feat(user): support partial execution with prepare and configure tags

This commit is contained in:
transcaffeine 2021-05-26 14:32:41 +02:00 committed by Jan Christian Grünhage
parent f84376026b
commit 7bbae943d2
No known key found for this signature in database
GPG key ID: EEC1170CE56FA2ED

View file

@ -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']