diff --git a/facts/miner/system.yml b/facts/miner/system.yml index e323f66..0816fee 100644 --- a/facts/miner/system.yml +++ b/facts/miner/system.yml @@ -3,6 +3,7 @@ - name: Miner | Facts | System | Wallet Location set_fact: - wallet_server: 'ling@leet' - wallet_file_remote: "InstallFiles/Miners/wallet.ini" - wallet_file_local: "{{ user_mfn.home }}/wallet.ini" \ No newline at end of file + config_server: 'ling@leet' + config_file_remote: "InstallFiles/Miners/miner.ini" + config_file_local: "{{ user_mfn.home }}/miner.ini" + config_section_wallet: wallet \ No newline at end of file diff --git a/facts/miner/wallet.yml b/facts/miner/wallet.yml index 98d5437..6be6474 100644 --- a/facts/miner/wallet.yml +++ b/facts/miner/wallet.yml @@ -4,49 +4,15 @@ ## Load Config ## - name: Miner | Facts | Config File | Download - shell: "scp {{ wallet_server }}:{{ wallet_file_remote }} {{ wallet_file_local }}; chmod 700 {{ wallet_file_local }}" + shell: "scp {{ config_server }}:{{ config_file_remote }} {{ wallet_file_local }}; chmod 700 {{ config_file_local }}" - name: Miner | Facts | Config File | Load XMR set_fact: - wallet_xmr: "{{ lookup('ini', 'xmr, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load XMR - set_fact: - wallet_xmr: "{{ lookup('ini', 'xmr, section=null, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load XMR - set_fact: - wallet_xmr: "{{ lookup('ini', 'xmr, section=wallet, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load XMR - set_fact: - wallet_xmr: "{{ lookup('ini', 'xmr, section=global, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes + wallet_xmr: "{{ lookup('ini', 'xmr section={{config_section_wallet}} file={{config_file_local}}') }}" - name: Miner | Facts | Config File | Load ETH set_fact: - wallet_eth: "{{ lookup('ini', 'eth, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load ETH - set_fact: - wallet_eth: "{{ lookup('ini', 'eth, section=null, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load ETH - set_fact: - wallet_eth: "{{ lookup('ini', 'eth, section=wallet, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes -- name: Miner | Facts | Config File | Load ETH - set_fact: - wallet_eth: "{{ lookup('ini', 'eth, section=global, file={{wallet_file_local}}') }}" - when: wallet_file_local is file - ignore_errors: yes + wallet_eth: "{{ lookup('ini', 'eth section={{config_section_wallet}} file={{config_file_local}}') }}" ## Verify ##