Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e Reviewed-on: #19 Co-authored-by: Nabarun <nabarun@deepstacksoft.com> Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
25 lines
721 B
YAML
25 lines
721 B
YAML
---
|
|
# Setup tasks for all playbooks
|
|
- name: Create tools directory in user's home
|
|
file:
|
|
path: "{{ ansible_env.HOME }}/.laconic-tools"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Check if yq exists
|
|
stat:
|
|
path: "{{ ansible_env.HOME }}/.laconic-tools/yq"
|
|
register: yq_file
|
|
|
|
- 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
|
|
chmod +x {{ ansible_env.HOME }}/.laconic-tools/yq
|
|
when: not yq_file.stat.exists
|
|
args:
|
|
creates: "{{ ansible_env.HOME }}/.laconic-tools/yq"
|
|
|
|
- name: Set yq path variable
|
|
set_fact:
|
|
yq_path: "{{ ansible_env.HOME }}/.laconic-tools/yq"
|