use backslashes for windows paths

https://docs.ansible.com/ansible/latest/user_guide/windows_usage.html#path-formatting-for-windows

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-07-19 09:33:35 +02:00
parent 42d5dfa5e9
commit a7a3f0f733
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
5 changed files with 20 additions and 18 deletions

View File

@ -2,15 +2,17 @@
beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ beacon_node_repo_branch }}'
beacon_node_service_user_name: 'nimbus'
beacon_node_service_user_pass: '{{ ansible_date_time.epoch | password_hash("sha512") }}'
beacon_node_service_home: 'C:/Users/{{ beacon_node_service_user_name }}'
beacon_node_service_path: '{{ beacon_node_service_home }}/{{ beacon_node_service_name }}'
beacon_node_service_bin_path: '{{ beacon_node_service_path }}/bin'
beacon_node_service_exe: '{{ beacon_node_service_bin_path }}/nimbus_beacon_node.exe'
beacon_node_service_home: 'C:\Users\{{ beacon_node_service_user_name }}'
beacon_node_service_path: '{{ beacon_node_service_home }}\{{ beacon_node_service_name }}'
beacon_node_service_bin_path: '{{ beacon_node_service_path }}\bin'
beacon_node_service_exe: '{{ beacon_node_service_bin_path }}\nimbus_beacon_node.exe'
beacon_node_repo_url: 'https://github.com/status-im/nimbus-eth2.git'
beacon_node_repo_branch: 'stable'
beacon_node_repo_path: '{{ beacon_node_service_path }}/repo'
beacon_node_build_script: '{{ beacon_node_service_path }}/build.sh'
beacon_node_repo_path: '{{ beacon_node_service_path }}\repo'
beacon_node_build_script: '{{ beacon_node_service_path }}\build.sh'
beacon_node_build_frequency: 'daily'
beacon_node_build_start_time: '01:00:00'
# shared testnet name: mainnet, pyrmont, prater, etc.
beacon_node_network: 'mainnet'
@ -20,7 +22,7 @@ beacon_node_subscribe_all: false
beacon_node_doppelganger_detection: true
# Location for all node data
beacon_node_data_path: '{{ beacon_node_service_path }}/data'
beacon_node_data_path: '{{ beacon_node_service_path }}\data'
# For validation
beacon_node_valid_network_names: ["pyrmont", "prater", "mainnet", "steklo", "nocturne"]
@ -28,7 +30,7 @@ beacon_node_valid_network_names: ["pyrmont", "prater", "mainnet", "steklo", "noc
# 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_data_path: '{{ beacon_node_data_path }}\{{ beacon_node_data_folder }}'
#beacon_node_dist_validators_start: ~
#beacon_node_dist_validators_end: ~

View File

@ -32,7 +32,7 @@
- name: Disgusting fix for GCC availability
win_shell: >
sed -i 's#http://repo.msys2.org/#http://mirrors.huaweicloud.com/msys2/#' \
C:/Users/{{ ansible_become_user }}/scoop/buckets/main/bucket/gcc.json
C:\Users\{{ ansible_become_user }}\scoop\buckets\main\bucket\gcc.json
- name: Install GCC to compile Nim
win_shell: 'scoop install --global gcc'
@ -40,7 +40,7 @@
- name: Add GCC to the system wide PATH
win_path:
name: 'PATH'
elements: 'C:/ProgramData/scoop/apps/gcc/current/bin'
elements: 'C:\ProgramData\scoop\apps\gcc\current\bin'
scope: 'machine'
state: 'present'
register: machine_path

View File

@ -9,8 +9,8 @@
arguments: '-c "{{ beacon_node_build_script }} > ./build.log 2>&1'
working_directory: '{{ beacon_node_service_path }}'
triggers:
- type: 'daily'
start_boundary: '2021-01-01T01:00:00'
- type: '{{ beacon_node_build_frequency }}'
start_boundary: '{{ ansible_date_time.date }}T{{ beacon_node_build_start_time }}'
state: 'present'
enabled: true
multiple_instances: 2 # Wait for running task

View File

@ -13,13 +13,13 @@
winsw_service_arguments: |
--non-interactive
--network={{ beacon_node_network }}
--data-dir={{ beacon_node_data_path }}/{{ beacon_node_data_folder }}
--data-dir={{ beacon_node_data_path }}\{{ beacon_node_data_folder }}
{% for url in beacon_node_web3_urls | mandatory %}
--web3-url={{ url | mandatory }}
{% endfor %}
--nat=extip:{{ beacon_node_public_address }}
--log-level={{ beacon_node_log_level }}
--log-file={{ beacon_node_service_path }}/log/nimbus.log
--log-file={{ beacon_node_service_path }}\log\nimbus.log
--tcp-port={{ beacon_node_listening_port }}
--udp-port={{ beacon_node_discovery_port }}
--max-peers={{ beacon_node_max_peers }}

View File

@ -12,18 +12,18 @@
- name: Create folder for SSH authorized keys
win_file:
path: '{{ beacon_node_service_home }}/.ssh'
path: '{{ beacon_node_service_home }}\.ssh'
state: 'directory'
- name: Copy SSH authorized keys from admin
win_copy:
src: 'C:/Users/admin/.ssh/authorized_keys'
dest: '{{ beacon_node_service_home }}/.ssh/authorized_keys'
src: 'C:\Users\admin\.ssh\authorized_keys'
dest: '{{ beacon_node_service_home }}\.ssh\authorized_keys'
remote_src: true
become_user: '{{ beacon_node_service_user_name }}'
- name: Fix permissions on the SSH folder
win_owner:
path: '{{ beacon_node_service_home }}/.ssh'
path: '{{ beacon_node_service_home }}\.ssh'
user: '{{ beacon_node_service_user_name }}'
recurse: true