Make the check alive command a command. Further try to make the config file obvious to read.
This commit is contained in:
parent
fdd1db85e5
commit
eb801e8524
@ -6,8 +6,8 @@
|
||||
- name: Miner | Facts | System | Global
|
||||
set_fact:
|
||||
file_server: 'ling@leet'
|
||||
check_alive_start: "[[ ps -ef | grep -v 'grep' | grep -c '"
|
||||
check_alive_end: "' == '0' ]] && "
|
||||
check_alive_start: "[[ `ps -ef | grep -v 'grep' | grep -c '"
|
||||
check_alive_end: "'` == '0' ]] &&"
|
||||
|
||||
|
||||
## Config File ##
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
# CPU #
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | CPU Header Info
|
||||
- name: Miner | Software | Nanominer | Configuration | CPU | Header Info
|
||||
blockinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
block: |
|
||||
@ -42,6 +42,8 @@
|
||||
webPassword = {{ ansible_hostname }}
|
||||
useSSL = true
|
||||
marker: ';{mark} MANAGED BY ANSIBLE - CPU Headers'
|
||||
marker_begin: ';;;;;;;;;;;; BEGIN'
|
||||
marker_end: ' END'
|
||||
state: "{{ item.state }}"
|
||||
create: yes
|
||||
loop:
|
||||
@ -49,7 +51,7 @@
|
||||
become_user: mfn
|
||||
when: nanominer_cpu is defined
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | CPU Pools
|
||||
- name: Miner | Software | Nanominer | Configuration | CPU | Add Pools
|
||||
lineinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
line: "pool{{item.priority}} = {{ item.name }}"
|
||||
@ -59,6 +61,15 @@
|
||||
become_user: mfn
|
||||
when: nanominer_cpu is defined
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | CPU | End Section
|
||||
lineinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
line: ";;;;;;;;;;;;;"
|
||||
state: present
|
||||
create: no
|
||||
become_user: mfn
|
||||
when: nanominer_cpu is defined
|
||||
|
||||
# Add Spacing #
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | Spacing
|
||||
@ -66,6 +77,8 @@
|
||||
path: "{{ nanominer_config }}"
|
||||
block: |
|
||||
;
|
||||
;
|
||||
;
|
||||
marker: ';'
|
||||
state: present
|
||||
create: no
|
||||
@ -74,7 +87,7 @@
|
||||
|
||||
# GPU #
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | GPU Header Info
|
||||
- name: Miner | Software | Nanominer | Configuration | GPU | Header Info
|
||||
blockinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
block: |
|
||||
@ -87,6 +100,8 @@
|
||||
devices = {{ nanominer_gpus }}
|
||||
useSSL = true
|
||||
marker: ';{mark} MANAGED BY ANSIBLE - GPU Headers'
|
||||
marker_begin: ';;;;;;;;;;;; BEGIN'
|
||||
marker_end: ' END'
|
||||
state: "{{ item.state }}"
|
||||
create: yes
|
||||
loop:
|
||||
@ -94,7 +109,7 @@
|
||||
become_user: mfn
|
||||
when: nanominer_gpu is defined
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | Add Pools
|
||||
- name: Miner | Software | Nanominer | Configuration | GPU | Add Pools
|
||||
lineinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
line: "pool{{item.priority}} = {{ item.name }}"
|
||||
@ -104,6 +119,15 @@
|
||||
become_user: mfn
|
||||
when: nanominer_gpu is defined
|
||||
|
||||
- name: Miner | Software | Nanominer | Configuration | GPU | End Section
|
||||
lineinfile:
|
||||
path: "{{ nanominer_config }}"
|
||||
line: ";;;;;;;;;;;;;"
|
||||
state: present
|
||||
create: no
|
||||
become_user: mfn
|
||||
when: nanominer_gpu is defined
|
||||
|
||||
|
||||
|
||||
## Executable ##
|
||||
|
Loading…
x
Reference in New Issue
Block a user