Migrate shell to FQCN.

This commit is contained in:
me
2026-10-02 11:16:42 -07:00
parent 425abcff73
commit a06b5680c0
46 changed files with 138 additions and 138 deletions
+3 -3
View File
@@ -2,16 +2,16 @@
# Facts that must be gathered after running tasks.
- name: General | Facts | Gather | Locate bash
shell: which bash
ansible.builtin.shell: which bash
register: bash_exec
ignore_errors: true
- name: General | Facts | Gather | Locate ansible-pull
shell: which ansible-pull
ansible.builtin.shell: which ansible-pull
register: ansible_pull_exec
ignore_errors: true
- name: General | Facts | Gather | Locate zsh
shell: which zsh
ansible.builtin.shell: which zsh
register: zsh_exec
ignore_errors: true
+3 -3
View File
@@ -102,7 +102,7 @@
ansible_pkg_mgr_file: "{{ prov_dir }}/ansible_pkg_mgr.txt"
- name: General | Facts | Package | Update Command | Store Variables
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "echo '{{ ansible_distribution }}' > {{ ansible_distribution_file }}"
- "echo '{{ ansible_pkg_mgr }}' > {{ ansible_pkg_mgr_file }}"
@@ -269,7 +269,7 @@
# Flatpaks
- name: General | Facts | Package | Update Command | Flatpak | Check
shell: which flatpak
ansible.builtin.shell: which flatpak
register: flatpak_exec
ignore_errors: true
@@ -293,7 +293,7 @@
# Firmware
- name: General | Facts | Package | Update Command | Firmware | Check
shell: which fwupdmgr
ansible.builtin.shell: which fwupdmgr
register: fwupdmgr_exec
ignore_errors: true
+3 -3
View File
@@ -4,7 +4,7 @@
## Load Config File ##
- name: Miner | Facts | Config File | Download
shell: "scp {{ file_server }}:{{ config_file_remote }} {{ config_file_local }}; chmod 700 {{ config_file_local }}"
ansible.builtin.shell: "scp {{ file_server }}:{{ config_file_remote }} {{ config_file_local }}; chmod 700 {{ config_file_local }}"
- name: Miner | Facts | Config File | Load Wallets
set_fact:
@@ -17,7 +17,7 @@
- name: Miner | Facts | Config File | DEBUG
debug:
var: "{{ item }}"
loop:
loop:
- wallet_xmr
- wallet_eth
@@ -25,4 +25,4 @@
## Clean Up ##
- name: Miner | Facts | Config File | Delete
shell: "mv {{ config_file_local }} ~/TRASH/"
ansible.builtin.shell: "mv {{ config_file_local }} ~/TRASH/"
+1 -1
View File
@@ -40,7 +40,7 @@
- name: General | Account Management | Users | Root
ansible.builtin.user:
name: root
shell: "{{ bash_exec.stdout }}"
ansible.builtin.shell: "{{ bash_exec.stdout }}"
create_home: true
generate_ssh_key: true
register: user_root
+1 -1
View File
@@ -16,7 +16,7 @@
mode: '0755'
- name: General | Scripts | Install | Remove Old Scripts
shell: |
ansible.builtin.shell: |
if [[ -e {{ global_bin }}/{{ item }} ]]; then
rm -v {{ global_bin }}/{{ item }}
fi
+2 -2
View File
@@ -43,10 +43,10 @@
dest: "{{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Change Permissions
shell: "chown -Rc {{ aur_user }}:wheel {{ aur_helper_dir }}"
ansible.builtin.shell: "chown -Rc {{ aur_user }}:wheel {{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Build & Integrate
shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
ansible.builtin.shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
become: true
become_user: "{{ aur_user }}"
changed_when: true
+3 -3
View File
@@ -13,7 +13,7 @@
register: metasploit_status
- name: General | Software | Metasploit | Refresh Apt Files
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -p /tmp/apt/"
- "mv -fv /usr/share/keyrings/metasploit-framework.gpg /tmp/apt/metasploit-framework.gpg.old"
@@ -25,7 +25,7 @@
ignore_errors: true
- name: General | Software | Metasploit | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > {{ metasploit_installer }}"
- "chmod 755 {{ metasploit_installer }}"
@@ -37,7 +37,7 @@
and pentesting
- name: General | Software | Metasploit | Remove (Darwin)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "/opt/metasploit-framework/bin/msfremove"
when: ansible_system in ("Darwin")
+2 -2
View File
@@ -17,7 +17,7 @@
nix_exe: ~/.deleteme.nix.sh
- name: Install Nix
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "curl -L https://nixos.org/nix/install > {{ nix_exe }}"
- "chmod 755 {{ nix_exe }}"
@@ -27,7 +27,7 @@
become_user: "{{ user }}"
- name: Install Nix Software
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "nix-env -iA nixpkgs.lbry" # Installs, but doesnt launch?
#$ lbry
+2 -2
View File
@@ -13,7 +13,7 @@
when: swap_block != false
- name: General | Software | NixOS | Update Config Project
shell: "files/scripts/nixos.sh -b {{ branch }}"
ansible.builtin.shell: "files/scripts/nixos.sh -b {{ branch }}"
- name: General | Software | NixOS | Create Ansible Nix Config
blockinfile:
@@ -36,7 +36,7 @@
# Maybe do home manager here? Or should it be under Workstation? Or maybe
# this is the spot where I start creating workstation.nix, server.nix, etc.
#- name: General | Software | NixOS | Home Manager? *.nix file management?
# shell:
# ansible.builtin.shell:
# loop:
# - ???
# - ???
+4 -4
View File
@@ -5,7 +5,7 @@
# They have zypper higher in the path, but it's really apt renamed.
# Probably for "security", but package module does not use the ansible_pkg_mgr variable
# so resetting the value to apt doesn't work. Just going to move it.
shell: "mv `which zypper` `which zypper`.zz.`date +%Y%m%d`"
ansible.builtin.shell: "mv `which zypper` `which zypper`.zz.`date +%Y%m%d`"
register: parrotos_zypper_removed
ignore_errors: true
when: ansible_distribution == "Parrot OS"
@@ -16,13 +16,13 @@
when: ansible_distribution == "Parrot OS" and parrotos_zypper_removed is defined and not parrotos_zypper_removed.failed
- name: General | Software | Packages | Fix Parrot OS (zypper), Exiting
shell: exit 1
ansible.builtin.shell: exit 1
when: ansible_distribution == "Parrot OS" and parrotos_zypper_removed is defined and not parrotos_zypper_removed.failed
# More Parrot OS junk. They have a command called update in /usr/bin. Doesn't
# have sudo or anything in it. Hide it in preference for .bashrc update function.
- name: General | Software | Packages | Fix Parrot OS 2 (update)
shell: "mv `which update` `which update`.zz.`date +%Y%m%d`"
ansible.builtin.shell: "mv `which update` `which update`.zz.`date +%Y%m%d`"
ignore_errors: true
when: ansible_distribution == "Parrot OS"
@@ -34,7 +34,7 @@
when: ansible_pkg_mgr in ["apt", "pacman"]
- name: General | Software | Packages | Cache Refresh (FreeBSD)
shell: pkg update
ansible.builtin.shell: pkg update
when: ansible_system == "FreeBSD"
- name: General | Software | Packages | Install Software
+1 -1
View File
@@ -8,7 +8,7 @@
sendmail_queue: sendmail_msp_queue
- name: Server | Sendmail | Check
shell: which postfix
ansible.builtin.shell: which postfix
register: postfix
ignore_errors: true
+2 -2
View File
@@ -81,7 +81,7 @@
## JournalCTL ##
- name: General | Software | Services | JournalCTL | Reduce Log Size
shell: journalctl --vacuum-size=100M
ansible.builtin.shell: journalctl --vacuum-size=100M
when: ansible_system == "Linux"
and ansible_service_mgr == "systemd"
ignore_errors: true
@@ -135,7 +135,7 @@
when: ansible_service_mgr != "runit"
- name: General | Software | Services | Disable (runit)
shell: |
ansible.builtin.shell: |
if [[ -e {{ runit_service_dir }}/{{ item.name }} ]]; then
rm -v {{ runit_service_dir }}/{{ item.name }}
fi
+1 -1
View File
@@ -18,7 +18,7 @@
block:
- name: General | Software | Swap | Create Swapfile
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- dd if=/dev/zero of={{ swap_file }} bs={{ swap_block }}
count={{ swap_count }} status=progress
+3 -3
View File
@@ -47,7 +47,7 @@
#### Install #
###
###- name: General | Telegraf | Linux | Install
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### args:
### chdir: "{{ ansible_env.HOME }}/Downloads/"
### loop:
@@ -61,7 +61,7 @@
### when: ansible_system == "Linux"
###
###- name: General | Telegraf | FreeBSD | Install 1/2
### shell: /usr/sbin/pwd_mkdb -p /etc/master.passwd
### ansible.builtin.shell: /usr/sbin/pwd_mkdb -p /etc/master.passwd
### when: ansible_system == "FreeBSD"
###
###- name: General | Telegraf | FreeBSD | Install 2/2
@@ -72,7 +72,7 @@
#### Configuration #
###
###- name: General | Telegraf | Config 1/2
### shell: mv {{ telegraf_config }} ~/TRASH/
### ansible.builtin.shell: mv {{ telegraf_config }} ~/TRASH/
### ignore_errors: true
###
###- name: General | Telegraf | Config 2/2
+1 -1
View File
@@ -3,7 +3,7 @@
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Lock | Create
shell: "date +'%Y-%m-%d %H:%M:%S' >> {{lock_file }}"
ansible.builtin.shell: "date +'%Y-%m-%d %H:%M:%S' >> {{lock_file }}"
- name: General | Tests | Existing Run | Lock | Create
+1 -1
View File
@@ -40,7 +40,7 @@
recurse: false
- name: General | Tests | Lynis | Run System Audit
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "./lynis audit system --no-colors > {{ lynis_temp_file }} 2>&1"
- "mv {{ lynis_temp_file }} {{ lynis_file }}"
+1 -1
View File
@@ -11,7 +11,7 @@
nmap_temp_file: "{{ nmap_file }}.tmp"
- name: General | Tests | nmap | Create Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ nmap_temp_file }}"
- "printf '{{ nmap_separator }}' >> {{ nmap_temp_file }}"
+2 -2
View File
@@ -18,14 +18,14 @@
when: ansible_service_mgr == "runit"
- name: General | Tests | Services | Create Main Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ services_report_file }}"
- "echo '\n-= {{ services_command }} =-\n' >> {{ services_report_file }}"
- "{{ services_command }} >> {{ services_report_file }}"
- name: General | Tests | Services | Create Enabled Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ services_enabled_file }}"
- "echo '\n-= Enabled + Sorted =-\n' >> {{ services_enabled_file }}"
+1 -1
View File
@@ -4,7 +4,7 @@
## Gather ##
- name: Miner | Account Management | Gather | Find Root Directory
shell: cd ~; pwd
ansible.builtin.shell: cd ~; pwd
register: root_home
+17 -17
View File
@@ -31,22 +31,22 @@
# Tests
- name: Miner | Driver | AMDGPU | Check If GA Kernel Installed
shell: 'uname --kernel-release | grep 5.4.0-65-generic'
ansible.builtin.shell: 'uname --kernel-release | grep 5.4.0-65-generic'
register: ga_kernel
ignore_errors: true
- name: Miner | Driver | AMDGPU | Check If HWE Kernel Installed
shell: 'apt search linux-image-5.8.0-* | grep -c installed'
ansible.builtin.shell: 'apt search linux-image-5.8.0-* | grep -c installed'
register: hwe_kernel
ignore_errors: true
#- name: Miner | Driver | AMDGPU | Check If All Driver Installed
# shell: 'which amdgpu-uninstall'
# ansible.builtin.shell: 'which amdgpu-uninstall'
# register: amdgpu_install
# ignore_errors: true
- name: Miner | Driver | AMDGPU | Check If Pro Driver Installed
shell: 'amdgpu-pro-uninstall -y'
ansible.builtin.shell: 'amdgpu-pro-uninstall -y'
register: amdgpu_install
ignore_errors: true
@@ -62,7 +62,7 @@
## Step 1/3: Get Correct Kernel ##
- name: Miner | Driver | AMDGPU | Install Recommended GA Kernel
shell: apt install --install-recommends linux-generic
ansible.builtin.shell: apt install --install-recommends linux-generic
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Install Specific GA Kernel For Booting
@@ -86,7 +86,7 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Update GRUB
shell: update-grub
ansible.builtin.shell: update-grub
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
@@ -100,7 +100,7 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Reboot To GA Kernel
shell: reboot
ansible.builtin.shell: reboot
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- pause:
@@ -111,7 +111,7 @@
## Step 2/3: Remove Incorrect Kernels ##
- name: Miner | Driver | AMDGPU | Remove Bad Kernels
shell: "apt remove --purge linux-generic-hwe-20.04 \
ansible.builtin.shell: "apt remove --purge linux-generic-hwe-20.04 \
linux-oem-20.04 \
linux-hwe-* \
linux-oem-* \
@@ -121,7 +121,7 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Update + Clean System
shell: "apt update; apt dist-upgrade -y; apt autoremove --purge -y"
ansible.builtin.shell: "apt update; apt dist-upgrade -y; apt autoremove --purge -y"
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
# This is to ensure we can test adding `apt install --install-recommends linux-generic` later
@@ -135,7 +135,7 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Update GRUB
shell: update-grub
ansible.builtin.shell: update-grub
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
@@ -150,7 +150,7 @@
# This reboot may not be necessary.
#- name: Miner | Driver | AMDGPU | Reboot To Ensure GA Is 0
# shell: reboot
# ansible.builtin.shell: reboot
# when: amdgpu_install.failed and hwe_kernel.stdout != "0"
#
#- pause:
@@ -161,20 +161,20 @@
## Step 3/3: Install AMD PRO Driver ##
- name: Miner | Driver | AMDGPU | Download Driver
shell: 'scp {{ user }}@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz {{ root_home.stdout }}/Downloads/'
ansible.builtin.shell: 'scp {{ user }}@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz {{ root_home.stdout }}/Downloads/'
when: amdgpu_install.failed or "1" == "1"
- name: Miner | Driver | AMDGPU | Extract Tarball
shell: 'cd {{ root_home.stdout }}/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
when: amdgpu_install.failed or "1" == "1"
## Only one driver set can exist at a time! ##
#- name: Miner | Driver | AMDGPU | Install AMDGPU All Driver
# shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y'
# ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y'
# when: amdgpu_install.failed
- name: Miner | Driver | AMDGPU | Install AMDGPU-Pro Driver
shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-pro-install -y --opencl=pal,legacy'
ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-pro-install -y --opencl=pal,legacy'
when: amdgpu_install.failed or "1" == "1"
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
@@ -188,7 +188,7 @@
when: amdgpu_install.failed
- name: Miner | Driver | AMDGPU | Reboot To GA Kernel
shell: reboot
ansible.builtin.shell: reboot
when: amdgpu_install.failed
- pause:
@@ -199,7 +199,7 @@
## We're done! ##
- name: Miner | Driver | AMDGPU | Test Driver
shell: clinfo -l
ansible.builtin.shell: clinfo -l
register: clinfo
- name: Miner | Driver | AMDGPU | Test Results
+9 -9
View File
@@ -27,33 +27,33 @@
## Test ##
- name: Miner | Software | Ethminer | Test If Installed
shell: "which ethminer"
ansible.builtin.shell: "which ethminer"
register: ethminer_install
ignore_errors: true
## Download ##
- name: Miner | Software | Ethminer | Remove Git Repo
shell: rm -rf ethminer
ansible.builtin.shell: rm -rf ethminer
args:
chdir: "{{ root_home.stdout }}/Downloads"
ignore_errors: true
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Clone Git Repo
shell: git clone https://github.com/ethereum-mining/ethminer.git
ansible.builtin.shell: git clone https://github.com/ethereum-mining/ethminer.git
args:
chdir: "{{ root_home.stdout }}/Downloads"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Update Repo's Repos
shell: git submodule update --init --recursive
ansible.builtin.shell: git submodule update --init --recursive
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Create Build Folder
shell: mkdir -p build
ansible.builtin.shell: mkdir -p build
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed
@@ -82,7 +82,7 @@
when: ansible_distribution == "Pop!_OS"
- name: Miner | Software | Ethminer | cmake Flags
shell: "cmake .. -DETHASHCL={{ opencl_flag }} \
ansible.builtin.shell: "cmake .. -DETHASHCL={{ opencl_flag }} \
-DETHASHCUDA={{ cuda_flag }} \
-DAPICORE=ON \
-DBINKERN=ON \
@@ -94,13 +94,13 @@
when: ethminer_install.failed
- name: Miner | Software | Ethminer | cmake Build
shell: cmake --build .
ansible.builtin.shell: cmake --build .
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | make install
shell: make install
ansible.builtin.shell: make install
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed
@@ -108,7 +108,7 @@
## Personal Script Setup ##
- name: Miner | Software | Ethminer | Script
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "scp {{ user }}@leet:InstallFiles/Miners/ethminer/ethminer.sh {{ user_mfn.home }}/"
- "chmod 755 {{ user_mfn.home }}/ethminer.sh"
+7 -7
View File
@@ -6,15 +6,15 @@
## Installation ##
- name: Miner | Software | Nanominer | Installation | Create Home
shell: "mkdir -p {{ nanominer_home }}"
ansible.builtin.shell: "mkdir -p {{ nanominer_home }}"
become: true
become_user: mfn
- name: Miner | Software | Nanominer | Installation | Download Tarball
shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}; chown mfn {{ nanominer_tar_local }}"
ansible.builtin.shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}; chown mfn {{ nanominer_tar_local }}"
- name: Miner | Software | Nanominer | Installation | Extract Tarball
shell: "tar -xvf {{ nanominer_tar_local }}"
ansible.builtin.shell: "tar -xvf {{ nanominer_tar_local }}"
args:
chdir: "{{ nanominer_home }}"
become: true
@@ -27,7 +27,7 @@
# Delete Old Config #
- name: Miner | Software | Nanominer | Configuration | Reset
shell: "mv {{ nanominer_config }} ~/TRASH/"
ansible.builtin.shell: "mv {{ nanominer_config }} ~/TRASH/"
ignore_errors: true
# CPU #
@@ -152,7 +152,7 @@
## Executable ##
- name: Miner | Software | Nanominer | Executable | Reset
shell: "mv {{ nanominer_script }} ~/TRASH/"
ansible.builtin.shell: "mv {{ nanominer_script }} ~/TRASH/"
ignore_errors: true
- name: Miner | Software | Nanominer | Executable | Create
@@ -182,7 +182,7 @@
## Permissions ##
- name: Miner | Software | Nanominer | Permissions
shell: "chown -R mfn {{ user_mfn.home }}/nanominer*; chmod -R 755 {{ user_mfn.home }}/nanominer*"
ansible.builtin.shell: "chown -R mfn {{ user_mfn.home }}/nanominer*; chmod -R 755 {{ user_mfn.home }}/nanominer*"
@@ -192,7 +192,7 @@
# It should kill the miner if a user logs into an X session, such as if I'm gaming.
# Then once I log out the job should come back within the minute.
- name: Miner | Software | Nanominer | Reload
shell: "killall {{ nanominer_script }}; killall {{ nanominer_exec }}; killall nanominer.sh; killall nanominer"
ansible.builtin.shell: "killall {{ nanominer_script }}; killall {{ nanominer_exec }}; killall nanominer.sh; killall nanominer"
become: true
become_user: mfn
ignore_errors: true
+1 -1
View File
@@ -2,5 +2,5 @@
# Mine monero with CPUs!
- name: Miner | Software | XMR-Stak-CPU
shell: exit 0
ansible.builtin.shell: exit 0
when: '"1" == "0"'
+1 -1
View File
@@ -2,7 +2,7 @@
# Ensure certbot renews certs on time.
- name: Server | Cron | Certbot | Find Executable
shell: which certbot
ansible.builtin.shell: which certbot
register: certbot
- name: Server | Cron | Certbot | Monthly Renewal
+6 -6
View File
@@ -5,8 +5,8 @@
## Pre-reqs ##
- name: Server | Grafana | Pre-Requirements | Install
package:
name:
package:
name:
- apt-transport-https
- software-properties-common
- wget
@@ -16,22 +16,22 @@
## Install ##
- name: Server | Grafana | Install | Add Repo
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
- echo "deb https://packages.grafana.com/oss/deb stable main" | tee /etc/apt/sources.list.d/grafana.list
- apt update
- name: Server | Grafana | Install | Main
package:
name:
package:
name:
- grafana
state: present
## Configure ##
- name: Server | Grafana | Configure
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- systemctl daemon-reload
- systemctl enable grafana-server
+3 -3
View File
@@ -3,12 +3,12 @@
# https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/
- name: Server | InfluxDB1 | Check
shell: which influxd
ansible.builtin.shell: which influxd
register: influxdb_check
ignore_errors: true
- name: Server | InfluxDB1 | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
@@ -20,7 +20,7 @@
when: influxdb_check.failed
- name: Server | InfluxDB1 | Config
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- influx -execute "create database main"
- influx -execute "show databases"
+3 -3
View File
@@ -3,12 +3,12 @@
# https://docs.influxdata.com/influxdb/v2.0/get-started/?t=Linux
- name: Server | InfluxDB2 | Check
shell: which influxd
ansible.builtin.shell: which influxd
register: influxdb_check
ignore_errors: true
- name: Server | InfluxDB2 | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
@@ -20,6 +20,6 @@
when: influxdb_check.failed
- name: Server | InfluxDB2 | Config
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- influx setup -f -u {{ user }} -p initpassword -o Hyperling -b main -r 0
+6 -6
View File
@@ -22,7 +22,7 @@
state: present
- name: Server | OnlyOffice | Postgres | Configure
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- psql -c "CREATE DATABASE onlyoffice;"
- psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
@@ -39,7 +39,7 @@
# Actual Program #
- name: Server | OnlyOffice | Docs | Add Repo
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
- echo "deb https://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
@@ -60,22 +60,22 @@
# Certs #
#- name: Server | OnlyOffice | HTTPS | Check For Cert
# shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
# ansible.builtin.shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
# register: onlyoffice_cert
# ignore_errors: true
#
#- name: Server | OnlyOffice | HTTPS | Create Cert
# shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
# ansible.builtin.shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
# when: onlyoffice_cert.failed
# Config #
#- name: Server | OnlyOffice | HTTPS | Check For Config
# shell: ls -l /etc/onlyoffice/documentserver/nginx/ds.conf
# ansible.builtin.shell: ls -l /etc/onlyoffice/documentserver/nginx/ds.conf
# register: onlyoffice_cert
#
#- name: Server | OnlyOffice | HTTPS | Create Config
# shell: cp -f /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds.conf
# ansible.builtin.shell: cp -f /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds.conf
# when: onlyoffice_cert.failed
#
#- name: Server | OnlyOffice | HTTPS | Modify Config
+1 -1
View File
@@ -38,6 +38,6 @@
backup: true
- name: Workstation | FreeBSD | Software | GUI | Mount All
shell: mount -a
ansible.builtin.shell: mount -a
args:
warn: false
+10 -10
View File
@@ -243,7 +243,7 @@
# This can only be run once, otherwise cmdline-tools creates latest-* folders.
- name: Workstation | Linux | Software | Android | Install | Consistent Modules
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
ansible.builtin.shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
loop:
# Current
- cmdline-tools/latest
@@ -256,7 +256,7 @@
# These are safe to run multiple times, and uses the new `latest` version.
- name: Workstation | Linux | Software | Android | Install | Required Modules
shell: |
ansible.builtin.shell: |
set -o pipefail
if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
@@ -277,7 +277,7 @@
# Add more versions for testing across all the important platforms.
- name: Workstation | Linux | Software | Android | Install | Additional Modules
shell: |
ansible.builtin.shell: |
set -o pipefail
if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
@@ -299,7 +299,7 @@
# Remove extra downloads if system is not meant for full amount of testing.
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
shell: |
ansible.builtin.shell: |
set -o pipefail
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
@@ -321,7 +321,7 @@
# Remove any versions which used to be part of this script and no longer used.
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
shell: |
ansible.builtin.shell: |
set -o pipefail
if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
@@ -342,7 +342,7 @@
# Report the currently installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
ansible.builtin.shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
become: true
become_user: "{{ user }}"
when: coding
@@ -350,25 +350,25 @@
## Flutter and Licenses ##
- name: Workstation | Linux | Software | Android | Inform Flutter
shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
ansible.builtin.shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
become: true
become_user: "{{ user }}"
when: coding
- name: Workstation | Linux | Software | Android | License Agreements [1/2]
shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
ansible.builtin.shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
become: true
become_user: "{{ user }}"
when: coding
- name: Workstation | Linux | Software | Android | License Agreements [2/2]
shell: "yes | {{ flutter }} doctor --android-licenses"
ansible.builtin.shell: "yes | {{ flutter }} doctor --android-licenses"
become: true
become_user: "{{ user }}"
when: coding
- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become: true
become_user: "{{ user }}"
+6 -6
View File
@@ -20,7 +20,7 @@
###
#### https://brave.com/linux/#debian-ubuntu-mint
###- name: Workstation | Software | Brave | Add Repo [apt]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
### - echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | tee /etc/apt/sources.list.d/brave-browser-release.list
@@ -29,7 +29,7 @@
###
#### https://brave.com/linux/#fedora-centos-streamrhel
###- name: Workstation | Software | Brave | Add Repo [dnf]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/
### - rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
@@ -37,7 +37,7 @@
###
#### https://brave.com/linux/#opensuse
###- name: Workstation | Software | Brave | Add Repo [zypper]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
### - zypper addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
@@ -62,18 +62,18 @@
state: absent
- name: Workstation | Software | Brave | Remove Repo [apt]
shell: rm /etc/apt/sources.list.d/brave-browser-*.list && apt update || echo "Not Needed"
ansible.builtin.shell: rm /etc/apt/sources.list.d/brave-browser-*.list && apt update || echo "Not Needed"
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | Brave | Remove Repo [dnf]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- rm /etc/yum.repos.d/brave-browser-*.repo || echo "Not Needed"
- rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed"
when: ansible_pkg_mgr == "dnf"
- name: Workstation | Software | Brave | Remove Repo [zypper]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- zypper removerepo brave-browser || echo "Not Needed"
- rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed"
+1 -1
View File
@@ -165,7 +165,7 @@
## Test SDK ##
- name: Workstation | Linux | Software | Flutter | Doctor Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become: true
become_user: "{{ user }}"
+4 -4
View File
@@ -1,15 +1,15 @@
# Some Linux distros come with meh DE's, this fixes that.
- name: Workstation | Linux | Software | GNOME | Check (Parrot OS Only)
shell: which gdm3
ansible.builtin.shell: which gdm3
register: gnome_install
when: ansible_distribution in ("Parrot OS")
ignore_errors: true
- name: Workstation | Linux | Software | GNOME | Install
package:
name:
- gnome
name:
- gnome
- gdm3
state: present
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
@@ -20,5 +20,5 @@
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | Exiting
shell: exit 1
ansible.builtin.shell: exit 1
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
+3 -3
View File
@@ -37,17 +37,17 @@
sass_current: sass
- name: Workstation | Linux | Software | Hugo | npm | Gather
shell: npm prefix -g
ansible.builtin.shell: npm prefix -g
register: npm_bin_dir # Provides /usr/local/ on Devuan, /usr/ on Artix.
changed_when: false
- name: Workstation | Linux | Software | Hugo | npm | Remove Old
shell: "npm remove -g {{ sass_old }}"
ansible.builtin.shell: "npm remove -g {{ sass_old }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
- name: Workstation | Linux | Software | Hugo | npm | Install New
shell: "npm install -g {{ sass_current }}"
ansible.builtin.shell: "npm install -g {{ sass_current }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
+2 -2
View File
@@ -22,10 +22,10 @@
- 17
- name: Workstation | Linux | Software | Java | pacman | Set
shell: "archlinux-java set java-{{ jdk_version }}-openjdk"
ansible.builtin.shell: "archlinux-java set java-{{ jdk_version }}-openjdk"
- name: Workstation | Linux | Software | Java | pacman | Link
shell: "ln -sf /usr/lib/jvm {{ jdk_dir }}"
ansible.builtin.shell: "ln -sf /usr/lib/jvm {{ jdk_dir }}"
args:
creates: "{{ jdk_dir }}"
become: true
+2 -2
View File
@@ -43,7 +43,7 @@
ignore_errors: true
- name: Workstation | Linux | Software | Lutris | Add PPA (Debian)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_13/Release.key \
| gpg --dearmor \
@@ -82,7 +82,7 @@
ignore_errors: true
- name: Workstation | Linux | Software | Lutris | Remove PPA (Debian)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mv {{ lutris_source_list }} ~/TRASH/"
- "mv {{ lutris_keyfile }} ~/TRASH/"
+1 -1
View File
@@ -26,7 +26,7 @@
update_cache: true
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
shell: "extrepo enable {{ node_version }}"
ansible.builtin.shell: "extrepo enable {{ node_version }}"
- name: Workstation | Software | NodeJS | apt | Install
package:
@@ -6,7 +6,7 @@
# Needed for dnf packages such as vlc.
# https://docs.fedoraproject.org/en-US/quick-docs/rpmfusion-setup/
- name: Workstation | Linux | Software | Packages | Fedora Fusion Repos
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm"
- "dnf config-manager --enable rpmfusion-free"
@@ -87,7 +87,7 @@
when: ansible_service_mgr != "systemd"
- name: Workstation | Linux | Software | Packages | Install From AUR
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
ansible.builtin.shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop:
- appimagelauncher
when: ansible_pkg_mgr == "pacman"
@@ -96,7 +96,7 @@
ignore_errors: true
- name: Workstation | Linux | Software | Packages | Install From AUR [Coding]
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
ansible.builtin.shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop:
- vscodium-bin
- android-studio
+1 -1
View File
@@ -118,7 +118,7 @@
devuan_tlp_run: "{{ devuan_tlp_dir }}/run"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Create Script
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_tlp_dir }}"
- "echo '#!/bin/sh' > {{ devuan_tlp_run }}"
+5 -5
View File
@@ -7,7 +7,7 @@
# https://mullvad.net/en/help/install-mullvad-app-linux
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
@@ -15,7 +15,7 @@
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
when: ansible_pkg_mgr == "dnf"
@@ -58,7 +58,7 @@
register: mullvad_installed
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_mullvad_dir }}"
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
@@ -88,7 +88,7 @@
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Software | VPN | Mullvad | PATH | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- rm {{ mullvad_exe_new }} || echo "File does not exist."
- echo "#!/usr/bin/env sh" > {{ mullvad_exe_new }}
@@ -111,7 +111,7 @@
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | PATH | Enable Lockdown
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- mullvad lan set block
- mullvad tunnel set ipv6 on
@@ -32,7 +32,7 @@
## Install Repo ##
- name: Workstation | Linux | Software | VS Codium | Add PPA
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
@@ -65,7 +65,7 @@
## Remove Repo ##
- name: Workstation | Linux | Software | VS Codium | Remove PPA
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mv {{ vscodium_source_list }} ~/TRASH/"
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
+2 -2
View File
@@ -73,7 +73,7 @@
block:
- name: Workstation | Account Management | GNOME | Dash To Dock | Check
shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/"
ansible.builtin.shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/"
become: true
become_user: "{{ user }}"
register: dash_to_dock_exists
@@ -101,7 +101,7 @@
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make
shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install"
ansible.builtin.shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install"
become_user: "{{ user }}"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
+1 -1
View File
@@ -2,4 +2,4 @@
# Allow remote viewing desktops via VNC.
- name: General | Software | Services | VNC | TBD
shell: echo "TBD"
ansible.builtin.shell: echo "TBD"
@@ -6,7 +6,7 @@
# are showing up as data files, not plaintext, so just nuking for now.
- name: Workstation | Shared | Settings | XDG Autostart | runit | Disable All
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- mkdir -pv /etc/xdg/autostart/disabled /home/{{ user }}/.config/autostart/disabled
- mv /etc/xdg/autostart/*.desktop /etc/xdg/autostart/disabled/ || echo 'No files to move.'
+2 -2
View File
@@ -50,11 +50,11 @@
## Install ##
- name: Workstation | Linux | Software | DWM | Install
shell: "cd {{ dwm_install_dir }}; {{ make }} clean install"
ansible.builtin.shell: "cd {{ dwm_install_dir }}; {{ make }} clean install"
ignore_errors: true
- name: Workstation | Linux | Software | DWM | Install (st)
shell: "cd {{ st_install_dir }}; {{ make }} clean install"
ansible.builtin.shell: "cd {{ st_install_dir }}; {{ make }} clean install"
ignore_errors: true
+1 -1
View File
@@ -69,7 +69,7 @@
update_cache: true
- name: Workstation | Shared | Software | i3 | Install (yay)
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
ansible.builtin.shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop: "{{ i3_yay_packages }}"
when: ansible_pkg_mgr == "pacman"
become_user: "{{ aur_user }}"