Infrastructure/ansible/roles/common/tasks/main.yml

24 lines
528 B
YAML

---
- name: Add ssh keys for root
ansible.builtin.include_tasks: root_sshkeys.yml
- name: Install sudo as it's needed for 'become'
ansible.builtin.package:
name: sudo
state: present
- name: Setup firewall
ansible.builtin.include_tasks: firewall.yml
when: firewall is defined
- name: Provision users
ansible.builtin.include_role:
name: user
vars:
user: "{{ user_item.key }}" # noqa:var-naming[no-role-prefix]
loop_control:
loop_var: user_item
with_items:
- "{{ users | dict2items }}"