Migrate set_fact to FQCN.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
ansible.builtin.shell: "scp {{ file_server }}:{{ config_file_remote }} {{ config_file_local }}; chmod 700 {{ config_file_local }}"
|
||||
|
||||
- name: Miner | Facts | Config File | Load Wallets
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
wallet_xmr: "{{ lookup('ini', 'xmr section={{config_section_wallet}} file={{config_file_local}}') }}"
|
||||
wallet_eth: "{{ lookup('ini', 'eth section={{config_section_wallet}} file={{config_file_local}}') }}"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Create arrays of pools per coin.
|
||||
|
||||
- name: Miner | Facts | Pools
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
nanopool_xmr:
|
||||
- { "priority": 1, "name": "xmr-us-east1.nanopool.org:14433" }
|
||||
- { "priority": 2, "name": "xmr-us-west1.nanopool.org:14433" }
|
||||
@@ -34,7 +34,7 @@
|
||||
# CPU #
|
||||
|
||||
- name: Miner | Facts | Pools | Set GPU to Nanopool Eth
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
cpu_pool: "{{ nanopool_xmr }}"
|
||||
when: nanominer_cpu == "xmr" and nanominer_cpu_pool == "nanopool"
|
||||
|
||||
@@ -42,20 +42,20 @@
|
||||
# GPU #
|
||||
|
||||
- name: Miner | Facts | Pools | Set GPU to Nanopool Eth
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
gpu_pool: "{{ nanopool_eth }}"
|
||||
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "nanopool"
|
||||
|
||||
- name: Miner | Facts | Pools | Set GPU to Etherpool Eth
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
gpu_pool: "{{ ethermine_eth }}"
|
||||
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "etherpool"
|
||||
|
||||
- name: Miner | Facts | Pools | Set GPU to F2Pool Eth
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
gpu_pool: "{{ f2pool_eth }}"
|
||||
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "f2pool"
|
||||
|
||||
|
||||
|
||||
|
||||
## Validate ##
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
## Global ##
|
||||
|
||||
- name: Miner | Facts | System | Global 1
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
file_server: '{{ user }}@leet'
|
||||
check_alive_start: "[[ `ps -ef | grep -v 'grep' | grep -v '/bin/sh -c' | grep -v $$ | grep -c '"
|
||||
check_alive_end: "'` == '0' ]] &&"
|
||||
combined_log_file: "{{ user_mfn.home }}/log.txt"
|
||||
|
||||
- name: Miner | Facts | System | Global 2
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
use_combined_log_file: ">> {{ combined_log_file }} 2>&1"
|
||||
|
||||
|
||||
## Config File ##
|
||||
|
||||
- name: Miner | Facts | System | My Config File
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
config_file_remote: "InstallFiles/Miners/miner.ini"
|
||||
config_file_local: "{{ user_mfn.home }}/miner.ini"
|
||||
config_section_wallet: wallet
|
||||
@@ -31,20 +31,20 @@
|
||||
## Nanominer ##
|
||||
|
||||
- name: Miner | Facts | System | nanominer 1
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
nanominer_home: "{{ user_mfn.home }}/nanominer"
|
||||
nanominer_version: "3.4.3" # Download link: https://github.com/nanopool/nanominer/releases
|
||||
nanominer_script: "{{ user_mfn.home }}/nanominer.sh"
|
||||
|
||||
- name: Miner | Facts | System | nanominer 2
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
nanominer_bin: "{{ nanominer_home }}/nanominer-linux-{{ nanominer_version }}"
|
||||
nanominer_tar_remote: "InstallFiles/Miners/nanominer/*{{ nanominer_version }}*.tar.gz"
|
||||
nanominer_config: "{{ nanominer_home }}/config.ini"
|
||||
nanominer_logs: "{{ nanominer_home}}/logs"
|
||||
|
||||
- name: Miner | Facts | System | nanominer 3
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
nanominer_tar_local: "{{ nanominer_bin }}.tar.gz"
|
||||
nanominer_exec: "{{ nanominer_bin }}/nanominer"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
## Miner Array ##
|
||||
|
||||
- name: Miner | Facts | System | Miner Array
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
miners:
|
||||
- { "name": "xmr_stak_cpu", "enabled": '{{ (xmr_stak_cpu != false) }}', "command": "{{ user_mfn.home }}/xmr_stak_cpu.sh {{ use_combined_log_file }}" }
|
||||
- { "name": "ethminer", "enabled": '{{ (ethminer != false) }}', "command": "{{ user_mfn.home }}/ethminer.sh {{ use_combined_log_file }}" }
|
||||
|
||||
Reference in New Issue
Block a user