testnet-ops/stack-orchestrator-setup/setup-laconic-so.yml

48 lines
1.4 KiB
YAML

- name: Install Docker if it isn't present
import_playbook: setup-docker.yml
- name: Set up Stack Orchestrator
hosts: remote_host
vars:
tasks:
- name: Install jq
apt:
name: jq
state: present
update_cache: yes
become: yes
- name: Ensure that directory ~/bin exists and is writable
file:
path: "{{ ansible_env.HOME }}/bin"
state: directory
mode: '0755'
- name: Download the laconic-so binary
get_url:
url: https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so
dest: "{{ ansible_env.HOME }}/bin/laconic-so"
mode: '0755'
force: yes
- name: Ensure ~/bin is on the PATH in .zshrc
lineinfile:
path: "{{ ansible_env.HOME }}/.zshrc"
regexp: '^export PATH=.*{{ ansible_env.HOME }}/bin'
line: 'export PATH="{{ ansible_env.HOME }}/bin:$PATH"'
state: present
- name: Ensure ~/.laconic-so directory exists
file:
path: "{{ ansible_env.HOME }}/.laconic-so"
state: directory
mode: '0755'
- name: Save the distribution url to ~/.laconic-so directory
copy:
dest: "{{ ansible_env.HOME }}/.laconic-so/config.yml"
content: |
distribution-url: https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so
mode: '0644'