Skip to content

Move Ansible playbooks into separate directories #1744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: stackhpc/2025.1
Choose a base branch
from

Conversation

Alex-Welsh
Copy link
Member

This change subdivides the playbooks under the etc/kayobe/ansible/ directory into categories based on the content and purpose of the playbook.

The new categories are:

  • pulp
  • ceph
  • vault
  • bao
  • fixes
  • deployment
  • maintenance
  • tools

The changes have been applied using various scripts, a few of which I have refined and added to this PR, namely:

  • tools/get-new-playbook-path.sh - returns the new category of a given playbook
  • tools/magic-symlink-fix.sh - Fixes all the symlinks it can find, using the previous script

@Alex-Welsh Alex-Welsh requested a review from a team as a code owner July 7, 2025 15:48
@product-auto-label product-auto-label bot added size: l documentation Improvements or additions to documentation kayobe-automation workflows Workflow files have been modified labels Jul 7, 2025
@Alex-Welsh Alex-Welsh force-pushed the ansible-directories branch from d6bc9ed to c396e39 Compare July 7, 2025 15:49
100 playbooks in the same directory are hard for human brains to parse.
This change divides them up into sub-directories based on the content of
the playbook. Below is a list of all the new categories.

Pulp
====
pulp-container-publish.yml
pulp-container-sync.yml
pulp-host-image-download.yml
pulp-repo-promote-production.yml
pulp-amphora-image-download.yml
pulp-repo-publish.yml
pulp-artifact-promote.yml
pulp-repo-sync.yml
pulp-artifact-upload.yml
pulp-sync-publish-promote.yml
pulp-auth-proxy.yml

Ceph
====
cephadm-keys.yml
cephadm-pools.yml
cephadm-commands-post.yml
cephadm.yml
cephadm-commands-pre.yml
ceph-enter-maintenance.yml
cephadm-crush-rules.yml
ceph-exit-maintenance.yml
cephadm-deploy.yml
cephadm-ec-profiles.yml
cephadm-gather-keys.yml

Vault
=====
vault-deploy-overcloud.yml
vault-deploy-seed.yml
vault-generate-backend-tls.yml
vault-generate-internal-tls.yml
vault-generate-test-external-tls.yml
vault-unseal-overcloud.yml
vault-unseal-seed.yml
vault-deploy-barbican.yml

Bao
====
openbao-deploy-overcloud.yml
openbao-deploy-seed.yml
openbao-generate-backend-tls.yml
openbao-generate-internal-tls.yml
openbao-generate-test-external-tls.yml
openbao-unseal-overcloud.yml
openbao-unseal-seed.yml
openbao-deploy-barbican.yml

Fixes
=====
ovn-fix-chassis-priorities.yml
run-container-hotfix.yml
fix-grub-rl9.yml
fix-hostname.yml
fix-houston.yml
fix-networking.yml
hotfix-containers.yml
rabbitmq-reset.yml
purge-command-not-found.yml

Deployment
==========
deploy-github-runner.yml
deploy-os-capacity-exporter.yml
deploy-radosgw-usage-exporter.yml
smartmon-tools.yml
wazuh-agent.yml
wazuh-manager.yml
wazuh-secrets.yml
write-github-workflows.yml

Maintenance
===========
nova-compute-disable.yml
nova-compute-drain.yml
nova-compute-enable.yml
reboot.yml
rekey-hosts.yml
reset-bls-entries.yml
stop-openstack-services.yml
pci-passthrough.yml
ubuntu-upgrade.yml
cis.yml
octavia-amphora-image-build.yml
octavia-amphora-image-register.yml

Tools
=====
advise-run.yml
build-ofed-rocky.yml
check-kayobe-version.yml
check-kolla-ansible-version.yml
check-kolla-images-py.yml
check-tags.yml
configure-aio-resources.yml
configure-vxlan.yml
diagnostics.yml
docker-registry-login.yml
firewalld-watchdog.yml
growroot.yml
install-doca.yml
install-pre-commit-hooks.yml
openstack-host-image-upload.yml
prometheus-network-names.yml
prometheus.yml.j2
push-ofed.yml
rsyslog.yml
stackhpc-cloud-tests.yml
Paths edited with a set of commands like this:
grep -rFIl '/cephadm-keys.yml'  tools/ doc/source/ .ansible-lint-ignore etc/ .github/ .automation.conf/ terraform/ | xargs sed -i s:/cephadm-keys.yml:/ceph/cephadm-keys.yml:g

Commands were generated for every playbook using some multiline edits in
vscode
Ansible playbooks have been moved to sub-directories. This has the
potential to break a lot of symlink hooks. To make the transition
easier, this change includes a magic script which will fix symlink
paths.

Also added docs and fixed existing symlink paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kayobe-automation size: l workflows Workflow files have been modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant