Fix pool debug. Do most nanominer tasks as mfn.

This commit is contained in:
Hyperling 2021-02-15 17:55:23 -06:00
parent ba9745fcd0
commit 3a1bb2ea1d
2 changed files with 17 additions and 8 deletions

View File

@ -36,7 +36,7 @@
- name: Miner | Facts | Pools | Set GPU to Nanopool Eth
set_fact:
cpu_pool: "{{ nanopool_xmr }}"
when: nanominer_cpu == "xmr" and nanominer_gpu_pool == "nanopool"
when: nanominer_cpu == "xmr" and nanominer_cpu_pool == "nanopool"
# GPU #
@ -61,6 +61,7 @@
- name: Miner | Facts | Pools | DEBUG
debug:
var:
var: "{{ item }}"
loop:
- cpu_pool
- gpu_pool

View File

@ -9,10 +9,13 @@
shell: "mkdir -p {{ nanominer_home }}"
- name: Miner | Software | nanominer | Installation | Download Tarball
shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}"
shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}; chmod 777 {{ nanominer_tar_local }}"
- name: Miner | Software | nanominer | Installation | Extract Tarball
shell: "tar -xvfC {{ nanominer_home }} {{ nanominer_tar_local }}"
shell: "tar -xvf {{ nanominer_tar_local }}"
args:
chdir: "{{ nanominer_home }}"
become_user: mfn
@ -41,6 +44,7 @@
create: yes
loop:
- { "algorithm": "RandomX", "wallet": '{{ wallet_xmr }}', "state": "{{ (nanominer_cpu == 'xmr') | ternary('present', 'absent') }}"}
become_user: mfn
when: nanominer_cpu is defined
- name: Miner | Software | nanominer | Configuration | CPU Pools
@ -49,6 +53,7 @@
line: "pool{{item.priority}} = {{ item.name }}"
state: present
loop: "{{ cpu_pool }}"
become_user: mfn
when: nanominer_cpu is defined
# GPU #
@ -70,6 +75,7 @@
create: yes
loop:
- { "algorithm": "Ethash", "wallet": '{{ wallet_eth }}', "state": "{{ (nanominer_gpu == 'eth') | ternary('present', 'absent') }}"}
become_user: mfn
when: nanominer_gpu is defined
- name: Miner | Software | nanominer | Configuration | Add Pools
@ -78,6 +84,7 @@
line: "pool{{item.priority}} = {{ item.name }}"
state: present
loop: "{{ gpu_pool }}"
become_user: mfn
when: nanominer_gpu is defined
@ -101,3 +108,4 @@
marker_end: "exit 0"
state: present
create: yes
become_user: mfn