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
|
- name: Miner | Facts | System | Global
|
||||||
set_fact:
|
set_fact:
|
||||||
file_server: 'ling@leet'
|
file_server: 'ling@leet'
|
||||||
check_alive_start: "[[ ps -ef | grep -v 'grep' | grep -c '"
|
check_alive_start: "[[ `ps -ef | grep -v 'grep' | grep -c '"
|
||||||
check_alive_end: "' == '0' ]] && "
|
check_alive_end: "'` == '0' ]] &&"
|
||||||
|
|
||||||
|
|
||||||
## Config File ##
|
## Config File ##
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
# CPU #
|
# CPU #
|
||||||
|
|
||||||
- name: Miner | Software | Nanominer | Configuration | CPU Header Info
|
- name: Miner | Software | Nanominer | Configuration | CPU | Header Info
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: "{{ nanominer_config }}"
|
path: "{{ nanominer_config }}"
|
||||||
block: |
|
block: |
|
||||||
@ -41,7 +41,9 @@
|
|||||||
logpath = {{ nanominer_logs }}
|
logpath = {{ nanominer_logs }}
|
||||||
webPassword = {{ ansible_hostname }}
|
webPassword = {{ ansible_hostname }}
|
||||||
useSSL = true
|
useSSL = true
|
||||||
marker: '; {mark} MANAGED BY ANSIBLE - CPU Headers'
|
marker: ';{mark} MANAGED BY ANSIBLE - CPU Headers'
|
||||||
|
marker_begin: ';;;;;;;;;;;; BEGIN'
|
||||||
|
marker_end: ' END'
|
||||||
state: "{{ item.state }}"
|
state: "{{ item.state }}"
|
||||||
create: yes
|
create: yes
|
||||||
loop:
|
loop:
|
||||||
@ -49,7 +51,7 @@
|
|||||||
become_user: mfn
|
become_user: mfn
|
||||||
when: nanominer_cpu is defined
|
when: nanominer_cpu is defined
|
||||||
|
|
||||||
- name: Miner | Software | Nanominer | Configuration | CPU Pools
|
- name: Miner | Software | Nanominer | Configuration | CPU | Add Pools
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ nanominer_config }}"
|
path: "{{ nanominer_config }}"
|
||||||
line: "pool{{item.priority}} = {{ item.name }}"
|
line: "pool{{item.priority}} = {{ item.name }}"
|
||||||
@ -59,6 +61,15 @@
|
|||||||
become_user: mfn
|
become_user: mfn
|
||||||
when: nanominer_cpu is defined
|
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 #
|
# Add Spacing #
|
||||||
|
|
||||||
- name: Miner | Software | Nanominer | Configuration | Spacing
|
- name: Miner | Software | Nanominer | Configuration | Spacing
|
||||||
@ -66,6 +77,8 @@
|
|||||||
path: "{{ nanominer_config }}"
|
path: "{{ nanominer_config }}"
|
||||||
block: |
|
block: |
|
||||||
;
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
marker: ';'
|
marker: ';'
|
||||||
state: present
|
state: present
|
||||||
create: no
|
create: no
|
||||||
@ -74,7 +87,7 @@
|
|||||||
|
|
||||||
# GPU #
|
# GPU #
|
||||||
|
|
||||||
- name: Miner | Software | Nanominer | Configuration | GPU Header Info
|
- name: Miner | Software | Nanominer | Configuration | GPU | Header Info
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: "{{ nanominer_config }}"
|
path: "{{ nanominer_config }}"
|
||||||
block: |
|
block: |
|
||||||
@ -86,7 +99,9 @@
|
|||||||
webPassword = {{ ansible_hostname }}
|
webPassword = {{ ansible_hostname }}
|
||||||
devices = {{ nanominer_gpus }}
|
devices = {{ nanominer_gpus }}
|
||||||
useSSL = true
|
useSSL = true
|
||||||
marker: '; {mark} MANAGED BY ANSIBLE - GPU Headers'
|
marker: ';{mark} MANAGED BY ANSIBLE - GPU Headers'
|
||||||
|
marker_begin: ';;;;;;;;;;;; BEGIN'
|
||||||
|
marker_end: ' END'
|
||||||
state: "{{ item.state }}"
|
state: "{{ item.state }}"
|
||||||
create: yes
|
create: yes
|
||||||
loop:
|
loop:
|
||||||
@ -94,7 +109,7 @@
|
|||||||
become_user: mfn
|
become_user: mfn
|
||||||
when: nanominer_gpu is defined
|
when: nanominer_gpu is defined
|
||||||
|
|
||||||
- name: Miner | Software | Nanominer | Configuration | Add Pools
|
- name: Miner | Software | Nanominer | Configuration | GPU | Add Pools
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ nanominer_config }}"
|
path: "{{ nanominer_config }}"
|
||||||
line: "pool{{item.priority}} = {{ item.name }}"
|
line: "pool{{item.priority}} = {{ item.name }}"
|
||||||
@ -104,6 +119,15 @@
|
|||||||
become_user: mfn
|
become_user: mfn
|
||||||
when: nanominer_gpu is defined
|
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 ##
|
## Executable ##
|
||||||
|
Loading…
x
Reference in New Issue
Block a user