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.
|
|
|
---
|
|
|
|
|
|
|
|
- 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 ssh key for root user
|
|
|
|
user:
|
|
|
|
name: root
|
|
|
|
state: present
|
|
|
|
generate_ssh_key: yes
|
|
|
|
ssh_key_type: ed25519
|
|
|
|
ssh_key_comment: "root@{{ ansible_fqdn }}"
|
|
|
|
register: root_user
|
|
|
|
|
|
|
|
- name: Store ssh public key local
|
|
|
|
local_action:
|
|
|
|
module: copy
|
|
|
|
content: "{{ root_user.ssh_public_key }}\n"
|
|
|
|
dest: "public_keys/ssh/root@{{ ansible_fqdn }}"
|
|
|
|
vars:
|
|
|
|
ansible_become: no
|