Update vars names

master
Oleg Vasilev 2022-03-01 00:12:28 +03:00
parent 22d968e1a6
commit 4622aa6b51
2 changed files with 8 additions and 3 deletions

5
defaults/main.yml Normal file
View File

@ -0,0 +1,5 @@
---
managed_users: []
managed_groups: []

View File

@ -17,7 +17,7 @@
group: group:
name: "{{ item.name }}" name: "{{ item.name }}"
state: present state: present
with_items: "{{ os_groups | default([]) }}" with_items: "{{ managed_groups }}"
- name: Users | Create users - name: Users | Create users
user: user:
@ -30,14 +30,14 @@
groups: "{{ item.groups | default(omit) }}" groups: "{{ item.groups | default(omit) }}"
append: no append: no
system: "{{ item.system | default(omit) }}" system: "{{ item.system | default(omit) }}"
with_items: "{{ os_users }}" with_items: "{{ managed_users }}"
- name: Users | Deploy ssh public keys - name: Users | Deploy ssh public keys
authorized_key: authorized_key:
exclusive: yes exclusive: yes
user: "{{ item.name }}" user: "{{ item.name }}"
key: "{{ lookup(item.lookup, item.keys_source) }}" key: "{{ lookup(item.lookup, item.keys_source) }}"
with_items: "{{ os_users }}" with_items: "{{ managed_users }}"
when: when:
- item.lookup is defined - item.lookup is defined
- item.keys_source is defined - item.keys_source is defined