diff --git a/admin-users/README.md b/admin-users/README.md index 8ecad088..68b0044d 100644 --- a/admin-users/README.md +++ b/admin-users/README.md @@ -8,16 +8,18 @@ Everything is in the `tasks/main.yml` file. ## 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: - - name: foo + foo: + name: foo uid: 1001 fullname: 'Mr Foo' password_hash: 'sdfgsdfgsdfgsdfg' ssh_key: 'ssh-rsa AZERTYXYZ' - - name: bar + bar: + name: bar uid: 1002 fullname: 'Mr Bar' password_hash: 'gsdfgsdfgsdfgsdf' diff --git a/admin-users/tasks/main.yml b/admin-users/tasks/main.yml index 98a8d8ab..389fe9d5 100644 --- a/admin-users/tasks/main.yml +++ b/admin-users/tasks/main.yml @@ -1,8 +1,9 @@ --- -- include: adduser_debian.yml user={{ item }} - with_items: "{{ admin_users }}" +- include: adduser_debian.yml user={{ item.value }} + with_dict: "{{ admin_users }}" when: ansible_distribution == "Debian" -# - include: openbsd.yml +# - include: adduser_openbsd.yml user={{ item.value }} +# with_dict: "{{ admin_users }}" # when: ansible_distribution == "OpenBSD"