forked from evolix/ansible-roles
admin-user: switch to a Dict for admin_users
This commit is contained in:
parent
0ff5467bce
commit
b49cd060eb
|
@ -8,16 +8,18 @@ Everything is in the `tasks/main.yml` file.
|
||||||
|
|
||||||
## Available variables
|
## Available variables
|
||||||
|
|
||||||
The variable `admin_users` must be a "hash" of one or more users :
|
The variable `admin_users` must be a "dict" of one or more users :
|
||||||
|
|
||||||
```
|
```
|
||||||
admin_users:
|
admin_users:
|
||||||
- name: foo
|
foo:
|
||||||
|
name: foo
|
||||||
uid: 1001
|
uid: 1001
|
||||||
fullname: 'Mr Foo'
|
fullname: 'Mr Foo'
|
||||||
password_hash: 'sdfgsdfgsdfgsdfg'
|
password_hash: 'sdfgsdfgsdfgsdfg'
|
||||||
ssh_key: 'ssh-rsa AZERTYXYZ'
|
ssh_key: 'ssh-rsa AZERTYXYZ'
|
||||||
- name: bar
|
bar:
|
||||||
|
name: bar
|
||||||
uid: 1002
|
uid: 1002
|
||||||
fullname: 'Mr Bar'
|
fullname: 'Mr Bar'
|
||||||
password_hash: 'gsdfgsdfgsdfgsdf'
|
password_hash: 'gsdfgsdfgsdfgsdf'
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- include: adduser_debian.yml user={{ item }}
|
- include: adduser_debian.yml user={{ item.value }}
|
||||||
with_items: "{{ admin_users }}"
|
with_dict: "{{ admin_users }}"
|
||||||
when: ansible_distribution == "Debian"
|
when: ansible_distribution == "Debian"
|
||||||
|
|
||||||
# - include: openbsd.yml
|
# - include: adduser_openbsd.yml user={{ item.value }}
|
||||||
|
# with_dict: "{{ admin_users }}"
|
||||||
# when: ansible_distribution == "OpenBSD"
|
# when: ansible_distribution == "OpenBSD"
|
||||||
|
|
Loading…
Reference in a new issue