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:
- include: tasks/miner/debug.yml
- include: tasks/miner/acct_mgmt/mfn.yml
- include: tasks/miner/acct_mgmt/users.yml
# Installations
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.
## Step 0/3: Dependencies ##
- name: AMDGPU | Find Root Directory
shell: pwd
register: root_home
- name: AMDGPU | Variables
set_fact:
amdgpu_cron_job: AMDGPU - Need To Finish Installation
@ -165,20 +161,20 @@
## Step 3/3: Install AMD PRO 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
- 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
## Only one driver set can exist at a time! ##
#- 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
- 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
- name: AMDGPU | Prepare Cron Job To SCM

View File

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