Variablize /usr/local/src. Add quotes for facts with variables. Change how Mullvad is installed on Devuan.

This commit is contained in:
me
2026-08-11 16:34:35 -07:00
parent 451bf41b50
commit 2533f80f40
2 changed files with 17 additions and 15 deletions
+10 -9
View File
@@ -1,25 +1,26 @@
---
# Define file, folder, and other facts per OS.
- name: General | Facts | System | Global [1/2]
- name: General | Facts | System | Global 01
set_fact:
lynis_install_dir: /usr/local/src/lynis
dwm_install_dir: /usr/local/src/dwm
st_install_dir: /usr/local/src/st
global_src: /usr/local/src
global_bin: /usr/local/bin
x_desktops: /usr/share/xsessions
git_repo_http: https://{{ git_host }}/{{ git_user }}/{{ git_project }}
git_repo_ssh: ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}
git_repo_http: "https://{{ git_host }}/{{ git_user }}/{{ git_project }}"
git_repo_ssh: "ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}"
shared_rc_install_dir: ~/.git-env-shared
notify_log: "ansible.notify.log"
runit_script_dir: /etc/runit/sv
runit_service_dir: /etc/runit/runsvdir/default
- name: General | Facts | System | Global [2/2]
- name: General | Facts | System | Global 02
set_fact:
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
notify_log_file: /var/log/{{ notify_log }}
notify_log_file_wip: /tmp/{{ notify_log }}.wip
notify_log_file: "/var/log/{{ notify_log }}"
notify_log_file_wip: "/tmp/{{ notify_log }}.wip"
lynis_install_dir: "{{ global_src }}/lynis"
dwm_install_dir: "{{ global_src }}/dwm"
st_install_dir: "{{ global_src }}/st"
- name: General | Facts | System | Linux
set_fact:
+7 -6
View File
@@ -43,7 +43,7 @@
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
set_fact:
devuan_mullvad_dir: ~/Downloads/mullvad-installer
devuan_mullvad_dir: "{{ global_src }}/mullvad-installer"
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
mullvad_repack_url: https://github.com/sys-fs/mullvad-repack
@@ -53,18 +53,18 @@
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
stat:
path: "/opt/Mullvad VPN"
path: '/opt/Mullvad VPN'
register: mullvad_installed
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_mullvad_dir }}"
- "cd {{ devuan_mullvad_dir }} && curl -L -o Mullvad.deb {{ mullvad_deb_url }}"
- "cd {{ devuan_mullvad_dir }} && git clone {{ mullbvad_repack_url }}"
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
- "rm -rfv {{ mullvad_repack_dir }}"
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
- "cd {{ devuan_mullvad_dir }} && apt install -y ./Mullvad_repack.deb"
- "mv {{ devuan_mullvad_dir }} ~/TRASH/mullvad-completed-`date +'%Y%m%d-%H%M'`"
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
when: not mullvad_installed.stat.exists
when: ansible_pkg_mgr == "apt"
@@ -84,6 +84,7 @@
- name: Workstation | Software | VPN | Mullvad | PATH | Install
shell: "{{ item }}"
loop:
- rm {{ mullvad_exe_new }}
- echo "#!/usr/bin/env sh" > {{ mullvad_exe_new }}
- echo "cd {{ mullvad_exe_dir }}" >> {{ mullvad_exe_new }}
- echo "./{{ mullvad_exe }}" >> {{ mullvad_exe_new }}