cleanuo
This commit is contained in:
parent
0dc7c83d8e
commit
cb1a17de44
2 changed files with 23 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
galaxy_info:
|
||||
author: "maintainer"
|
||||
author: invalidplayername
|
||||
description: "Create groups and users based on `accounts_groups` and `accounts_users` variables"
|
||||
license: MIT
|
||||
min_ansible_version: 2.9
|
||||
|
|
|
|||
|
|
@ -25,26 +25,26 @@
|
|||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Create missing users declared as group members (optional)
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.1 }}"
|
||||
state: present
|
||||
when: create_missing_users | default(false) and item.0.state | default('present') == 'present'
|
||||
with_subelements:
|
||||
- "{{ accounts_groups | default([]) }}"
|
||||
- members
|
||||
loop_control:
|
||||
label: "{{ item.0.name }}:{{ item.1 }}"
|
||||
# - name: Create missing users declared as group members (optional)
|
||||
# ansible.builtin.user:
|
||||
# name: "{{ item.1 }}"
|
||||
# state: present
|
||||
# when: create_missing_users | default(false) and item.0.state | default('present') == 'present'
|
||||
# with_subelements:
|
||||
# - "{{ accounts_groups | default([]) }}"
|
||||
# - members
|
||||
# loop_control:
|
||||
# label: "{{ item.0.name }}:{{ item.1 }}"
|
||||
|
||||
- name: Ensure declared group members exist in their groups (only for present groups)
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.1 }}"
|
||||
groups: "{{ item.0.name }}"
|
||||
append: yes
|
||||
state: present
|
||||
when: item.0.state | default('present') == 'present'
|
||||
with_subelements:
|
||||
- "{{ accounts_groups | default([]) }}"
|
||||
- members
|
||||
loop_control:
|
||||
label: "{{ item.0.name }}:{{ item.1 }}"
|
||||
# - name: Ensure declared group members exist in their groups (only for present groups)
|
||||
# ansible.builtin.user:
|
||||
# name: "{{ item.1 }}"
|
||||
# groups: "{{ item.0.name }}"
|
||||
# append: yes
|
||||
# state: present
|
||||
# when: item.0.state | default('present') == 'present'
|
||||
# with_subelements:
|
||||
# - "{{ accounts_groups | default([]) }}"
|
||||
# - members
|
||||
# loop_control:
|
||||
# label: "{{ item.0.name }}:{{ item.1 }}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue