diff --git a/local.yml b/local.yml index 32cb00a..d94d51c 100644 --- a/local.yml +++ b/local.yml @@ -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: diff --git a/tasks/miner/acct_mgmt/mfn.yml b/tasks/miner/acct_mgmt/mfn.yml deleted file mode 100644 index ff9cb4c..0000000 --- a/tasks/miner/acct_mgmt/mfn.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/tasks/miner/acct_mgmt/users.yml b/tasks/miner/acct_mgmt/users.yml new file mode 100644 index 0000000..d2fb7a1 --- /dev/null +++ b/tasks/miner/acct_mgmt/users.yml @@ -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 \ No newline at end of file diff --git a/tasks/miner/drivers/amdgpu.yml b/tasks/miner/drivers/amdgpu.yml index 4100061..42928a9 100644 --- a/tasks/miner/drivers/amdgpu.yml +++ b/tasks/miner/drivers/amdgpu.yml @@ -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 diff --git a/tasks/miner/software/ethminer.yml b/tasks/miner/software/ethminer.yml index e5736f8..4bea319 100644 --- a/tasks/miner/software/ethminer.yml +++ b/tasks/miner/software/ethminer.yml @@ -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 \ No newline at end of file + shell: "chmod 755 {{ user_mfn.home }}/ethminer.sh" \ No newline at end of file