Begin variablizing miner tasks.

This commit is contained in:
Hyperling 2021-02-15 10:23:23 -06:00
parent c2b427cc8f
commit 45884ffd5c
5 changed files with 36 additions and 30 deletions

View File

@ -75,7 +75,7 @@
pre_tasks: pre_tasks:
- include: tasks/miner/debug.yml - include: tasks/miner/debug.yml
- include: tasks/miner/acct_mgmt/mfn.yml - include: tasks/miner/acct_mgmt/users.yml
# Installations # Installations
tasks: tasks:

View File

@ -1,12 +0,0 @@
---
# Account to do mining tasks.
- name: Miner | Account Management | User | Miner Forty Niner
user:
name: mfn
comment: Miner Forty Niner
system: yes
groups:
- video
- render
append: yes

View File

@ -0,0 +1,22 @@
---
# Account to do mining tasks.
## Gather ##
- name: Miner | Account Management | Gather | Find Root Directory
shell: pwd
register: root_home
## Runner ##
- name: Miner | Account Management | Users | MFN
user:
name: mfn
comment: Miner Forty Niner
system: yes
groups:
- video
- render
append: yes
register: user_mfn

View File

@ -2,10 +2,6 @@
# Install OpenCL drivers. # Install OpenCL drivers.
## Step 0/3: Dependencies ## ## Step 0/3: Dependencies ##
- name: AMDGPU | Find Root Directory
shell: pwd
register: root_home
- name: AMDGPU | Variables - name: AMDGPU | Variables
set_fact: set_fact:
amdgpu_cron_job: AMDGPU - Need To Finish Installation amdgpu_cron_job: AMDGPU - Need To Finish Installation
@ -165,20 +161,20 @@
## Step 3/3: Install AMD PRO Driver ## ## Step 3/3: Install AMD PRO Driver ##
- name: AMDGPU | Download Driver - name: AMDGPU | Download Driver
shell: 'scp ling@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz /root/Downloads/' shell: 'scp ling@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz {{ root_home.stdout }}/Downloads/'
when: amdgpu_install.failed when: amdgpu_install.failed
- name: AMDGPU | Extract Tarball - name: AMDGPU | Extract Tarball
shell: 'cd /root/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz' shell: 'cd {{ root_home.stdout }}/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
when: amdgpu_install.failed when: amdgpu_install.failed
## Only one driver set can exist at a time! ## ## Only one driver set can exist at a time! ##
#- name: AMDGPU | Install AMDGPU All Driver #- name: AMDGPU | Install AMDGPU All Driver
# shell: 'cd /root/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y' # shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y'
# when: amdgpu_install.failed # when: amdgpu_install.failed
- name: AMDGPU | Install AMDGPU-Pro Driver - name: AMDGPU | Install AMDGPU-Pro Driver
shell: 'cd /root/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-pro-install -y --opencl=pal,legacy' 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 when: amdgpu_install.failed
- name: AMDGPU | Prepare Cron Job To SCM - name: AMDGPU | Prepare Cron Job To SCM

View File

@ -36,26 +36,26 @@
- name: Ethminer | Remove Git Repo - name: Ethminer | Remove Git Repo
shell: rm -rf ethminer shell: rm -rf ethminer
args: args:
chdir: /root/Downloads chdir: "{{ root_home.stdout }}/Downloads"
ignore_errors: yes ignore_errors: yes
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | Clone Git Repo - name: Ethminer | Clone Git Repo
shell: git clone https://github.com/ethereum-mining/ethminer.git shell: git clone https://github.com/ethereum-mining/ethminer.git
args: args:
chdir: /root/Downloads chdir: "{{ root_home.stdout }}/Downloads"
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | Update Repo's Repos - name: Ethminer | Update Repo's Repos
shell: git submodule update --init --recursive shell: git submodule update --init --recursive
args: args:
chdir: /root/Downloads/ethminer chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | Create Build Folder - name: Ethminer | Create Build Folder
shell: mkdir -p build shell: mkdir -p build
args: args:
chdir: /root/Downloads/ethminer chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | Default Flags - name: Ethminer | Default Flags
@ -90,25 +90,25 @@
-DUSE_SYS_OPENCL={{ sys_opencl_flag }} \ -DUSE_SYS_OPENCL={{ sys_opencl_flag }} \
-DEVBUILD=ON" -DEVBUILD=ON"
args: args:
chdir: /root/Downloads/ethminer/build chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | cmake Build - name: Ethminer | cmake Build
shell: cmake --build . shell: cmake --build .
args: args:
chdir: /root/Downloads/ethminer/build chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed when: ethminer_install.failed
- name: Ethminer | make install - name: Ethminer | make install
shell: make install shell: make install
args: args:
chdir: /root/Downloads/ethminer/build chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed when: ethminer_install.failed
## Personal Script Setup ## ## Personal Script Setup ##
- name: Ethminer | Download Script - name: Ethminer | Download Script
shell: scp ling@leet:InstallFiles/Miners/ethminer/ethminer.sh /home/mfn/ shell: "scp ling@leet:InstallFiles/Miners/ethminer/ethminer.sh {{ user_mfn.home }}/""
- name: Ethminer | CHMod Script - name: Ethminer | CHMod Script
shell: chmod 755 /home/mfn/ethminer.sh shell: "chmod 755 {{ user_mfn.home }}/ethminer.sh"