Try to do variables in a different way. No idea if it will work.
This commit is contained in:
parent
5a5b799c8a
commit
d8c45fd477
4
hosts
4
hosts
@ -7,5 +7,5 @@ dell-laptop
|
||||
usb
|
||||
|
||||
[miner]
|
||||
usb amdgpu=true
|
||||
x570 eth=nanominer gpu=true amdgpu=true ethminer=true nanominer=true
|
||||
usb driver=[amdgpu] miner=[]
|
||||
x570 driver=[amdgpu] miner=[nanominer,test] nanominer_config={"cpu":"xmr","gpu":"eth","gpus":[1,2,3]}
|
@ -82,19 +82,19 @@
|
||||
### CPU SECTION ###
|
||||
# Monero #
|
||||
- include: tasks/miner/software/xmr-stak-cpu.yml
|
||||
when: xmr_stak_cpu is defined
|
||||
when: "xmr_stak_cpu" in miner
|
||||
|
||||
### GPU Section ###
|
||||
## Drivers ##
|
||||
- include: tasks/miner/drivers/amdgpu.yml
|
||||
when: ansible_distribution == "Ubuntu" and amdgpu is defined
|
||||
when: ansible_distribution == "Ubuntu" and "amdgpu" in driver
|
||||
|
||||
# Ethereum #
|
||||
- include: tasks/miner/software/ethminer.yml
|
||||
when: ethminer is defined
|
||||
when: "ethminer" in miner
|
||||
|
||||
- include: tasks/miner/software/ethminer.yml
|
||||
when: nanominer is defined
|
||||
when: "nanominer" in miner
|
||||
|
||||
# Scheduling
|
||||
post_tasks:
|
||||
|
@ -4,9 +4,9 @@
|
||||
- name: Miner | Account Management | Cron | Miner Names
|
||||
set_fact:
|
||||
miners:
|
||||
- { "name": "xmr_stak_cpu", "enabled": no }
|
||||
- { "name": "ethminer", "enabled": no }
|
||||
#- { "name": "nanominer", "enabled": yes }
|
||||
- { "name": "xmr_stak_cpu", "enabled": ("xmr_stak_cpu" in miner) }
|
||||
- { "name": "ethminer", "enabled": ("ethminer" in miner) }
|
||||
#- { "name": "nanominer", "enabled": ("nanominer" in miner) }
|
||||
|
||||
|
||||
- name: Miner | Account Management | Cron | Stop Jobs
|
||||
|
@ -5,9 +5,6 @@
|
||||
debug:
|
||||
var: "{{ item }}"
|
||||
loop:
|
||||
- xmr
|
||||
- eth
|
||||
- cpu
|
||||
- gpu
|
||||
- amdgpu
|
||||
- nvidia
|
||||
- driver
|
||||
- miner
|
||||
- nanominer_config
|
@ -1,2 +1,35 @@
|
||||
---
|
||||
# Nanominer from nanopool.org
|
||||
|
||||
## Install ##
|
||||
|
||||
|
||||
## Settings ##
|
||||
|
||||
- name: Miner | Software | nanominer | Mine with CPU (Optional)
|
||||
debug:
|
||||
var: nanominer_config.cpu
|
||||
when: nanominer_config.cpu is defined
|
||||
|
||||
- name: Miner | Software | nanominer | Mine with GPU (Optional)
|
||||
debug:
|
||||
var: nanominer_config.gpu
|
||||
when: nanominer_config.gpu is defined
|
||||
|
||||
#- name: Miner | Software | nanominer | Mine with GPU (Optional)
|
||||
# blockinfile:
|
||||
# path: "{{ item }}/.bashrc"
|
||||
# block: |
|
||||
# watchdog = true
|
||||
# marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||
# state: present
|
||||
# create: yes
|
||||
# backup: yes
|
||||
# loop: "{{ nanominer_config.gpu }}"
|
||||
# when: nanominer_config.gpu is defined
|
||||
|
||||
- name: Miner | Software | nanominer | Choose GPUS (Optional)
|
||||
debug:
|
||||
var: "{{ item }}"
|
||||
loop: "{{ nanominer_config.gpus }}"
|
||||
when: nanominer_config.gpus is defined
|
Loading…
x
Reference in New Issue
Block a user