Compare commits
30
Commits
8e46cb16a5
...
bc01040ce6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc01040ce6 | ||
|
|
86a04aba75 | ||
|
|
b44611928a | ||
|
|
b9452b98aa | ||
|
|
7bff244be0 | ||
|
|
2533f80f40 | ||
|
|
451bf41b50 | ||
|
|
0a90c5cca1 | ||
|
|
9555012353 | ||
|
|
3e048e5159 | ||
|
|
355d8c819a | ||
|
|
cf5439cf73 | ||
|
|
aac6eb6374 | ||
|
|
7a2ccfa229 | ||
|
|
85afd25697 | ||
|
|
e526bd09e8 | ||
|
|
2541652153 | ||
|
|
afec44e8cb | ||
|
|
b4be986c0d | ||
|
|
4b394c4923 | ||
|
|
c481b74b5d | ||
|
|
60e685529d | ||
|
|
3035840bb2 | ||
|
|
2eeccd5cf5 | ||
|
|
5776308513 | ||
|
|
8f1cd20374 | ||
|
|
aff14c7fae | ||
|
|
1aa64f3c13 | ||
|
|
7663185265 | ||
|
|
a6f4b06677 |
No files matched your search
@@ -19,6 +19,7 @@
|
|||||||
sendmail_mta: msmtp-mta
|
sendmail_mta: msmtp-mta
|
||||||
ca_certificates: ca-certificates
|
ca_certificates: ca-certificates
|
||||||
locate: mlocate
|
locate: mlocate
|
||||||
|
alsa: alsa-utils
|
||||||
|
|
||||||
- name: General | Facts | Package | Parrot OS Fixes
|
- name: General | Facts | Package | Parrot OS Fixes
|
||||||
set_fact:
|
set_fact:
|
||||||
@@ -156,10 +157,12 @@
|
|||||||
|
|
||||||
pacman)
|
pacman)
|
||||||
echo "*** Pacman ***"
|
echo "*** Pacman ***"
|
||||||
if [[ "$accept" == "Y" ]]; then
|
sudo pacman -Syyu {{ update_accept_var }} ||
|
||||||
auto_accept="{{ update_accept_var }}"
|
return 1
|
||||||
fi
|
|
||||||
sudo pacman -Syyu $auto_accept ||
|
echo -e "\n"
|
||||||
|
echo "*** AUR (yay) ***"
|
||||||
|
sudo -u {{ user }} yay -Syyu {{ update_accept_var }} ||
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
+11
-10
@@ -1,25 +1,26 @@
|
|||||||
---
|
---
|
||||||
# Define file, folder, and other facts per OS.
|
# Define file, folder, and other facts per OS.
|
||||||
|
|
||||||
- name: General | Facts | System | Global [1/2]
|
- name: General | Facts | System | Global 01
|
||||||
set_fact:
|
set_fact:
|
||||||
lynis_install_dir: /usr/local/src/lynis
|
global_src: /usr/local/src
|
||||||
dwm_install_dir: /usr/local/src/dwm
|
|
||||||
st_install_dir: /usr/local/src/st
|
|
||||||
global_bin: /usr/local/bin
|
global_bin: /usr/local/bin
|
||||||
x_desktops: /usr/share/xsessions
|
x_desktops: /usr/share/xsessions
|
||||||
git_repo_http: https://{{ git_host }}/{{ 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 }}
|
git_repo_ssh: "ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}"
|
||||||
shared_rc_install_dir: ~/.git-env-shared
|
shared_rc_install_dir: ~/.git-env-shared
|
||||||
notify_log: "ansible.notify.log"
|
notify_log: "ansible.notify.log"
|
||||||
runit_script_dir: /etc/runit/sv
|
runit_script_dir: /etc/runit/sv
|
||||||
runit_service_dir: /etc/runit/runsvdir/default
|
runit_service_dir: /etc/runit/runsvdir/default
|
||||||
|
|
||||||
- name: General | Facts | System | Global [2/2]
|
- name: General | Facts | System | Global 02
|
||||||
set_fact:
|
set_fact:
|
||||||
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
|
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
|
||||||
notify_log_file: /var/log/{{ notify_log }}
|
notify_log_file: "/var/log/{{ notify_log }}"
|
||||||
notify_log_file_wip: /tmp/{{ notify_log }}.wip
|
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
|
- name: General | Facts | System | Linux
|
||||||
set_fact:
|
set_fact:
|
||||||
@@ -49,6 +50,6 @@
|
|||||||
- name: General | Facts | System | runit (Devuan)
|
- name: General | Facts | System | runit (Devuan)
|
||||||
set_fact:
|
set_fact:
|
||||||
runit_script_dir: /etc/sv
|
runit_script_dir: /etc/sv
|
||||||
runit_service_dir: /etc/services
|
runit_service_dir: /etc/service
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
z_libs: lib32z1
|
z_libs: lib32z1
|
||||||
bzip: libbz2-1.0
|
bzip: libbz2-1.0
|
||||||
android_jdk: default-jdk
|
android_jdk: default-jdk
|
||||||
ncurses: libncurses5
|
ncurses: libncurses-dev
|
||||||
android_udev: android-udev-rules
|
android_udev: android-udev-rules
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
@@ -101,6 +101,11 @@
|
|||||||
flatpak_distro: true
|
flatpak_distro: true
|
||||||
when: ansible_distribution == "Parrot OS"
|
when: ansible_distribution == "Parrot OS"
|
||||||
|
|
||||||
|
- name: Workstation | Facts | Package | Apt w/o LibVirt
|
||||||
|
set_fact:
|
||||||
|
gnome_boxes: htop
|
||||||
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
and ansible_service_mgr not in ("systemd", "sysvinit")
|
||||||
|
|
||||||
- name: Workstation | Facts | Package | pacman (All Distros)
|
- name: Workstation | Facts | Package | pacman (All Distros)
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
+23
-12
@@ -9,6 +9,9 @@
|
|||||||
#
|
#
|
||||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
|
||||||
|
set $FIREFOX "sh -c '(which firefox && firefox) || (which firefox-esr && firefox-esr) || (which firefox-flatpak && firefox-flatpak)'"
|
||||||
|
set $TRANSMISSION "sh -c '(which transmission && transmission) || (which transmission-gtk && transmission-gtk) || (which transmission-flatpak && transmission-flatpak)'"
|
||||||
|
|
||||||
# Use the `xev` command to see the name and code of a keyboard key.
|
# Use the `xev` command to see the name and code of a keyboard key.
|
||||||
|
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
@@ -131,7 +134,7 @@ bindsym $mod+t exec lxappearance
|
|||||||
bindsym $mod+m exec thunar
|
bindsym $mod+m exec thunar
|
||||||
|
|
||||||
# Internet.
|
# Internet.
|
||||||
bindsym $mod+i exec "firefox || firefox-esr || firefox-flatpak"
|
bindsym $mod+i exec $FIREFOX
|
||||||
|
|
||||||
# Code.
|
# Code.
|
||||||
bindsym $mod+c exec codium-flatpak
|
bindsym $mod+c exec codium-flatpak
|
||||||
@@ -252,12 +255,12 @@ assign [class="(?i).*Mullvad.*"] $ws10
|
|||||||
|
|
||||||
|
|
||||||
## Workspace Specific Workflows ##
|
## Workspace Specific Workflows ##
|
||||||
bindsym $ctrl+$shift+1 workspace $ws1; exec i3-sensible-terminal;
|
bindsym $ctrl+$shift+1 workspace $ws1; exec i3-sensible-terminal
|
||||||
bindsym $ctrl+$shift+2 workspace $ws2; exec "firefox || firefox-esr || firefox-flatpak";
|
bindsym $ctrl+$shift+2 workspace $ws2; exec $FIREFOX
|
||||||
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak;
|
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak
|
||||||
bindsym $ctrl+$shift+4 workspace $ws4; exec code-flatpak;
|
bindsym $ctrl+$shift+4 workspace $ws4; exec code-flatpak
|
||||||
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
|
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
|
||||||
bindsym $ctrl+$shift+7 workspace $ws7; exec "transmission || transmission-gtk || transmission-flatpak"
|
bindsym $ctrl+$shift+7 workspace $ws7; exec $TRANSMISSION
|
||||||
|
|
||||||
|
|
||||||
## Reloads, Restarts, Exit ##
|
## Reloads, Restarts, Exit ##
|
||||||
@@ -324,14 +327,22 @@ bar {
|
|||||||
|
|
||||||
## Startup Applications ##
|
## Startup Applications ##
|
||||||
|
|
||||||
exec mullvad-vpn
|
exec --no-startup-id mullvad-vpn
|
||||||
exec i3-sensible-terminal
|
exec --no-startup-id i3-sensible-terminal
|
||||||
exec "transmission || transmission-gtk || transmission-flatpak"
|
exec --no-startup-id $TRANSMISSION
|
||||||
|
|
||||||
exec light -O
|
# Set defaults for laptop backlights.
|
||||||
exec light -N 0
|
exec --no-startup-id light -O
|
||||||
|
exec --no-startup-id light -N 0
|
||||||
|
|
||||||
exec setxkbmap -layout us -variant altgr-intl
|
# Set the correct keymap.
|
||||||
|
exec --no-startup-id setxkbmap -layout us -variant altgr-intl
|
||||||
|
|
||||||
|
# Notifications (allows fyi and notify-send to work)
|
||||||
exec --no-startup-id dunst
|
exec --no-startup-id dunst
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
exec --no-startup-id dbus-launch --exit-with-session i3
|
||||||
|
exec --no-startup-id pipewire &
|
||||||
|
exec --no-startup-id sleep 1 && pipewire-pulse &
|
||||||
|
exec --no-startup-id sleep 2 && wireplumber &
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
|
|
||||||
####### Start #######
|
####### Start #######
|
||||||
|
|
||||||
- name: Main | Start
|
- name: Main | Start
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -125,7 +124,6 @@
|
|||||||
- include_tasks: facts/workstation/package.yml
|
- include_tasks: facts/workstation/package.yml
|
||||||
|
|
||||||
## Desktop Environments ##
|
## Desktop Environments ##
|
||||||
|
|
||||||
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
|
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
|
||||||
when: ansible_system == "FreeBSD" and bsd_gpu == true
|
when: ansible_system == "FreeBSD" and bsd_gpu == true
|
||||||
|
|
||||||
@@ -147,7 +145,6 @@
|
|||||||
# TBD: Implement this: and extra_desktops == true
|
# TBD: Implement this: and extra_desktops == true
|
||||||
|
|
||||||
## Software Tasks ##
|
## Software Tasks ##
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: tasks/workstation/linux/software/packages.yml
|
- include_tasks: tasks/workstation/linux/software/packages.yml
|
||||||
- include_tasks: tasks/workstation/linux/software/tlp.yml
|
- include_tasks: tasks/workstation/linux/software/tlp.yml
|
||||||
@@ -167,7 +164,6 @@
|
|||||||
|
|
||||||
|
|
||||||
## Configuration Tasks ##
|
## Configuration Tasks ##
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||||
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
|
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
|
||||||
@@ -188,12 +184,11 @@
|
|||||||
- include_tasks: tasks/workstation/shared/settings/templates.yml
|
- include_tasks: tasks/workstation/shared/settings/templates.yml
|
||||||
|
|
||||||
## Final Tasks (SLOW) ##
|
## Final Tasks (SLOW) ##
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
|
||||||
- include_tasks: tasks/workstation/linux/software/android.yml
|
|
||||||
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
|
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
|
||||||
when: flatpak_distro
|
when: flatpak_distro
|
||||||
|
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
||||||
|
- include_tasks: tasks/workstation/linux/software/android.yml
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
when: workstation == true
|
when: workstation == true
|
||||||
@@ -272,7 +267,6 @@
|
|||||||
|
|
||||||
####### Reporting #######
|
####### Reporting #######
|
||||||
# Provide information for analysis.
|
# Provide information for analysis.
|
||||||
|
|
||||||
- name: Main | Reporting
|
- name: Main | Reporting
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -284,7 +278,6 @@
|
|||||||
|
|
||||||
|
|
||||||
####### Finish #######
|
####### Finish #######
|
||||||
|
|
||||||
- name: Main | Finish
|
- name: Main | Finish
|
||||||
block:
|
block:
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Installed!"
|
echo "- Installed!"
|
||||||
|
|
||||||
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
|
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
|
||||||
echo "Ensuring hosts file exists..."
|
echo "Ensuring hosts file exists..."
|
||||||
@@ -139,7 +139,7 @@ if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
|
|||||||
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
|
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
|
||||||
fi
|
fi
|
||||||
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
|
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
|
||||||
echo "Hosts file created successfully!"
|
echo "- Hosts file created successfully!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$show_facts" == "Y" ]]; then
|
if [[ "$show_facts" == "Y" ]]; then
|
||||||
@@ -150,7 +150,7 @@ fi
|
|||||||
|
|
||||||
#echo "Adding Ansible Collections..."
|
#echo "Adding Ansible Collections..."
|
||||||
#ansible-galaxy collection install community.general
|
#ansible-galaxy collection install community.general
|
||||||
#echo "Added!"
|
#echo "- Added!"
|
||||||
|
|
||||||
# Create basic layouts if configs do not exist and are requested.
|
# Create basic layouts if configs do not exist and are requested.
|
||||||
|
|
||||||
@@ -208,17 +208,26 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
|||||||
ls -lh "$server_config"
|
ls -lh "$server_config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Verifying this is the only run..."
|
||||||
|
ps -ef | grep ansible-playbook | grep -v grep
|
||||||
|
ansible_exists="$?"
|
||||||
|
if [[ "$ansible_exists" == 0 ]]; then
|
||||||
|
echo "Playbook is already being executed. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "- Verified!"
|
||||||
|
|
||||||
echo "Provisioning Ansible..."
|
echo "Provisioning Ansible..."
|
||||||
if [[ $local == "Y" ]]; then
|
if [[ $local == "Y" ]]; then
|
||||||
sudo ansible-playbook $LOCAL
|
sudo ansible-playbook $LOCAL
|
||||||
else
|
else
|
||||||
sudo ansible-pull -U $URL.git --checkout $branch
|
sudo ansible-pull -U $URL.git --checkout $branch
|
||||||
fi
|
fi
|
||||||
echo "Provisioned!"
|
echo "- Provisioned!"
|
||||||
|
|
||||||
echo "Mounting all drives..."
|
echo "Mounting all drives..."
|
||||||
mount -a
|
mount -a
|
||||||
echo "Mounted!"
|
echo "- Mounted!"
|
||||||
|
|
||||||
echo "Don't forget to set any new users' passwords!"
|
echo "Don't forget to set any new users' passwords!"
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,8 @@
|
|||||||
- "{{ user_user.home }}/TRASH"
|
- "{{ user_user.home }}/TRASH"
|
||||||
- "{{ user_user.home }}/Downloads"
|
- "{{ user_user.home }}/Downloads"
|
||||||
- "{{ user_user.home }}/Reports"
|
- "{{ user_user.home }}/Reports"
|
||||||
|
- "{{ user_user.home }}/Torrentz"
|
||||||
|
- "{{ user_user.home }}/Seedz"
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: user_user.home != ""
|
when: user_user.home != ""
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copy everything from PROJECT/files/scripts/ to /usr/local/bin/.
|
# Copy everything from PROJECT/files/scripts/ to /usr/local/bin/.
|
||||||
|
|
||||||
- name: General | Scripts | Install | Ensure Directory Exists
|
- name: General | Scripts | Install | Ensure Directory Exists
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: '{{ global_bin }}'
|
path: '{{ global_bin }}'
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
- name: General | Software | AUR | Facts 01
|
- name: General | Software | AUR | Facts 01
|
||||||
set_fact:
|
set_fact:
|
||||||
aur_user: aurbuilder
|
aur_user: aurbuilder
|
||||||
aur_build_dir: ~/src
|
aur_build_dir: "{{ global_src }}"
|
||||||
aur_helper: yay
|
aur_helper: yay
|
||||||
aur_helper_url: https://aur.archlinux.org/yay-bin.git
|
aur_helper_url: https://aur.archlinux.org/yay-bin.git
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
- "{{ sendmail }}"
|
- "{{ sendmail }}"
|
||||||
- "{{ sendmail_mta }}"
|
- "{{ sendmail_mta }}"
|
||||||
- "{{ ca_certificates }}"
|
- "{{ ca_certificates }}"
|
||||||
|
- "{{ alsa }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: General | Software | Packages | Install Software (DEV)
|
- name: General | Software | Packages | Install Software (DEV)
|
||||||
@@ -110,6 +111,13 @@
|
|||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
|
- name: General | Software | Packages | Install Audio (Looking at you, Artix)
|
||||||
|
package:
|
||||||
|
name: pipewire pipewire-pulse wireplumber pipewire-alsa
|
||||||
|
state: present
|
||||||
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
and ansible_service_mgr == "runit"
|
||||||
|
|
||||||
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
|
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
|
|||||||
@@ -84,10 +84,10 @@
|
|||||||
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
|
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
|
||||||
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
|
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
|
||||||
# Help preserve battery life by not fully charging. #
|
# Help preserve battery life by not fully charging. #
|
||||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=60'}
|
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=40'}
|
||||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
|
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=60'}
|
||||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=60'}
|
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=40'}
|
||||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
|
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=60'}
|
||||||
# Do not let the WiFi device go DORMANT.
|
# Do not let the WiFi device go DORMANT.
|
||||||
- { "key": '^[\#]?WIFI_PWR_ON_AC', "value": 'WIFI_PWR_ON_AC=off'}
|
- { "key": '^[\#]?WIFI_PWR_ON_AC', "value": 'WIFI_PWR_ON_AC=off'}
|
||||||
- { "key": '^[\#]?WIFI_PWR_ON_BAT', "value": 'WIFI_PWR_ON_BAT=off'}
|
- { "key": '^[\#]?WIFI_PWR_ON_BAT', "value": 'WIFI_PWR_ON_BAT=off'}
|
||||||
@@ -106,10 +106,32 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
when: ansible_service_mgr not in ("runit")
|
when: ansible_service_mgr not in ("runit")
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Enable + Start (runit)
|
- name: Workstation | Linux | Software | TLP | runit | Devuan Block
|
||||||
shell: |
|
block:
|
||||||
if [[ ! -e {{ runit_service_dir }}/tlp ]]; then
|
|
||||||
ln -s {{ runit_script_dir }}/tlp {{ runit_service_dir }}/tlp
|
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 01
|
||||||
fi
|
set_fact:
|
||||||
|
devuan_tlp_dir: "{{ runit_script_dir }}/{{ tlp_service }}"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 02
|
||||||
|
set_fact:
|
||||||
|
devuan_tlp_run: "{{ devuan_tlp_dir }}/run"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | TLP | runit | Devuan | Create Script
|
||||||
|
shell: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- "mkdir -pv {{ devuan_tlp_dir }}"
|
||||||
|
- "echo '#!/bin/sh' > {{ devuan_tlp_run }}"
|
||||||
|
- "echo 'exec /usr/sbin/{{ tlp_service }} start' >> {{ devuan_tlp_run }}"
|
||||||
|
- "chmod +x {{ devuan_tlp_run }}"
|
||||||
|
|
||||||
|
when: ansible_service_mgr == "runit"
|
||||||
|
and ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | TLP | runit | Enable + Start
|
||||||
|
command: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- "ln -sf {{ runit_script_dir }}/{{ tlp_service }} {{ runit_service_dir }}/{{ tlp_service }}"
|
||||||
|
#- "sv start {{ tlp_service }}" # Not necessary and sometimes gives a false negative.
|
||||||
when: ansible_service_mgr == "runit"
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
@@ -31,24 +31,69 @@
|
|||||||
name:
|
name:
|
||||||
- mullvad-vpn-runit
|
- mullvad-vpn-runit
|
||||||
state: present
|
state: present
|
||||||
when: ansible_distribution == "Artix"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
and ansible_service_mgr == "runit"
|
and ansible_service_mgr == "runit"
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Symlink GUI
|
|
||||||
ansible.builtin.file:
|
|
||||||
src: "/opt/Mullvad VPN/mullvad-vpn"
|
|
||||||
dest: "{{ global_bin }}/mullvad-vpn"
|
|
||||||
state: link
|
|
||||||
force: true
|
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Enable (Artix, runit)
|
|
||||||
ansible.builtin.file:
|
|
||||||
src: "/etc/runit/sv/mullvad-daemon"
|
|
||||||
dest: "/run/runit/services/mullvad"
|
|
||||||
state: link
|
|
||||||
force: true
|
|
||||||
when: ansible_service_mgr == "runit"
|
|
||||||
|
|
||||||
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
||||||
|
|
||||||
# TBD: VPNs for distros like Devuan.
|
## Specific Distros ##
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
|
||||||
|
block:
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
|
||||||
|
set_fact:
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02
|
||||||
|
set_fact:
|
||||||
|
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
|
||||||
|
stat:
|
||||||
|
path: '/opt/Mullvad VPN'
|
||||||
|
register: mullvad_installed
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
|
||||||
|
shell: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- "mkdir -pv {{ devuan_mullvad_dir }}"
|
||||||
|
- "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"
|
||||||
|
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
|
||||||
|
when: not mullvad_installed.stat.exists
|
||||||
|
|
||||||
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
and ansible_service_mgr != "systemd"
|
||||||
|
|
||||||
|
## Link & Enable ##
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 01
|
||||||
|
set_fact:
|
||||||
|
mullvad_exe: 'mullvad-vpn'
|
||||||
|
mullvad_exe_dir: '/opt/Mullvad\ VPN'
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 02
|
||||||
|
set_fact:
|
||||||
|
mullvad_exe_new: "{{ global_bin }}/{{ mullvad_exe }}"
|
||||||
|
|
||||||
|
- 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 }}
|
||||||
|
- chmod +x {{ mullvad_exe_new }}
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | Enable (runit)
|
||||||
|
file:
|
||||||
|
src: "{{ runit_script_dir }}/mullvad-daemon"
|
||||||
|
dest: "{{ runit_service_dir }}/mullvad"
|
||||||
|
state: link
|
||||||
|
force: true
|
||||||
|
when: ansible_service_mgr == "runit"
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
user_templates: "{{ user_user.home }}/Templates"
|
user_templates: "{{ user_user.home }}/Templates"
|
||||||
|
|
||||||
- name: Workstation | Settings | Templates | Ensure Directory Exists
|
- name: Workstation | Settings | Templates | Ensure Directory Exists
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: "{{ user_templates }}"
|
path: "{{ user_templates }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# work to change things around. Good alternative to DWM and so lightweight that
|
# work to change things around. Good alternative to DWM and so lightweight that
|
||||||
# it doesn´t even matter if both are installed!!
|
# it doesn´t even matter if both are installed!!
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 01
|
- name: Workstation | Shared | Software | i3 | Facts 01
|
||||||
set_fact:
|
set_fact:
|
||||||
i3_config: "settings/i3.config"
|
i3_config: "settings/i3.config"
|
||||||
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
||||||
@@ -19,18 +19,18 @@
|
|||||||
i3_theme02: arc-theme
|
i3_theme02: arc-theme
|
||||||
i3_theme03: numix-gtk-theme
|
i3_theme03: numix-gtk-theme
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 02
|
- name: Workstation | Shared | Software | i3 | Facts 02
|
||||||
set_fact:
|
set_fact:
|
||||||
i3_config_file: "{{ i3_config_dir }}/config"
|
i3_config_file: "{{ i3_config_dir }}/config"
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | non-apt
|
- name: Workstation | Shared | Software | i3 | Facts | non-apt
|
||||||
set_fact:
|
set_fact:
|
||||||
i3_theme01: htop
|
i3_theme01: htop
|
||||||
i3_theme02: htop
|
i3_theme02: htop
|
||||||
i3_theme03: htop
|
i3_theme03: htop
|
||||||
when: ansible_pkg_mgr != "apt"
|
when: ansible_pkg_mgr != "apt"
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | yay
|
- name: Workstation | Shared | Software | i3 | Facts | yay
|
||||||
set_fact:
|
set_fact:
|
||||||
i3_yay_packages:
|
i3_yay_packages:
|
||||||
- greybird-gtk-theme
|
- greybird-gtk-theme
|
||||||
@@ -38,12 +38,12 @@
|
|||||||
- numix-gtk-theme
|
- numix-gtk-theme
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
#- name: Workstation | Shared | Software | i3 | i3 | Facts | TBD
|
#- name: Workstation | Shared | Software | i3 | Facts | TBD
|
||||||
# set_fact:
|
# set_fact:
|
||||||
# i3_package: i3-wm
|
# i3_package: i3-wm
|
||||||
# when: ansible_distribution in ("TBD")
|
# when: ansible_distribution in ("TBD")
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Install
|
- name: Workstation | Shared | Software | i3 | Install
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- "{{ i3_package }}"
|
- "{{ i3_package }}"
|
||||||
@@ -59,22 +59,22 @@
|
|||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Install (yay)
|
- name: Workstation | Shared | Software | i3 | Install (yay)
|
||||||
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
||||||
loop: "{{ i3_yay_packages }}"
|
loop: "{{ i3_yay_packages }}"
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
become_user: "{{ aur_user }}"
|
become_user: "{{ aur_user }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Create Dir
|
- name: Workstation | Shared | Software | i3 | Config | Create Dir
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: "{{ i3_config_dir }}"
|
path: "{{ i3_config_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: "{{ user }}"
|
owner: "{{ user }}"
|
||||||
group: "{{ user }}"
|
group: "{{ user }}"
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Copy File
|
- name: Workstation | Shared | Software | i3 | Config | Copy File
|
||||||
copy:
|
copy:
|
||||||
src: "{{ i3_config }}"
|
src: "{{ i3_config }}"
|
||||||
dest: "{{ i3_config_file }}"
|
dest: "{{ i3_config_file }}"
|
||||||
@@ -104,11 +104,11 @@
|
|||||||
# # sudo udevadm trigger
|
# # sudo udevadm trigger
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Light (Linux Only)
|
- name: Workstation | Shared | Software | i3 | Light (Linux Only)
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Check Backlights
|
- name: Workstation | Shared | Software | i3 | Light | Check Backlights
|
||||||
ansible.builtin.find:
|
find:
|
||||||
paths: /sys/class/backlight
|
paths: /sys/class/backlight
|
||||||
file_type: any # Options: file, directory, any
|
file_type: any # Options: file, directory, any
|
||||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||||
@@ -117,20 +117,20 @@
|
|||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
#- name: Display var _ DELETEME
|
#- name: Display var _ DELETEME
|
||||||
# ansible.builtin.debug:
|
# debug:
|
||||||
# msg: "{{ i3_light_device_check }}"
|
# msg: "{{ i3_light_device_check }}"
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Pull Backlight Name
|
- name: Workstation | Shared | Software | i3 | Light | Pull Backlight Name
|
||||||
set_fact:
|
set_fact:
|
||||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
#- name: Display var - DELETEME
|
#- name: Display var - DELETEME
|
||||||
# ansible.builtin.debug:
|
# debug:
|
||||||
# msg: "{{ i3_light_device_name }}"
|
# msg: "{{ i3_light_device_name }}"
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Create
|
- name: Workstation | Shared | Software | i3 | Light | udev Rules | Create
|
||||||
ansible.builtin.copy:
|
copy:
|
||||||
dest: /etc/udev/rules.d/backlight.rules
|
dest: /etc/udev/rules.d/backlight.rules
|
||||||
content: |
|
content: |
|
||||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Reload
|
- name: Workstation | Shared | Software | i3 | Light | udev Rules | Reload
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- udevadm control --reload-rules
|
- udevadm control --reload-rules
|
||||||
|
|||||||
Reference in new issue
Block a user