34 lines
1.4 KiB
YAML
34 lines
1.4 KiB
YAML
- name: Setup and run fixturnet-laconicd-stack
|
|
hosts: "{{ target_host }}"
|
|
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/home/{{ansible_user}}/bin"
|
|
|
|
tasks:
|
|
- name: Clone the fixturenet-laconicd-stack repo
|
|
command: laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-laconicd-stack --pull
|
|
ignore_errors: yes
|
|
|
|
- name: Setup repos for fixturenet-laconicd
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd setup-repositories
|
|
|
|
- name: Build container images
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild
|
|
|
|
- name: Generate over spec file for laconicd deployment
|
|
template:
|
|
src: "./templates/specs/fixturenet-laconicd-spec.yml.j2"
|
|
dest: "fixturenet-laconicd-spec.yml"
|
|
|
|
- name: Check if the deployment directory exists
|
|
stat:
|
|
path: "fixturenet-laconicd-deployment"
|
|
register: deployment_dir
|
|
|
|
- name: Create the deployment from the spec file
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment
|
|
when: not deployment_dir.stat.exists
|
|
|
|
- name: Start the deployment
|
|
command: laconic-so deployment --dir fixturenet-laconicd-deployment start
|