Completed 'services' role + tested on empty node. I also moved task from the main playbook to the 'common' role to better reflect the actions taken by each role

This commit is contained in:
2022-06-28 22:01:26 +01:00
parent cb9f425c9b
commit b7c93028e3
11 changed files with 276 additions and 55 deletions
+21
View File
@@ -0,0 +1,21 @@
---
- name: Update and upgrade current packages
ansible.builtin.apt:
update_cache: yes
upgrade: yes
- name: Create a user with sudo privileges which will be used for managing the host via SSH
ansible.builtin.user:
name: "{{ local_user }}"
state: present
groups: sudo
append: true
create_home: true
shell: /bin/bash
password: "{{ local_password }}"
- name: Set authorized key for remote SSH access (passwordless login)
ansible.posix.authorized_key:
user: "{{ local_user }}"
state: present
key: "{{ local_key }}"