fix(idiom): prefix variables with rule path

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-05-06 23:47:25 +02:00
parent c83836b900
commit dcc13e1558
Signed by: mfocko
GPG key ID: 7C47D46246790496
8 changed files with 21 additions and 21 deletions

View file

@ -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

View file

@ -3,4 +3,4 @@ servers:
hosts:
poincare:
maxwell:
sshd_port: 6969
system_sshd_port: 6969

View file

@ -1,2 +1,2 @@
---
flatpak_apps: []
system_flatpak_apps: []

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,5 @@
---
- name: Restart SSH server
ansible.builtin.service:
name: "{{ sshd_unit }}"
name: "{{ system_sshd_unit }}"
state: restarted

View file

@ -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

View file

@ -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 }}