Adding group management to users
This commit is contained in:
parent
c83cad2e88
commit
5a88ccb426
3 changed files with 10 additions and 1 deletions
|
@ -42,4 +42,4 @@ Available tags for the role:
|
||||||
|
|
||||||
| Role | Tags |
|
| Role | Tags |
|
||||||
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Base | all, authorized_key, automatic_updates, cert, firewall, hostname, kernel, motd, password_auth, root_ca, root_login, ssh, time_sync, web_management |
|
| Base | all, authorized_key, automatic_updates, cert, firewall, hostname, kernel, motd, password_auth, root_ca, root_login, ssh, time_sync, users, web_management |
|
||||||
|
|
|
@ -15,6 +15,8 @@ base_users: []
|
||||||
# disable_password: false
|
# disable_password: false
|
||||||
# ssh_keys: []
|
# ssh_keys: []
|
||||||
# ssh_keys_force: false # setting ssh_keys_force to true will overwrite the authorized_keys file to only be the ssh keys provided
|
# ssh_keys_force: false # setting ssh_keys_force to true will overwrite the authorized_keys file to only be the ssh keys provided
|
||||||
|
# groups: []
|
||||||
|
# groups_append: true
|
||||||
|
|
||||||
# Install all available updates at runtime
|
# Install all available updates at runtime
|
||||||
base_core_install_updates: true
|
base_core_install_updates: true
|
||||||
|
|
|
@ -6,6 +6,13 @@
|
||||||
name: "{{ user.username }}"
|
name: "{{ user.username }}"
|
||||||
password_lock: "{{ user.disable_password | default(false) }}"
|
password_lock: "{{ user.disable_password | default(false) }}"
|
||||||
|
|
||||||
|
- name: "{{ user.username }} group setup"
|
||||||
|
user:
|
||||||
|
name: "{{ user.username }}"
|
||||||
|
groups: "{{ user.groups | join(',') }}"
|
||||||
|
append: "{{ user.groups_append | default('true') }}"
|
||||||
|
when: user.groups is defined
|
||||||
|
|
||||||
- name: "Configure {{ user.username }} password"
|
- name: "Configure {{ user.username }} password"
|
||||||
user:
|
user:
|
||||||
name: "{{ user.username }}"
|
name: "{{ user.username }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue