summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <casper@casperlefantom.net>2019-09-01 11:04:02 +0200
committerMatthieu Saulnier <casper@casperlefantom.net>2019-09-01 11:04:02 +0200
commit049bf1143edb067d2d02905f1797fcb022e1d899 (patch)
tree6ef5566ce38d14a6ab411a4dd9bfb5fb84ff2ece
parente2ea8b0441a6d8578e5d0875ccd8aae90b8a884e (diff)
downloadplaybooks-ansible-049bf1143edb067d2d02905f1797fcb022e1d899.tar.gz
playbooks-ansible-049bf1143edb067d2d02905f1797fcb022e1d899.tar.xz
playbooks-ansible-049bf1143edb067d2d02905f1797fcb022e1d899.zip
Add task to create user account for client hosts
-rw-r--r--.gitignore1
-rw-r--r--roles/clients/tasks/main.yml6
-rw-r--r--roles/clients/tasks/users.yml8
3 files changed, 15 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 008e334..00e614c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ roles/mtaserver/files/credentials
roles/mtaserver/files/keys
roles/reverseproxy/vars/email.yml
roles/reverseproxy/files/images-docker
+roles/clients/vars/users.yml
roles/clients/files/credentials
roles/proxy/vars/email.yml
roles/proxy/files/certs
diff --git a/roles/clients/tasks/main.yml b/roles/clients/tasks/main.yml
index c793400..22f0029 100644
--- a/roles/clients/tasks/main.yml
+++ b/roles/clients/tasks/main.yml
@@ -1,3 +1,6 @@
+- name: Loading hidden variables
+ include_vars: users.yml
+
- name: Ajout des dépôts de base
import_tasks: repos.yml
@@ -46,3 +49,6 @@
# Disabled since we only use nouveau driver
#- name: Installation du pilote NVidia
# import_tasks: nvidia.yml
+
+- name: Création des utilisateurs
+ import_tasks: users.yml
diff --git a/roles/clients/tasks/users.yml b/roles/clients/tasks/users.yml
new file mode 100644
index 0000000..4eb7773
--- /dev/null
+++ b/roles/clients/tasks/users.yml
@@ -0,0 +1,8 @@
+- name: Création des utilisateurs système
+ user:
+ name: "{{ item }}"
+ shell: /usr/bin/zsh
+ group: mock
+ state: present
+ with_items:
+ - "{{ userlist }}"