From f4259bdfe7b8fd684b2197cd994e01ee065bdd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 18 Jul 2022 09:52:45 +0200 Subject: [PATCH] drop pointless shared_ subfolder from data path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was something compied from `nimbus-eth2` repo that has no purpose on server hosts, and makes Ansible rolles more confusing with extra variables. Signed-off-by: Jakub SokoĊ‚owski --- defaults/main.yml | 3 +-- tasks/config.yml | 10 +++++++++- tasks/validators.yml | 2 +- templates/beacon-node.service.j2 | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1d1e7cf..4ca568f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,6 @@ beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ beacon_node_repo_branch }}' beacon_node_service_path: '/data/{{ beacon_node_service_name }}' beacon_node_data_path: '{{ beacon_node_service_path }}/data' -beacon_node_data_folder: 'shared_{{ beacon_node_network }}_0' beacon_node_repo_path: '{{ beacon_node_service_path }}/repo' beacon_node_logs_link: '{{ beacon_node_service_path }}/logs' beacon_node_netkey_path: '{{ beacon_node_data_path }}/netkey' @@ -78,7 +77,7 @@ beacon_node_threads: 1 # Automatically distribute validators beacon_node_dist_validators_enabled: false beacon_node_dist_validators_name: '{{ beacon_node_network }}_deposits' -beacon_node_dist_validators_data_path: '{{ beacon_node_data_path }}/{{ beacon_node_data_folder }}' +beacon_node_dist_validators_path: '{{ beacon_node_data_path }}' #beacon_node_dist_validators_name: ~ #beacon_node_dist_validators_start: ~ #beacon_node_dist_validators_end: ~ diff --git a/tasks/config.yml b/tasks/config.yml index 7879a53..f863619 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -1,11 +1,19 @@ --- - name: Create service directory + file: + path: '{{ beacon_node_service_path }}' + owner: '{{ beacon_node_user }}' + group: '{{ beacon_node_group }}' + state: directory + mode: 0770 + +- name: Create data directory file: path: '{{ beacon_node_data_path }}' owner: '{{ beacon_node_user }}' group: '{{ beacon_node_group }}' state: directory - mode: 0770 + mode: 0700 - name: Create netkey file (optional) copy: diff --git a/tasks/validators.yml b/tasks/validators.yml index 77322b1..ae98bba 100644 --- a/tasks/validators.yml +++ b/tasks/validators.yml @@ -5,7 +5,7 @@ dist_validators_name: '{{ beacon_node_dist_validators_name }}' dist_validators_start: '{{ beacon_node_dist_validators_start | mandatory }}' dist_validators_end: '{{ beacon_node_dist_validators_end | mandatory }}' - dist_validators_data_path: '{{ beacon_node_dist_validators_data_path | mandatory }}' + dist_validators_path: '{{ beacon_node_dist_validators_path | mandatory }}' dist_validators_user: '{{ beacon_node_user }}' - when: dist_validators_deployed is defined diff --git a/templates/beacon-node.service.j2 b/templates/beacon-node.service.j2 index 5c23b0f..d5e08a6 100644 --- a/templates/beacon-node.service.j2 +++ b/templates/beacon-node.service.j2 @@ -15,7 +15,7 @@ Restart=on-failure RestartPreventExitStatus=1031 ExecStart={{ beacon_node_repo_path }}/build/nimbus_beacon_node \ --network={{ beacon_node_network }} \ - --data-dir='{{ beacon_node_data_path }}/{{ beacon_node_data_folder }}' \ + --data-dir={{ beacon_node_data_path }} \ {% if beacon_node_validators_dir != "" %} --validators-dir='{{ beacon_node_validators_dir }}' \ {% endif %}