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
+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"'