mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-23 04:36:40 +00:00
b7dea45ee0
Playbooks for preflight / teardown / install / reset covering the same ground as dev-install.sh, dev-setup.sh, reset-dev-env.sh. Existing bash scripts untouched — decide which to keep after parity testing. - roles/teardown + teardown catalog README track every known state source; add a task + row when a leak is reported. - roles/init gates smoketest on awsgw readiness (describe-regions poll). - roles/smoketest is dup-tolerant, retry-wrapped, auto-terminates the launched instance. - dev-install.yml skips build/install/init when a healthy environment is already present (4-signal health check), always runs smoketest. - dev-reset.yml captures region/az/external-mode scalars from the existing spinifex.toml and replays them into init. Plan: docs/development/improvements/ansible-dev-lifecycle.md (mulga). Bead: mulga-siv-9.
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
---
|
|
- name: build — spinifex (make build)
|
|
ansible.builtin.command:
|
|
cmd: make build
|
|
chdir: "{{ spinifex_root }}"
|
|
changed_when: true
|
|
|
|
- name: build — viperblock nbdkit plugin (make go_build_nbd)
|
|
ansible.builtin.command:
|
|
cmd: make go_build_nbd
|
|
chdir: "{{ mulga_root }}/viperblock"
|
|
changed_when: true
|
|
|
|
- name: build — verify build artifacts present
|
|
ansible.builtin.stat:
|
|
path: "{{ item }}"
|
|
register: build_artifacts
|
|
loop:
|
|
- "{{ spinifex_root }}/bin/spx"
|
|
- "{{ mulga_root }}/viperblock/lib/nbdkit-viperblock-plugin.so"
|
|
|
|
- name: build — assert artifacts exist
|
|
ansible.builtin.assert:
|
|
that: item.stat.exists
|
|
fail_msg: "Missing build artifact: {{ item.item }}"
|
|
loop: "{{ build_artifacts.results }}"
|
|
loop_control:
|
|
label: "{{ item.item }}"
|
|
|
|
- name: build — stage tarball contents (mirrors dev-install.sh)
|
|
ansible.builtin.shell: |
|
|
set -e
|
|
STAGING=$(mktemp -d)
|
|
trap 'rm -rf "$STAGING"' EXIT
|
|
cp "{{ spinifex_root }}/bin/spx" "$STAGING/spx"
|
|
cp "{{ mulga_root }}/viperblock/lib/nbdkit-viperblock-plugin.so" "$STAGING/"
|
|
cp "{{ spinifex_root }}/scripts/setup-ovn.sh" "$STAGING/"
|
|
mkdir -p "$STAGING/systemd"
|
|
cp "{{ spinifex_root }}/build/systemd/"* "$STAGING/systemd/"
|
|
mkdir -p "$STAGING/scripts"
|
|
cp "{{ spinifex_root }}/build/scripts/"* "$STAGING/scripts/"
|
|
cp "{{ spinifex_root }}/build/logrotate/spinifex" "$STAGING/logrotate-spinifex"
|
|
tar czf "{{ build_tarball_path }}" -C "$STAGING" .
|
|
changed_when: true
|
|
|
|
- name: build — summary
|
|
ansible.builtin.debug:
|
|
msg: "Built spx + nbdkit plugin, tarball at {{ build_tarball_path }}"
|