diff --git a/docs/run-validator.md b/docs/run-validator.md index 6ddb0d6..aa6a55b 100644 --- a/docs/run-validator.md +++ b/docs/run-validator.md @@ -32,7 +32,6 @@ - [ansible](playbooks/README.md#ansible-installation) - ## Stop SAPO testnet node - Run the following steps in machine where your SAPO testnet validator node is already running (machine 1) @@ -120,7 +119,7 @@ ``` - To get path to the deployment - + ```bash echo $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR ``` diff --git a/playbooks/setup.yml b/playbooks/setup.yml index b3bd354..72d0a29 100644 --- a/playbooks/setup.yml +++ b/playbooks/setup.yml @@ -11,9 +11,14 @@ path: "{{ ansible_env.HOME }}/.laconic-tools/yq" register: yq_file +- name: Detect OS and architecture + set_fact: + yq_os: "{{ 'darwin' if ansible_system == 'Darwin' else 'linux' }}" + yq_arch: "{{ ansible_architecture | regex_replace('x86_64', 'amd64') | regex_replace('aarch64', 'arm64') }}" + - name: Download yq to user's tools directory shell: | - curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o {{ ansible_env.HOME }}/.laconic-tools/yq + curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_{{ yq_os }}_{{ yq_arch }} -o {{ ansible_env.HOME }}/.laconic-tools/yq chmod +x {{ ansible_env.HOME }}/.laconic-tools/yq when: not yq_file.stat.exists args: