ansible-roles/evolinux-users/tasks/main.yml
Patrick Marchand 3feb0cc3b4
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build is failing
Simplify sudo tasks for evolinux-users
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.
2019-08-06 17:57:35 -04:00

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 != {}