From 25f81ceec7a3ea3500bc36ab46191fbb29163091 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 11 Feb 2021 12:41:50 -0600 Subject: [PATCH] Give up trying to use cool array in inventory file. --- facts/.fuse_hidden000004ef00000007 | 0 hosts | 2 +- local.yml | 11 ++++------- tasks/miner/debug.yml | 22 ++++++++++++++++++++++ 4 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 facts/.fuse_hidden000004ef00000007 create mode 100644 tasks/miner/debug.yml diff --git a/facts/.fuse_hidden000004ef00000007 b/facts/.fuse_hidden000004ef00000007 new file mode 100644 index 0000000..e69de29 diff --git a/hosts b/hosts index ebb5704..50406c6 100644 --- a/hosts +++ b/hosts @@ -7,4 +7,4 @@ dell-laptop usb [miner] -usb mine["eth"]=true \ No newline at end of file +usb eth=true amdgpu=true \ No newline at end of file diff --git a/local.yml b/local.yml index e13986a..2cb9a44 100644 --- a/local.yml +++ b/local.yml @@ -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 diff --git a/tasks/miner/debug.yml b/tasks/miner/debug.yml new file mode 100644 index 0000000..fc0b95d --- /dev/null +++ b/tasks/miner/debug.yml @@ -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 \ No newline at end of file