You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.3 KiB
YAML

---
- name: Configure apt packages
include_tasks: packages.yml
- name: Configure sshd
include_tasks: sshd.yml
- name: Configure ufw
include_tasks: ufw.yml
- name: Configure locales
include_tasks: locales.yml
- name: Configure custom facts
include_tasks: custom_facts.yml
- name: Configure helpers
include_tasks: helpers.yml
- name: Configure ssh key for root user
user:
name: root
state: present
generate_ssh_key: yes
ssh_key_type: ed25519
ssh_key_comment: "root@{{ inventory_hostname }}"
register: root_user
- name: Store ssh public key local
copy:
content: "{{ root_user.ssh_public_key }}\n"
dest: "public_keys/ssh/root@{{ inventory_hostname }}"
delegate_to: localhost
vars:
ansible_become: no
- name: Create scripts directories
file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "u=rwx,g=rx,o="
loop:
- "{{ update_scripts_directory }}"
- name: Create backups directories
file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
loop:
- "{{ backups_directory }}"
- "{{ backups_files_directory }}"
- "{{ backups_mysql_database_directory }}"
- name: Flush handlers for role
meta: flush_handlers