2018-02-05 12:49:21 -08:00
|
|
|
---
|
2018-02-05 12:52:52 -08:00
|
|
|
- name: Check that node role is correct
|
|
|
|
stat:
|
|
|
|
path: "{{ home }}"
|
|
|
|
register: role_home_folder
|
|
|
|
failed_when: not role_home_folder.stat.exists
|
|
|
|
|
2018-02-05 12:49:21 -08:00
|
|
|
- name: Create directory for backups
|
|
|
|
file: path={{ home }}/backups-node.toml state=directory
|
|
|
|
|
|
|
|
- name: Backup existing version
|
|
|
|
command: cp -a {{ home }}/node.toml {{ home }}/backups-node.toml/node.toml-{{ date }}
|
|
|
|
|
|
|
|
- name: Add min_gas_price to node.toml
|
|
|
|
lineinfile:
|
|
|
|
path: "{{ home }}/node.toml"
|
|
|
|
insertafter: '^\[mining\]'
|
|
|
|
line: "min_gas_price = 1000000000"
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Restart poa-parity service
|
|
|
|
service: name=poa-parity state=restarted enabled=yes
|
|
|
|
|
|
|
|
- name: Restart poa-netstats service
|
|
|
|
service: name=poa-netstats state=restarted enabled=yes
|