mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 19:03:47 +00:00
Add Atlas media and storage services [Phase 1] (#9)
* Add Atlas media and storage services * Document Atlas backend phase one and WireGuard deployment * Enable Atlas NAS management and document bootstrap workflow * Harden Atlas network, SSH, firewall, and sharing * Rotate Ansible Vault secrets * Allow configurable Aegis SSH users and authorized keys * Manage Aegis SSH authorized key fragments * Manage SSH authorized key fragments for infrastructure hosts * Harden Rocky storage and sharing configuration * Verify WireGuard handshakes and restore Podman networking
This commit is contained in:
committed by
GitHub
parent
73bf2cd62a
commit
160d63c02d
@@ -165,6 +165,29 @@
|
||||
path: "{{ aegis_ssh_user_home }}/.ssh/authorized_keys"
|
||||
register: aegis_authorized_keys
|
||||
|
||||
- name: Ensure Aegis SSH authorized key fragments directory exists
|
||||
tags: [aegis, ssh, services]
|
||||
ansible.builtin.file:
|
||||
path: "{{ aegis_ssh_user_home }}/.ssh/authorized_keys.d"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0700"
|
||||
when: aegis_ssh_authorized_keys | length > 0
|
||||
|
||||
- name: Manage Aegis SSH authorized key fragments
|
||||
tags: [aegis, ssh, services]
|
||||
ansible.builtin.copy:
|
||||
content: "{{ item.key }}\n"
|
||||
dest: "{{ aegis_ssh_user_home }}/.ssh/authorized_keys.d/{{ item.name }}"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0600"
|
||||
loop: "{{ aegis_ssh_authorized_keys }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
when: aegis_ssh_authorized_keys | length > 0
|
||||
|
||||
- name: Find Aegis SSH authorized key fragments
|
||||
tags: [aegis, ssh, services]
|
||||
ansible.builtin.find:
|
||||
@@ -178,7 +201,8 @@
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- >-
|
||||
(aegis_authorized_keys.stat.exists and aegis_authorized_keys.stat.size | int > 0)
|
||||
(aegis_ssh_authorized_keys | length > 0)
|
||||
or (aegis_authorized_keys.stat.exists and aegis_authorized_keys.stat.size | int > 0)
|
||||
or aegis_authorized_key_fragments.matched | int > 0
|
||||
fail_msg: Add a public key for the Ansible SSH user before disabling password authentication.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user