feat: adds opnix, mennos-laptop-w as host and cleans up secrets

Signed-off-by: Menno van Leeuwen <menno@vleeuwen.me>
This commit is contained in:
2025-07-15 23:50:26 +02:00
parent 1867846c0d
commit 94998bec48
24 changed files with 185 additions and 152 deletions

View File

@@ -1,11 +1,9 @@
[workstations]
mennos-laptop ansible_connection=local
mennos-cosmic-laptop ansible_connection=local
mennos-laptop-w ansible_connection=local
mennos-desktop ansible_connection=local
[servers]
mennos-server ansible_connection=local
mennos-cloud-server ansible_connection=local
mennos-hobbypc ansible_connection=local
mennos-vm ansible_connection=local
dotfiles-test ansible_connection=local

View File

@@ -12,7 +12,7 @@
- name: Include workstation tasks
ansible.builtin.import_tasks: tasks/workstations/workstation.yml
when: inventory_hostname in ['mennos-laptop', 'mennos-cosmic-laptop', 'mennos-desktop']
when: inventory_hostname in ['mennos-laptop-w', 'mennos-desktop']
- name: Include server tasks
ansible.builtin.import_tasks: tasks/servers/server.yml

View File

@@ -10,6 +10,7 @@
- name: Include Tailscale tasks
ansible.builtin.import_tasks: tasks/global/tailscale.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include Rust tasks
ansible.builtin.import_tasks: tasks/global/rust.yml
@@ -18,14 +19,17 @@
- name: Include Docker tasks
ansible.builtin.import_tasks: tasks/global/docker.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include Ollama tasks
ansible.builtin.import_tasks: tasks/global/ollama.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include OpenSSH Server tasks
ansible.builtin.import_tasks: tasks/global/openssh-server.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Ensure common packages are installed
ansible.builtin.package:

View File

@@ -27,28 +27,8 @@
vars:
gitconfig_mapping:
mennos-desktop: "$DOTFILES_PATH/config/git/gitconfig.linux"
mennos-laptop: "$DOTFILES_PATH/config/git/gitconfig.linux"
mennos-cosmic-laptop: "$DOTFILES_PATH/config/git/gitconfig.linux"
mennos-laptop-w: "$DOTFILES_PATH/config/git/gitconfig.wsl"
mennos-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
mennos-cloud-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
mennos-vm: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
mennos-hobbypc: "$DOTFILES_PATH/config/git/gitconfig.linux"
dotfiles-test: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
- name: Create SSH authorized_keys symlink
ansible.builtin.file:
src: "{{ authorized_keys_mapping[inventory_hostname] | replace('~', user_home) | replace('$DOTFILES_PATH', lookup('env', 'DOTFILES_PATH')) }}"
dest: "{{ user_home }}/.ssh/authorized_keys"
state: link
force: true
follow: false
vars:
authorized_keys_mapping:
mennos-desktop: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-desktop"
mennos-laptop: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-laptop"
mennos-cosmic-laptop: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-laptop"
mennos-server: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-server"
mennos-cloud-server: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-server"
mennos-vm: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-server"
mennos-hobbypc: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-hobbypc"
dotfiles-test: "$DOTFILES_PATH/config/ssh/authorized_keys/mennos-server"

View File

@@ -6,39 +6,45 @@
- name: Include workstation cliphist tasks
ansible.builtin.import_tasks: tasks/workstations/cliphist.yml
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include GNOME Extensions tasks
ansible.builtin.import_tasks: tasks/workstations/gnome-extensions.yml
when: ansible_facts.env.XDG_CURRENT_DESKTOP is defined and 'GNOME' in ansible_facts.env.XDG_CURRENT_DESKTOP
when: ansible_facts.env.XDG_CURRENT_DESKTOP is defined and 'GNOME' in ansible_facts.env.XDG_CURRENT_DESKTOP and 'microsoft-standard-WSL2' not in ansible_kernel
- name: Include Firefox APT installation tasks
ansible.builtin.import_tasks: tasks/workstations/firefox-apt.yml
when: ansible_pkg_mgr == 'apt' and ansible_facts.packages.snapd is defined
when: ansible_pkg_mgr == 'apt' and ansible_facts.packages.snapd is defined and 'microsoft-standard-WSL2' not in ansible_kernel
- name: Include flatpaks tasks
ansible.builtin.import_tasks: tasks/workstations/flatpaks.yml
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include snaps tasks
ansible.builtin.import_tasks: tasks/workstations/snaps.yml
when: ansible_facts.packages.snapd is defined
when: ansible_facts.packages.snapd is defined and 'microsoft-standard-WSL2' not in ansible_kernel
- name: Include Zen browser tasks
ansible.builtin.import_tasks: tasks/workstations/zen-browser.yml
vars:
browser_name: "zen"
browser_executable: "zen"
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include 1Password Browsers tasks
ansible.builtin.import_tasks: tasks/workstations/1password-browsers.yml
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include Firefox PWA tasks
ansible.builtin.import_tasks: tasks/workstations/firefoxpwa.yml
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include purge LibreOffice tasks
ansible.builtin.import_tasks: tasks/workstations/purge-libreoffice.yml
- name: Include autostart tasks
ansible.builtin.import_tasks: tasks/workstations/autostart.yml
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Ensure workstation common packages are installed
ansible.builtin.package: