Patrick Marchand
3feb0cc3b4
Move two template creation tasks out of the loop. This means that the task runs only once instead of one time per user in the loop.
28 lines
629 B
YAML
28 lines
629 B
YAML
---
|
|
|
|
- name: "System compatibility checks"
|
|
assert:
|
|
that:
|
|
- ansible_distribution == "Debian"
|
|
- ansible_distribution_major_version | version_compare('8', '>=')
|
|
msg: only compatible with Debian >= 8
|
|
|
|
- debug:
|
|
msg: "Warning: empty 'evolinux_users' variable, tasks will be skipped!"
|
|
when: evolinux_users == {}
|
|
|
|
- name: Create user accounts
|
|
include: user.yml
|
|
vars:
|
|
user: "{{ item.value }}"
|
|
with_dict: "{{ evolinux_users }}"
|
|
when: evolinux_users != {}
|
|
|
|
- name: Configure sudo
|
|
include: sudo.yml
|
|
when: evolinux_users != {}
|
|
|
|
- name: Configure SSH
|
|
include: ssh.yml
|
|
when: evolinux_users != {}
|