Skip to content

refactor(ansible): add install script and host playbook, migrate health-check workflow#7053

Merged
xmfcx merged 8 commits intomainfrom
refactor/ansible-add-install-script-and-host-playbook
Apr 23, 2026
Merged

refactor(ansible): add install script and host playbook, migrate health-check workflow#7053
xmfcx merged 8 commits intomainfrom
refactor/ansible-add-install-script-and-host-playbook

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 23, 2026

Summary

  • Step 1 of Simplify ansible entrypoints: rename playbooks and drop setup-dev-env.sh #7052.

  • refactor(ansible): add install script and host dev env playbook

    • ansible/scripts/install-ansible.sh — bootstrap that installs OS prerequisites and ansible 10.x via pipx. Does not install Galaxy collections or invoke any playbook.
    • ansible/playbooks/install_dev_env.yaml — tag-driven host installation playbook. Auto-derives rosdistro from Ubuntu version (22.04 → humble, 24.04 → jazzy). No vars_prompt; selection via --tags/--skip-tags.
  • ci(ansible): rename setup-universe workflow to health-check-ansible

    • File rename: .github/workflows/setup-universe.yamlhealth-check-ansible.yaml.
    • Replaces setup-dev-env.sh invocation with install-ansible.sh + ansible-galaxy + install_dev_env playbook.
    • Job renamed from setup-universe to install-dev-env.
    • Matrix simplified: ros_distro removed (auto-derived from Ubuntu version).

Existing playbooks and setup-dev-env.sh are left in place; subsequent PRs in #7052 will rename and consolidate.

Branch protection

If setup-universe / setup-universe was a required status check, update protection rules to health-check-ansible / install-dev-env after this lands.

Test plan

  • run:health-check label applied; verify health-check-ansible / install-dev-env succeeds on both ubuntu:22.04 and ubuntu:24.04 matrix legs.
  • Confirm rosdistro auto-detection prints correctly in the "Print configuration" task in CI logs.

xmfcx added 2 commits April 23, 2026 11:27
Step 1 of #7052.

- ansible/scripts/install-ansible.sh: bootstrap that installs OS
  prerequisites and ansible 10.x via pipx. Does not install galaxy
  collections or invoke any playbook.
- ansible/playbooks/install_dev_env.yaml: tag-driven host installation
  playbook with no vars_prompt. Auto-derives rosdistro from Ubuntu
  version (22.04 -> humble, 24.04 -> jazzy).

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Step 1 of #7052.

- Rename .github/workflows/setup-universe.yaml to health-check-ansible.yaml.
- Replace setup-dev-env.sh invocation with the new install-ansible.sh +
  ansible-galaxy + install_dev_env playbook flow.
- Drop ros_distro from the matrix; install_dev_env.yaml auto-derives it
  from the Ubuntu version.
- Rename the job from setup-universe to install-dev-env.

Branch protection that referenced "setup-universe / setup-universe" must be
updated to "health-check-ansible / install-dev-env".

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx added the run:health-check Run health-check label Apr 23, 2026
@xmfcx xmfcx self-assigned this Apr 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

xmfcx added 2 commits April 23, 2026 11:42
Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Skip the workflow unless ansible/**, ansible-galaxy-requirements.yaml, or
the workflow itself changed. Matches the pattern in health-check-pr.yaml.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
xmfcx added 4 commits April 23, 2026 11:57
The cuda and tensorrt roles gate devel-package installation on
'install_devel == y' / 'install_devel == N'. universe.yaml previously
supplied this via vars_prompt with default 'y'; install_dev_env.yaml
must do the same explicitly since it has no prompts.

Quoted to avoid PyYAML interpreting bare 'y' as boolean True; yamllint
disable comment because quoted-strings rule does not account for
truthy-ambiguous values.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
- ansible/roles/artifacts/defaults/main.yaml: default data_dir to
  $HOME/autoware_data so the role no longer requires every caller to
  supply it. (var-naming lint suppressed because the role tasks already
  reference {{ data_dir }} unprefixed in 126 places; renaming would be
  a separate cleanup.)
- ansible/playbooks/install_dev_env.yaml: reorder roles so optional
  dev tooling and qt5ct_setup run before runtime deps; drop unused
  tags (base from rmw, core from geographiclib).

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Add actions/cache@v5 for /var/cache/apt/archives and /var/lib/apt/lists,
keyed by the matrix image and a hash of ansible/** files. Disable
docker-clean and set Keep-Downloaded-Packages so apt-get does not
auto-delete cached debs.

Speeds up repeat runs of the multi-GB CUDA/TensorRT installation steps.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Reverts cda320f. The naive cache-on-PR pattern is a no-op across PRs
(no main-side save means each PR starts cold), so it's pure CI overhead.

The full strategy (push-to-main save trigger, single-instance enforcement,
size-bounded discard, plus a separate workflow for artifact caching) is
captured in .claude/todo.md and will land in a follow-up PR.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx merged commit 54adcea into main Apr 23, 2026
16 of 19 checks passed
@xmfcx xmfcx deleted the refactor/ansible-add-install-script-and-host-playbook branch April 23, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants