30 lines
696 B
YAML
30 lines
696 B
YAML
---
|
|
- name: Copy node setup script
|
|
copy:
|
|
src: node_setup.sh
|
|
dest: /root/node_setup.sh
|
|
mode: '0700'
|
|
|
|
- name: Fill SECRET_KEY in script
|
|
lineinfile:
|
|
path: /root/node_setup.sh
|
|
regexp: '^SECRET_KEY=""'
|
|
line: 'SECRET_KEY="{{ node_secret_key }}"'
|
|
|
|
- name: Fill MY_IP in script
|
|
lineinfile:
|
|
path: /root/node_setup.sh
|
|
regexp: '^MY_IP=".*"'
|
|
line: 'MY_IP="{{ node_my_ip }}"'
|
|
|
|
- name: Fill CrowdSec enroll key
|
|
lineinfile:
|
|
path: /root/node_setup.sh
|
|
regexp: '^cscli console enroll.*'
|
|
line: 'cscli console enroll {{ node_crowdsec_enroll }}'
|
|
|
|
- name: Run node setup script
|
|
shell: /root/node_setup.sh
|
|
args:
|
|
creates: /opt/remnanode/docker-compose.yml
|