fix: don't nest vars to improve UX

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-08-31 11:52:00 +02:00
parent eb6d77de65
commit 0d359aa19f
Signed by: mfocko
GPG key ID: 7C47D46246790496
7 changed files with 26 additions and 45 deletions

View file

@ -7,24 +7,17 @@ desktops:
ohm:
vars:
sshd:
port: 22
sshd_port: 22
sshd_sign_host_keys: false
sshd_auth_password_authentication: "yes"
auth:
permit_root_login: "no"
password_authentication: "yes"
trusted_ca: true
sign_host_keys: false
flatpak:
apps:
- com.chatterino.chatterino
- com.discordapp.Discord
- com.spotify.Client
# - net.ankiweb.Anki
- org.gnome.DejaDup
- org.mozilla.Thunderbird
# - org.raspberrypi.rpi-imager
- org.telegram.desktop
# - org.x.Warpinator
flatpak_apps:
- com.chatterino.chatterino
- com.discordapp.Discord
- com.spotify.Client
# - net.ankiweb.Anki
- org.gnome.DejaDup
- org.mozilla.Thunderbird
# - org.raspberrypi.rpi-imager
- org.telegram.desktop
# - org.x.Warpinator

View file

@ -3,12 +3,4 @@ servers:
hosts:
poincare:
maxwell:
sshd:
port: 6969
auth:
permit_root_login: "no"
password_authentication: "no"
trusted_ca: true
sign_host_keys: true
sshd_port: 6969

View file

@ -1,3 +1,2 @@
---
flatpak:
apps: []
flatpak_apps: []

View file

@ -11,5 +11,5 @@
community.general.packaging.os.flatpak:
name: "{{ item }}"
state: present
loop: "{{ flatpak.apps }}"
when: flatpak.apps
loop: "{{ flatpak_apps }}"
when: flatpak_apps

View file

@ -1,10 +1,7 @@
---
sshd:
port: 10022
sshd_port: 10022
sshd_sign_host_keys: true
auth:
permit_root_login: "no"
password_authentication: "no"
trusted_ca: true
sign_host_keys: true
sshd_auth_permit_root_login: "no"
sshd_auth_password_authentication: "no"
sshd_auth_trusted_ca: true

View file

@ -29,4 +29,4 @@
- name: Set trusted CA
ansible.builtin.include_tasks: trusted_ca.yml
when: sshd.auth.trusted_ca
when: sshd_auth_trusted_ca

View file

@ -1,6 +1,6 @@
# Port
Port {{ sshd.port }}
Port {{ sshd_port }}
# Auth
PermitRootLogin {{ sshd.auth.permit_root_login }}
PasswordAuthentication {{ sshd.auth.password_authentication }}
PermitRootLogin {{ sshd_auth_permit_root_login }}
PasswordAuthentication {{ sshd_auth_password_authentication }}