Lol, error was due to the comma after the section name. I must have followed a bad example since documentation does not have them. Refactor file to be config for anything miner related and private.

This commit is contained in:
Hyperling 2021-02-15 16:03:34 -06:00
parent 74eba07622
commit dfe3e285b4
2 changed files with 7 additions and 40 deletions

View File

@ -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"
config_server: 'ling@leet'
config_file_remote: "InstallFiles/Miners/miner.ini"
config_file_local: "{{ user_mfn.home }}/miner.ini"
config_section_wallet: wallet

View File

@ -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 ##