From 08d228bc839a6c59e4fc0c4bebc3b8b7babd2af0 Mon Sep 17 00:00:00 2001 From: trucktrav Date: Sun, 3 May 2026 15:50:24 -0400 Subject: [PATCH] tweaks to the cli install --- inventory/host_vars/herbydev/vars.yml | 4 ++-- inventory/host_vars/herbydev/vault.yml | 22 +++++++++---------- inventory/host_vars/herbylab-nas/vars.yml | 4 ++-- inventory/host_vars/pbs-site/vars.yml | 4 ++-- inventory/host_vars/pbs-staging-site/vars.yml | 4 ++-- playbooks/playbook.yml | 2 +- roles/cli_modern/tasks/main.yml | 4 ++-- roles/cli_modern/tasks/packages-debian.yml | 14 +++++++++--- 8 files changed, 33 insertions(+), 25 deletions(-) diff --git a/inventory/host_vars/herbydev/vars.yml b/inventory/host_vars/herbydev/vars.yml index 6cf9e47..779efc6 100644 --- a/inventory/host_vars/herbydev/vars.yml +++ b/inventory/host_vars/herbydev/vars.yml @@ -1,2 +1,2 @@ -ansible_connection: vault_ansible_connection -ansible_user: vault_ansible_user \ No newline at end of file +ansible_ssh_private_key_file: "{{ vault_ansible_ssh_private_key_file }}" +ansible_user: "{{ vault_ansible_user }}" \ No newline at end of file diff --git a/inventory/host_vars/herbydev/vault.yml b/inventory/host_vars/herbydev/vault.yml index 3536ce6..c6f408c 100644 --- a/inventory/host_vars/herbydev/vault.yml +++ b/inventory/host_vars/herbydev/vault.yml @@ -1,12 +1,12 @@ $ANSIBLE_VAULT;1.1;AES256 -31636136626631343631313230666561316232626166613766343865363665646637373337346330 -3664626530396334333734656430303064306165333564310a333032663266373838613461633664 -31353764356633616339356563653838643862623463616165613266353064373130653236636231 -3234346161323562370a636562356361306431613764366465306566376439646665333362313762 -30633330376435636232343933633131653466363732316263343139656433343437353137656264 -61323761653464653134613336383630623734633236636434643163626235613234386538353438 -34363061623032363836613336353132373534633631323366393539653562333233393866306662 -39396238383234363730343636393630323337363137643330623536643732653038366566363561 -32363836646539396435316234363135303436333630353538663132343363363739366632363039 -38666438396436303138353834363065666166623837633237333030356163383032373636353831 -653665396539383738376539626664383536 +65386565386434393332363131613531316239623439616663343837663337623639626464643962 +3764323737616333326165666462356639643062636331640a356362333161343134626263373530 +30653033666237383638396439393864356361383331316135396263616139306635346131376563 +6237373731646635370a313666366366396362643032663238393737346639616335616266393862 +62353931343565383639373735636130316430336334623237396330653065323932643734306235 +62386130656631656436303535393366616363326564623864613663356362613437343939663263 +64316264646339616635616334643466313364326266646538363336643936636262376532366461 +62633566376666363336633834643762363264396465316434313331623238616435613230393636 +62303034366339663138366236313738383361343462356237373636616635306465383635666562 +30363463323366306236613066323065356138363331656165393538373136323134333562366639 +626466303262626437653431326163373833 diff --git a/inventory/host_vars/herbylab-nas/vars.yml b/inventory/host_vars/herbylab-nas/vars.yml index 6cf9e47..779efc6 100644 --- a/inventory/host_vars/herbylab-nas/vars.yml +++ b/inventory/host_vars/herbylab-nas/vars.yml @@ -1,2 +1,2 @@ -ansible_connection: vault_ansible_connection -ansible_user: vault_ansible_user \ No newline at end of file +ansible_ssh_private_key_file: "{{ vault_ansible_ssh_private_key_file }}" +ansible_user: "{{ vault_ansible_user }}" \ No newline at end of file diff --git a/inventory/host_vars/pbs-site/vars.yml b/inventory/host_vars/pbs-site/vars.yml index 6cf9e47..779efc6 100644 --- a/inventory/host_vars/pbs-site/vars.yml +++ b/inventory/host_vars/pbs-site/vars.yml @@ -1,2 +1,2 @@ -ansible_connection: vault_ansible_connection -ansible_user: vault_ansible_user \ No newline at end of file +ansible_ssh_private_key_file: "{{ vault_ansible_ssh_private_key_file }}" +ansible_user: "{{ vault_ansible_user }}" \ No newline at end of file diff --git a/inventory/host_vars/pbs-staging-site/vars.yml b/inventory/host_vars/pbs-staging-site/vars.yml index 6cf9e47..779efc6 100644 --- a/inventory/host_vars/pbs-staging-site/vars.yml +++ b/inventory/host_vars/pbs-staging-site/vars.yml @@ -1,2 +1,2 @@ -ansible_connection: vault_ansible_connection -ansible_user: vault_ansible_user \ No newline at end of file +ansible_ssh_private_key_file: "{{ vault_ansible_ssh_private_key_file }}" +ansible_user: "{{ vault_ansible_user }}" \ No newline at end of file diff --git a/playbooks/playbook.yml b/playbooks/playbook.yml index 41a87a8..501257b 100644 --- a/playbooks/playbook.yml +++ b/playbooks/playbook.yml @@ -7,7 +7,7 @@ # ansible-playbook playbook.yml -i inventory.yml --tags cli - name: Deploy modern CLI environment - hosts: servers + hosts: herbydev gather_facts: true tags: [cli] diff --git a/roles/cli_modern/tasks/main.yml b/roles/cli_modern/tasks/main.yml index 0784289..fecebb2 100644 --- a/roles/cli_modern/tasks/main.yml +++ b/roles/cli_modern/tasks/main.yml @@ -4,8 +4,8 @@ - name: Gather OS family facts ansible.builtin.setup: - filter: ansible_os_family - when: ansible_os_family is not defined + filter: ansible_facts.os_family + when: ansible_facts['os_family'] is not defined - name: Include OS-specific package tasks ansible.builtin.include_tasks: "packages-{{ ansible_os_family | lower }}.yml" diff --git a/roles/cli_modern/tasks/packages-debian.yml b/roles/cli_modern/tasks/packages-debian.yml index 74a3541..0201af7 100644 --- a/roles/cli_modern/tasks/packages-debian.yml +++ b/roles/cli_modern/tasks/packages-debian.yml @@ -24,12 +24,20 @@ - name: Extract Fish version number ansible.builtin.set_fact: cli_modern_fish_current_ver: >- - {{ cli_modern_fish_version_check.stdout - | default('') - | regex_search('(\d+\.\d+)', '\1') + {{ (cli_modern_fish_version_check.stdout + | default('') + | regex_search('(\d+\.\d+)', '\1') + | default([], true)) | first | default('0') }} +- name: Add fastfetch PPA + become: true + ansible.builtin.apt_repository: + repo: ppa:zhangsongcui3371/fastfetch + state: present + update_cache: true + - name: Determine if Fish PPA is needed ansible.builtin.set_fact: cli_modern_need_fish_ppa: >-