Refactor default ssh keys

This commit is contained in:
Tobias Reisinger 2026-11-08 19:12:01 +01:00
commit acbc38aa8a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 40 additions and 34 deletions

View file

@ -0,0 +1,6 @@
- name: Set authorized keys for ansible
ansible.posix.authorized_key:
user: ansible
exclusive: true
key: "{{ opentofu.ssh_keys.values() | join('\n') }}"
become: true

View file

@ -22,19 +22,16 @@
ansible.builtin.import_tasks: tasks/load-secrets.yml
tags: always
- name: Install software
- name: Run built-in roles
ansible.builtin.include_role:
name: software
name: "{{ item }}"
apply:
tags: software
tags: software
- name: Run always role
ansible.builtin.include_role:
name: always
apply:
tags: always
tags: "{{ item }}"
tags: always
loop:
- software
- always
- users
- name: Include service roles
ansible.builtin.include_role: