Give up trying to use cool array in inventory file.

This commit is contained in:
Hyperling 2021-02-11 12:41:50 -06:00
parent 5e9e2b000d
commit 25f81ceec7
4 changed files with 27 additions and 8 deletions

View File

2
hosts
View File

@ -7,4 +7,4 @@ dell-laptop
usb
[miner]
usb mine["eth"]=true
usb eth=true amdgpu=true

View File

@ -70,25 +70,22 @@
become: true
pre_tasks:
- name: What are we mining?
debug:
var: mine
- include: tasks/miner/debug.yml
- include: tasks/miner/acct_mgmt/mfn.yml
tasks:
# Monero
- include: tasks/miner/cpu/xmr.yml
become_user: mfn
when: mine.xmr is defined
when: xmr is defined
# Ethereum
- include: tasks/miner/drivers/amdgpu.yml
when: ansible_distribution == "Ubuntu" and mine.eth is defined
when: ansible_distribution == "Ubuntu" and amdgpu is defined
- include: tasks/miner/gpu/ethminer.yml
become_user: mfn
when: ansible_distribution == "Ubuntu" and mine.eth is defined
when: eth is defined
post_tasks:
- include: tasks/miner/cron/ansible.yml

22
tasks/miner/debug.yml Normal file
View File

@ -0,0 +1,22 @@
---
# Print out all inventory flags associated to mining.
- name: DEBUG | Coin Type | xmr
debug:
var: xmr
- name: DEBUG | Coin Type | eth
debug:
var: eth
- name: DEBUG | System Type | cpu
debug:
var: cpu
- name: DEBUG | System Type | amdgpu
debug:
var: amdgpu
- name: DEBUG | System Type | nvidia
debug:
var: nvidia