diff --git a/inventory/desktops.yml b/inventory/desktops.yml index 7abb083..7735433 100644 --- a/inventory/desktops.yml +++ b/inventory/desktops.yml @@ -7,11 +7,11 @@ desktops: ohm: vars: - sshd_port: 22 - sshd_sign_host_keys: false - sshd_auth_password_authentication: "yes" + system_sshd_port: 22 + system_sshd_sign_host_keys: false + system_sshd_auth_password_authentication: "yes" - flatpak_apps: + system_flatpak_apps: - "com.chatterino.chatterino/{{ ansible_architecture }}/stable" - com.discordapp.Discord - com.spotify.Client diff --git a/inventory/servers.yml b/inventory/servers.yml index 90c51e9..985cd6f 100644 --- a/inventory/servers.yml +++ b/inventory/servers.yml @@ -3,4 +3,4 @@ servers: hosts: poincare: maxwell: - sshd_port: 6969 + system_sshd_port: 6969 diff --git a/roles/system/flatpak/defaults/main.yml b/roles/system/flatpak/defaults/main.yml index 0489ac3..04a98e2 100644 --- a/roles/system/flatpak/defaults/main.yml +++ b/roles/system/flatpak/defaults/main.yml @@ -1,2 +1,2 @@ --- -flatpak_apps: [] +system_flatpak_apps: [] diff --git a/roles/system/flatpak/tasks/main.yml b/roles/system/flatpak/tasks/main.yml index f0f8d5a..e48b3db 100644 --- a/roles/system/flatpak/tasks/main.yml +++ b/roles/system/flatpak/tasks/main.yml @@ -11,6 +11,6 @@ community.general.flatpak: name: "{{ item }}" state: present - loop: "{{ flatpak_apps }}" + loop: "{{ system_flatpak_apps }}" become: true - when: flatpak_apps + when: system_flatpak_apps diff --git a/roles/system/sshd/defaults/main.yml b/roles/system/sshd/defaults/main.yml index 42abf2e..9661a86 100644 --- a/roles/system/sshd/defaults/main.yml +++ b/roles/system/sshd/defaults/main.yml @@ -1,7 +1,7 @@ --- -sshd_port: 10022 -sshd_sign_host_keys: true +system_sshd_port: 10022 +system_sshd_sign_host_keys: true -sshd_auth_permit_root_login: "no" -sshd_auth_password_authentication: "no" -sshd_auth_trusted_ca: true +system_sshd_auth_permit_root_login: "no" +system_sshd_auth_password_authentication: "no" +system_sshd_auth_trusted_ca: true diff --git a/roles/system/sshd/handlers/main.yml b/roles/system/sshd/handlers/main.yml index 8737df8..8498daa 100644 --- a/roles/system/sshd/handlers/main.yml +++ b/roles/system/sshd/handlers/main.yml @@ -1,5 +1,5 @@ --- - name: Restart SSH server ansible.builtin.service: - name: "{{ sshd_unit }}" + name: "{{ system_sshd_unit }}" state: restarted diff --git a/roles/system/sshd/tasks/main.yml b/roles/system/sshd/tasks/main.yml index b9144d1..5664f76 100644 --- a/roles/system/sshd/tasks/main.yml +++ b/roles/system/sshd/tasks/main.yml @@ -5,17 +5,17 @@ - name: Set sshd systemd unit for Ubuntu ansible.builtin.set_fact: - sshd_unit: ssh + system_sshd_unit: ssh when: ansible_distribution == "Ubuntu" - name: Set sshd systemd unit for co-Ubuntu ansible.builtin.set_fact: - sshd_unit: sshd + system_sshd_unit: sshd when: ansible_distribution != "Ubuntu" - name: Enable SSH server ansible.builtin.service: - name: "{{ sshd_unit }}" + name: "{{ system_sshd_unit }}" enabled: true - name: Harden the SSH config @@ -29,4 +29,4 @@ - name: Set trusted CA ansible.builtin.include_tasks: trusted_ca.yml - when: sshd_auth_trusted_ca + when: system_sshd_auth_trusted_ca diff --git a/roles/system/sshd/templates/10-harden.conf b/roles/system/sshd/templates/10-harden.conf index 1b24217..12e9911 100644 --- a/roles/system/sshd/templates/10-harden.conf +++ b/roles/system/sshd/templates/10-harden.conf @@ -1,6 +1,6 @@ # Port -Port {{ sshd_port }} +Port {{ system_sshd_port }} # Auth -PermitRootLogin {{ sshd_auth_permit_root_login }} -PasswordAuthentication {{ sshd_auth_password_authentication }} +PermitRootLogin {{ system_sshd_auth_permit_root_login }} +PasswordAuthentication {{ system_sshd_auth_password_authentication }}