51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
---
|
|
- name: Create service directories
|
|
file:
|
|
path: '{{ item.path }}'
|
|
owner: '{{ beacon_node_user }}'
|
|
group: '{{ beacon_node_group }}'
|
|
state: 'directory'
|
|
mode: '{{ item.mode }}'
|
|
with_items:
|
|
- { path: '{{ beacon_node_service_path }}', mode: '0750' }
|
|
- { path: '{{ beacon_node_era_dir_path }}', mode: '0775' }
|
|
- { path: '{{ beacon_node_secrets_path }}', mode: '0700' }
|
|
- { path: '{{ beacon_node_validators_path }}', mode: '0700' }
|
|
- { path: '{{ beacon_node_data_path }}', mode: '0700' }
|
|
|
|
- name: Create netkey file (optional)
|
|
when: beacon_node_netkey is defined
|
|
copy:
|
|
dest: '{{ beacon_node_netkey_path }}'
|
|
content: '{{ beacon_node_netkey }}'
|
|
owner: '{{ beacon_node_user }}'
|
|
group: '{{ beacon_node_group }}'
|
|
mode: 0600
|
|
|
|
- name: Create JWT secret file (optional)
|
|
when: beacon_node_exec_layer_jwt_secret is defined
|
|
copy:
|
|
dest: '{{ beacon_node_exec_layer_jwt_secret_path }}'
|
|
content: '{{ beacon_node_exec_layer_jwt_secret }}'
|
|
owner: '{{ beacon_node_user }}'
|
|
group: '{{ beacon_node_group }}'
|
|
mode: 0400
|
|
|
|
- name: Copy Ansible toggle script
|
|
copy:
|
|
src: 'ansible_toggle.sh'
|
|
dest: '{{ beacon_node_service_path }}/ansible_enabled.sh'
|
|
owner: '{{ beacon_node_user }}'
|
|
group: '{{ beacon_node_group }}'
|
|
mode: 0750
|
|
|
|
- name: Create helper scripts
|
|
template:
|
|
src: '{{ item }}'
|
|
dest: '{{ beacon_node_service_path }}/{{ item|basename|replace(".j2", "") }}'
|
|
owner: '{{ beacon_node_user }}'
|
|
group: '{{ beacon_node_group }}'
|
|
mode: 0775
|
|
with_fileglob:
|
|
- 'templates/scripts/*'
|