diff --git a/.ansible-lint-ignore b/.ansible-lint-ignore index 4f302a2de..b4b9b80d9 100644 --- a/.ansible-lint-ignore +++ b/.ansible-lint-ignore @@ -1,9 +1,9 @@ # This file contains ignores to rule violations for ansible-lint -etc/kayobe/ansible/vault-deploy-barbican.yml fqcn[action-core] -etc/kayobe/ansible/vault-generate-backend-tls.yml fqcn[action-core] -etc/kayobe/ansible/vault-generate-internal-tls.yml fqcn[action-core] -etc/kayobe/ansible/vault-generate-test-external-tls.yml fqcn[action-core] -etc/kayobe/ansible/rabbitmq-reset.yml command-instead-of-module -etc/kayobe/ansible/ubuntu-upgrade.yml syntax-check[missing-file] -etc/kayobe/ansible/check-kayobe-version.yml command-instead-of-module -etc/kayobe/ansible/check-kolla-ansible-version.yml command-instead-of-module +etc/kayobe/ansible/vault/vault-deploy-barbican.yml fqcn[action-core] +etc/kayobe/ansible/vault/vault-generate-backend-tls.yml fqcn[action-core] +etc/kayobe/ansible/vault/vault-generate-internal-tls.yml fqcn[action-core] +etc/kayobe/ansible/vault/vault-generate-test-external-tls.yml fqcn[action-core] +etc/kayobe/ansible/fixes/rabbitmq-reset.yml command-instead-of-module +etc/kayobe/ansible/maintenance/ubuntu-upgrade.yml syntax-check[missing-file] +etc/kayobe/ansible/tools/check-kayobe-version.yml command-instead-of-module +etc/kayobe/ansible/tools/check-kolla-ansible-version.yml command-instead-of-module diff --git a/.automation.conf/run-books/pulp-sync-content.sh b/.automation.conf/run-books/pulp-sync-content.sh index 97ff18e9f..7499449e7 100755 --- a/.automation.conf/run-books/pulp-sync-content.sh +++ b/.automation.conf/run-books/pulp-sync-content.sh @@ -8,19 +8,19 @@ KAYOBE_AUTOMATION_DIR="$(realpath "${PARENT}/../../.automation")" function main { if [ "${PULP_DO_CONTAINER_SYNC:-}" = true ]; then - ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml' -e stackhpc_pulp_images_kolla_filter="${PULP_KOLLA_FILTER:-}" + ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml' -e stackhpc_pulp_images_kolla_filter="${PULP_KOLLA_FILTER:-}" fi if [ "${PULP_DO_CONTAINER_PUBLISH:-}" = true ]; then - ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml' -e stackhpc_pulp_images_kolla_filter="${PULP_KOLLA_FILTER:-}" + ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml' -e stackhpc_pulp_images_kolla_filter="${PULP_KOLLA_FILTER:-}" fi if [ "${PULP_DO_REPO_SYNC:-}" = true ]; then - ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml' + ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml' fi if [ "${PULP_DO_REPO_PUBLISH:-}" = true ]; then - ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml' + ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml' fi if [ "${PULP_DO_REPO_PROMOTE:-}" = true ]; then - ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp-repo-promote-production.yml' + ${KAYOBE_AUTOMATION_DIR}/scripts/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-promote-production.yml' fi } diff --git a/.github/path-filters.yml b/.github/path-filters.yml index 574969c0c..8943cd97d 100644 --- a/.github/path-filters.yml +++ b/.github/path-filters.yml @@ -10,9 +10,9 @@ aio: &aio - '.github/workflows/stackhpc-build-kayobe-image.yml' - '.github/workflows/stackhpc-pull-request.yml' - 'etc/kayobe/*.yml' - - 'etc/kayobe/ansible/configure-aio-resources.yml' + - 'etc/kayobe/ansible/tools/configure-aio-resources.yml' - 'etc/kayobe/ansible/stackhpc-openstack-tests.yml' - - 'etc/kayobe/ansible/growroot.yml' + - 'etc/kayobe/ansible/tools/growroot.yml' - 'etc/kayobe/ansible/requirements.yml' - 'etc/kayobe/ansible/scripts/aio-init.sh' - 'etc/kayobe/environments/ci-aio/**' diff --git a/.github/workflows/amphora-image-build.yml b/.github/workflows/amphora-image-build.yml index 26bd7cdcd..68c175de1 100644 --- a/.github/workflows/amphora-image-build.yml +++ b/.github/workflows/amphora-image-build.yml @@ -212,7 +212,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && - kayobe playbook run src/kayobe-config/etc/kayobe/ansible/octavia-amphora-image-build.yml -e amphora_image_dest=/opt/kayobe/images/amphora/amphora-x64-haproxy.qcow2 + kayobe playbook run src/kayobe-config/etc/kayobe/ansible/maintenance/octavia-amphora-image-build.yml -e amphora_image_dest=/opt/kayobe/images/amphora/amphora-x64-haproxy.qcow2 env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} @@ -231,7 +231,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/amphora \ -e artifact_tag=${{ steps.image_tag.outputs.image_tag }} \ -e file_regex="*.qcow2" \ diff --git a/.github/workflows/amphora-image-promote.yml b/.github/workflows/amphora-image-promote.yml index 3d1e6b872..1c74242a7 100644 --- a/.github/workflows/amphora-image-promote.yml +++ b/.github/workflows/amphora-image-promote.yml @@ -61,7 +61,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \ -e repository_name="amphora-images-${{ steps.openstack_release.outputs.openstack_release }}" \ -e pulp_base_path="amphora-images/${{ steps.openstack_release.outputs.openstack_release }}" env: diff --git a/.github/workflows/ipa-image-build.yml b/.github/workflows/ipa-image-build.yml index 59162afde..947bc6b78 100644 --- a/.github/workflows/ipa-image-build.yml +++ b/.github/workflows/ipa-image-build.yml @@ -242,7 +242,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/ipa \ -e artifact_type=ipa-images \ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \ @@ -258,7 +258,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/ipa \ -e artifact_type=ipa-images \ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \ @@ -299,7 +299,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/ipa \ -e artifact_type=ipa-images \ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \ @@ -315,7 +315,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/ipa \ -e artifact_type=ipa-images \ -e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \ diff --git a/.github/workflows/ipa-image-promote.yml b/.github/workflows/ipa-image-promote.yml index 4d830796e..4d46ac87e 100644 --- a/.github/workflows/ipa-image-promote.yml +++ b/.github/workflows/ipa-image-promote.yml @@ -76,7 +76,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \ -e artifact_type="ipa-images" \ -e os_distribution='rocky' \ -e os_release='9' @@ -90,7 +90,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \ -e artifact_type="ipa-images" \ -e os_distribution='ubuntu' \ -e os_release='noble' diff --git a/.github/workflows/overcloud-host-image-build.yml b/.github/workflows/overcloud-host-image-build.yml index 54777bd6c..afb3d8e63 100644 --- a/.github/workflows/overcloud-host-image-build.yml +++ b/.github/workflows/overcloud-host-image-build.yml @@ -253,7 +253,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/overcloud-rocky-9 \ -e artifact_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \ -e artifact_type="kayobe-images" \ @@ -269,7 +269,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/tools/openstack-host-image-upload.yml \ -e local_image_path="/opt/kayobe/images/overcloud-rocky-9/overcloud-rocky-9.qcow2" \ -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }} env: @@ -283,7 +283,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/tools/openstack-host-image-upload.yml \ -e local_image_path="/opt/kayobe/images/overcloud-rocky-9/overcloud-rocky-9.qcow2" \ -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }} env: @@ -321,7 +321,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \ -e artifact_path=/opt/kayobe/images/overcloud-ubuntu-noble \ -e artifact_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \ -e artifact_type="kayobe-images" \ @@ -337,7 +337,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/tools/openstack-host-image-upload.yml \ -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-noble/overcloud-ubuntu-noble.qcow2" \ -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }} env: @@ -351,7 +351,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \ + src/kayobe-config/etc/kayobe/ansible/tools/openstack-host-image-upload.yml \ -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-noble/overcloud-ubuntu-noble.qcow2" \ -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }} env: diff --git a/.github/workflows/overcloud-host-image-promote.yml b/.github/workflows/overcloud-host-image-promote.yml index 960dbc0df..b6d97f9ee 100644 --- a/.github/workflows/overcloud-host-image-promote.yml +++ b/.github/workflows/overcloud-host-image-promote.yml @@ -76,7 +76,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \ -e artifact_type="kayobe-images" \ -e os_distribution='rocky' \ -e os_release='9' @@ -90,7 +90,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-artifact-promote.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \ -e artifact_type="kayobe-images" \ -e os_distribution='ubuntu' \ -e os_release='noble' diff --git a/.github/workflows/overcloud-host-image-upload.yml b/.github/workflows/overcloud-host-image-upload.yml index f0b7df009..00ea1af38 100644 --- a/.github/workflows/overcloud-host-image-upload.yml +++ b/.github/workflows/overcloud-host-image-upload.yml @@ -118,7 +118,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ${{ inputs.kayobe-environment }} && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-host-image-download.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-host-image-download.yml \ -e os_distribution="rocky" \ -e os_release="9" env: @@ -163,7 +163,7 @@ jobs: source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ${{ inputs.kayobe-environment }} && kayobe playbook run \ - src/kayobe-config/etc/kayobe/ansible/pulp-host-image-download.yml \ + src/kayobe-config/etc/kayobe/ansible/pulp/pulp-host-image-download.yml \ -e os_distribution="ubuntu" \ -e os_release="noble" env: diff --git a/.github/workflows/package-build-ofed.yml b/.github/workflows/package-build-ofed.yml index 2df246217..a0ff8f586 100644 --- a/.github/workflows/package-build-ofed.yml +++ b/.github/workflows/package-build-ofed.yml @@ -189,7 +189,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-doca-builder && - kayobe playbook run src/kayobe-config/etc/kayobe/ansible/growroot.yml + kayobe playbook run src/kayobe-config/etc/kayobe/ansible/tools/growroot.yml env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} @@ -213,7 +213,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-doca-builder && - kayobe playbook run src/kayobe-config/etc/kayobe/ansible/reset-bls-entries.yml \ + kayobe playbook run src/kayobe-config/etc/kayobe/ansible/maintenance/reset-bls-entries.yml \ -e "reset_bls_host=ofed-builder" env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} @@ -230,7 +230,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-doca-builder && - kayobe playbook run src/kayobe-config/etc/kayobe/ansible/reboot.yml + kayobe playbook run src/kayobe-config/etc/kayobe/ansible/maintenance/reboot.yml env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} @@ -238,7 +238,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-doca-builder && - kayobe playbook run src/kayobe-config/etc/kayobe/ansible/build-ofed-rocky.yml + kayobe playbook run src/kayobe-config/etc/kayobe/ansible/tools/build-ofed-rocky.yml env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} diff --git a/.github/workflows/stackhpc-all-in-one.yml b/.github/workflows/stackhpc-all-in-one.yml index a1c2e78ed..247d03676 100644 --- a/.github/workflows/stackhpc-all-in-one.yml +++ b/.github/workflows/stackhpc-all-in-one.yml @@ -271,7 +271,7 @@ jobs: -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ ${{ steps.kayobe_image.outputs.kayobe_image }} \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/fix-hostname.yml + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/fixes/fix-hostname.yml env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} @@ -282,7 +282,7 @@ jobs: -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ ${{ steps.kayobe_image.outputs.kayobe_image }} \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/reboot.yml -e reboot_with_bootstrap_user=true + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/maintenance/reboot.yml -e reboot_with_bootstrap_user=true env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} @@ -292,7 +292,7 @@ jobs: -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ ${{ steps.kayobe_image.outputs.kayobe_image }} \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml' + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/tools/growroot.yml' env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} @@ -322,7 +322,7 @@ jobs: -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ ${{ steps.kayobe_image.outputs.kayobe_image }} \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/tools/configure-aio-resources.yml env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} @@ -442,7 +442,7 @@ jobs: -v $(pwd)/sct-results:/stack/sct-results \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ $KAYOBE_IMAGE \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-cloud-tests.yml' \ + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/tools/stackhpc-cloud-tests.yml' \ -e sct_version=${{ inputs.stackhpc_cloud_tests_version }} env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} @@ -456,7 +456,7 @@ jobs: -v $(pwd)/diagnostics:/stack/diagnostics \ -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ $KAYOBE_IMAGE \ - /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml' + /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/tools/diagnostics.yml' env: KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }} if: ${{ !cancelled() && steps.tf_apply.outcome == 'success' }} diff --git a/.github/workflows/stackhpc-check-tags.yml b/.github/workflows/stackhpc-check-tags.yml index db2383e21..5f072ba9f 100644 --- a/.github/workflows/stackhpc-check-tags.yml +++ b/.github/workflows/stackhpc-check-tags.yml @@ -53,7 +53,7 @@ jobs: -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ $KAYOBE_IMAGE \ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \ - '$KAYOBE_CONFIG_PATH/ansible/check-kolla-images-py.yml' + '$KAYOBE_CONFIG_PATH/ansible/tools/check-kolla-images-py.yml' - name: Check container image tags run: | @@ -62,4 +62,4 @@ jobs: -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \ $KAYOBE_IMAGE \ /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh \ - '$KAYOBE_CONFIG_PATH/ansible/check-tags.yml' + '$KAYOBE_CONFIG_PATH/ansible/tools/check-tags.yml' diff --git a/.github/workflows/stackhpc-container-image-build.yml b/.github/workflows/stackhpc-container-image-build.yml index 595ab9cd3..8fa2b88f8 100644 --- a/.github/workflows/stackhpc-container-image-build.yml +++ b/.github/workflows/stackhpc-container-image-build.yml @@ -191,7 +191,7 @@ jobs: run: | source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} @@ -274,7 +274,7 @@ jobs: touch image-build-logs/push-failed-images.txt source venvs/kayobe/bin/activate && source src/kayobe-config/kayobe-env --environment ci-builder && - kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/docker-registry-login.yml && + kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/tools/docker-registry-login.yml && while read -r image; do # Retries! diff --git a/doc/source/configuration/cephadm.rst b/doc/source/configuration/cephadm.rst index c4da93c81..03eb65957 100644 --- a/doc/source/configuration/cephadm.rst +++ b/doc/source/configuration/cephadm.rst @@ -99,7 +99,7 @@ Ceph deployment configuration ----------------------------- Default variables for configuring Ceph are provided in -``etc/kayobe/cephadm.yml``. Many of these defaults will be sufficient, +``etc/kayobe/ceph/cephadm.yml``. Many of these defaults will be sufficient, but you will likely need to set ``cephadm_osd_spec`` to define the OSD specification. @@ -513,7 +513,7 @@ Deploy the Ceph services: .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-deploy.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-deploy.yml You can check the status of Ceph via Cephadm on the storage nodes: @@ -526,7 +526,7 @@ cephadm.yml playbook to perform post-deployment configuration: .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm.yml The ``cephadm.yml`` playbook imports various other playbooks, which may also be run individually to perform specific tasks. Note that if you want to deploy @@ -535,7 +535,7 @@ will need to set ``cephadm_bootstrap`` to true. For example: .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm.yml -e cephadm_bootstrap=true + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm.yml -e cephadm_bootstrap=true Configuration generation ------------------------ @@ -544,7 +544,7 @@ Generate keys and configuration for Kolla Ansible: .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-gather-keys.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-gather-keys.yml This will generate Ceph keys and configuration under ``etc/kayobe/environments//kolla/config/``, which should be diff --git a/doc/source/configuration/ci-cd.rst b/doc/source/configuration/ci-cd.rst index 435c114f7..1fe1a658e 100644 --- a/doc/source/configuration/ci-cd.rst +++ b/doc/source/configuration/ci-cd.rst @@ -120,7 +120,7 @@ Runner Deployment 7. If the host is an actual Infra VM then please refer to upstream :kayobe-doc:`Infrastructure VMs ` documentation for additional configuration and steps. -8. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deploy-github-runner.yml` +8. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/deploy-github-runner.yml` 9. Check runners have registered properly by visiting the repository's :code:`Action` tab -> :code:`Runners` -> :code:`Self-hosted runners` @@ -132,7 +132,7 @@ Workflow Deployment 1. Edit :code:`$KAYOBE_CONFIG_PATH/inventory/group_vars/github-writer/writer.yml` in the base configuration making the appropriate changes to your deployments specific needs. See documentation for `stackhpc.kayobe_workflows.github `__. -2. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/write-github-workflows.yml` +2. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/write-github-workflows.yml` 3. Add all required secrets and variables to repository either via the GitHub UI or GitHub CLI (may require repository owner) diff --git a/doc/source/configuration/firewall.rst b/doc/source/configuration/firewall.rst index 37eb857dd..ddffda29a 100644 --- a/doc/source/configuration/firewall.rst +++ b/doc/source/configuration/firewall.rst @@ -374,10 +374,10 @@ be used as follows: .. code-block:: bash # Enable the watchdog BEFORE applying the firewall configuration - kayobe playbook run etc/kayobe/ansible/firewalld-watchdog.yml -l + kayobe playbook run etc/kayobe/ansible/tools/firewalld-watchdog.yml -l # Disable the watchdog after applying the firewall configuration - kayobe playbook run etc/kayobe/ansible/firewalld-watchdog.yml -l -e firewalld_watchdog_state=absent + kayobe playbook run etc/kayobe/ansible/tools/firewalld-watchdog.yml -l -e firewalld_watchdog_state=absent If the firewall rules block connectivity, the second playbook run (disabling the watchdog) will fail. You will still be able to get in after the watchdog diff --git a/doc/source/configuration/lvm.rst b/doc/source/configuration/lvm.rst index bb2b7862c..81c96f547 100644 --- a/doc/source/configuration/lvm.rst +++ b/doc/source/configuration/lvm.rst @@ -95,4 +95,4 @@ hosts: mkdir -p $KAYOBE_CONFIG_PATH/hooks/overcloud-host-configure/pre.d cd $KAYOBE_CONFIG_PATH/hooks/overcloud-host-configure/pre.d - ln -s ../../../ansible/growroot.yml 30-growroot.yml + ln -s ../../../ansible/tools/growroot.yml 30-growroot.yml diff --git a/doc/source/configuration/monitoring.rst b/doc/source/configuration/monitoring.rst index 931324e31..d875a2b5e 100644 --- a/doc/source/configuration/monitoring.rst +++ b/doc/source/configuration/monitoring.rst @@ -27,7 +27,7 @@ after deployment: .. code-block:: console cd $KAYOBE_CONFIG_PATH - kayobe playbook run ansible/rsyslog.yml + kayobe playbook run ansible/tools/rsyslog.yml `Prometheus `__ comes with a comprehensive set of metrics gathered from enabled exporters; every exporter's data is visualised @@ -76,7 +76,7 @@ on the overcloud hosts: .. code-block:: console (kayobe) [stack@node ~]$ cd etc/kayobe - (kayobe) [stack@node kayobe]$ kayobe playbook run ansible/smartmon-tools.yml + (kayobe) [stack@node kayobe]$ kayobe playbook run ansible/deployment/smartmon-tools.yml SMART reporting should now be enabled along with a Prometheus alert for unhealthy disks and a Grafana dashboard called ``Hardware Overview``. @@ -194,7 +194,7 @@ via Kayobe. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deploy-os-capacity-exporter.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/deploy-os-capacity-exporter.yml If you notice ``HaproxyServerDown`` or ``HaproxyBackendDown`` prometheus alerts after deployment it's likely the os_exporter secrets have not been @@ -217,7 +217,7 @@ To enable the change: .. code-block:: console - kayobe playbook run etc/kayobe/ansible/prometheus-network-names.yml + kayobe playbook run etc/kayobe/ansible/tools/prometheus-network-names.yml kayobe overcloud service reconfigure --kt prometheus This first generates a template based on the prometheus.yml.j2 diff --git a/doc/source/configuration/openbao.rst b/doc/source/configuration/openbao.rst index 87d1c1435..da3f49290 100644 --- a/doc/source/configuration/openbao.rst +++ b/doc/source/configuration/openbao.rst @@ -68,7 +68,7 @@ Setup OpenBao on the seed node .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-deploy-seed.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-deploy-seed.yml 2. Encrypt generated certs/keys with ansible-vault (use proper location of vault password file) @@ -93,7 +93,7 @@ Setup OpenBao HA on the overcloud hosts .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-deploy-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-deploy-overcloud.yml 2. Encrypt overcloud openbao keys (use proper location of vault password file) @@ -131,7 +131,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-deploy-seed.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-deploy-seed.yml 3. Encrypt generated key with ansible-vault (use proper location of vault password file) @@ -150,7 +150,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-deploy-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-deploy-overcloud.yml 5. Restart the containers to use the new certificate: @@ -162,7 +162,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-unseal-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-unseal-overcloud.yml Certificates generation ======================= @@ -174,7 +174,7 @@ Certificates generation .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-unseal-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-unseal-overcloud.yml Create the external TLS certificates (testing only) --------------------------------------------------- @@ -189,7 +189,7 @@ For test and development purposes it is possible to use OpenBao as a CA for the .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-generate-test-external-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-generate-test-external-tls.yml 2. Use ansible-vault to encrypt the PEM bundle in $KAYOBE_CONFIG_PATH/kolla/certificates/haproxy.pem. Commit the PEM bundle to the kayobe configuration. @@ -210,7 +210,7 @@ Create the internal TLS certificates .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-generate-internal-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-generate-internal-tls.yml 2. Use ansible-vault to encrypt the PEM bundle in $KAYOBE_CONFIG_PATH/kolla/certificates/haproxy-internal.pem. Commit the PEM bundle and root CA to the kayobe configuration. @@ -231,7 +231,7 @@ Create the backend TLS and RabbitMQ TLS certificates .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-generate-backend-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-generate-backend-tls.yml 2. Use ansible-vault to encrypt the keys in $KAYOBE_CONFIG_PATH/kolla/certificates/-key.pem. Commit the certificates and keys to the kayobe configuration. @@ -400,7 +400,7 @@ Create required configuration in OpenBao .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/openbao-deploy-barbican.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/bao/openbao-deploy-barbican.yml Add secrets_barbican_approle_id to secrets ------------------------------------------ diff --git a/doc/source/configuration/release-train.rst b/doc/source/configuration/release-train.rst index 3d65a933f..4abc3c1d9 100644 --- a/doc/source/configuration/release-train.rst +++ b/doc/source/configuration/release-train.rst @@ -233,17 +233,17 @@ A typical workflow to sync all packages and containers is as follows: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml Once the content has been tested in a test/staging environment, it may be promoted to production: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-promote-production.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-promote-production.yml Synchronising all Kolla container images can take a long time. A limited list of images can be synchronised using the ``stackhpc_pulp_images_kolla_filter`` @@ -253,7 +253,7 @@ For example: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml -e stackhpc_pulp_images_kolla_filter='"^glance nova-compute$"' + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml -e stackhpc_pulp_images_kolla_filter='"^glance nova-compute$"' Initial seed deployment ----------------------- @@ -265,8 +265,8 @@ has not yet been deployed. This can be avoided with the following workflow: .. code-block:: console kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml kayobe seed service deploy Working with pulp diff --git a/doc/source/configuration/security-hardening.rst b/doc/source/configuration/security-hardening.rst index 633960716..9a2387a2d 100644 --- a/doc/source/configuration/security-hardening.rst +++ b/doc/source/configuration/security-hardening.rst @@ -46,7 +46,7 @@ whether or not workloads or API requests are affected by any configuration chang .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cis.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/cis.yml Targetting additional hosts --------------------------- diff --git a/doc/source/configuration/vault.rst b/doc/source/configuration/vault.rst index 126f5adc8..633ad02b2 100644 --- a/doc/source/configuration/vault.rst +++ b/doc/source/configuration/vault.rst @@ -75,7 +75,7 @@ Setup Vault on the seed node .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-deploy-seed.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-deploy-seed.yml 2. Encrypt generated certs/keys with ansible-vault (use proper location of vault password file) @@ -100,7 +100,7 @@ Setup Vault HA on the overcloud hosts .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-deploy-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-deploy-overcloud.yml 2. Encrypt overcloud vault keys (use proper location of vault password file) @@ -138,7 +138,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-deploy-seed.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-deploy-seed.yml 3. Encrypt generated key with ansible-vault (use proper location of vault password file) @@ -157,7 +157,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-deploy-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-deploy-overcloud.yml 5. Restart the containers to use the new certificate: @@ -169,7 +169,7 @@ cannot be unsealed with an expired certificate. .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-unseal-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-unseal-overcloud.yml Certificates generation ======================= @@ -181,7 +181,7 @@ Certificates generation .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-unseal-overcloud.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-unseal-overcloud.yml Create the external TLS certificates (testing only) --------------------------------------------------- @@ -196,7 +196,7 @@ For test and development purposes it is possible to use Vault as a CA for the ex .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-generate-test-external-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-generate-test-external-tls.yml 2. Use ansible-vault to encrypt the PEM bundle in $KAYOBE_CONFIG_PATH/kolla/certificates/haproxy.pem. Commit the PEM bundle to the kayobe configuration. @@ -217,7 +217,7 @@ Create the internal TLS certificates .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-generate-internal-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-generate-internal-tls.yml 2. Use ansible-vault to encrypt the PEM bundle in $KAYOBE_CONFIG_PATH/kolla/certificates/haproxy-internal.pem. Commit the PEM bundle and root CA to the kayobe configuration. @@ -238,7 +238,7 @@ Create the backend TLS and RabbitMQ TLS certificates .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-generate-backend-tls.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-generate-backend-tls.yml 2. Use ansible-vault to encrypt the keys in $KAYOBE_CONFIG_PATH/kolla/certificates/-key.pem. Commit the certificates and keys to the kayobe configuration. @@ -407,7 +407,7 @@ Create required configuration in Vault .. code-block:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault-deploy-barbican.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/vault/vault-deploy-barbican.yml Add secrets_barbican_approle_id to secrets ------------------------------------------ diff --git a/doc/source/configuration/wazuh.rst b/doc/source/configuration/wazuh.rst index a4ecedf93..a25766e14 100644 --- a/doc/source/configuration/wazuh.rst +++ b/doc/source/configuration/wazuh.rst @@ -18,9 +18,9 @@ The short version ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/wazuh-manager``, in particular the defaults assume that the ``provision_oc_net`` network will be used. -#. Generate secrets: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml`` -#. Deploy the Wazuh manager: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml`` -#. Deploy the Wazuh agents: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml`` +#. Generate secrets: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-secrets.yml`` +#. Deploy the Wazuh manager: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml`` +#. Deploy the Wazuh agents: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-agent.yml`` Wazuh Manager Host @@ -211,7 +211,7 @@ Edit the playbook and variables to your needs: Wazuh manager configuration --------------------------- -Wazuh manager playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml``. +Wazuh manager playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml``. Running this playbook will: * generate certificates for wazuh-manager @@ -237,7 +237,7 @@ You may need to modify some of the variables, including: Files which values can be overridden (in the context of Wazuh): - $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh/wazuh-manager/wazuh-manager - - $KAYOBE_CONFIG_PATH/wazuh-manager.yml + - $KAYOBE_CONFIG_PATH/deployment/wazuh-manager.yml - $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh/wazuh-agent/wazuh-agent You'll need to run ``wazuh-manager.yml`` playbook again to apply customisation. @@ -246,40 +246,40 @@ Secrets ------- Wazuh requires that secrets or passwords are set for itself and the services with which it communiticates. -Wazuh secrets playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml``. +Wazuh secrets playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-secrets.yml``. Running this playbook will generate and put pertinent security items into secrets -vault file which will be placed in ``$KAYOBE_CONFIG_PATH/wazuh-secrets.yml``. -If using environments it ends up in ``$KAYOBE_CONFIG_PATH/environments//wazuh-secrets.yml`` +vault file which will be placed in ``$KAYOBE_CONFIG_PATH/deployment/wazuh-secrets.yml``. +If using environments it ends up in ``$KAYOBE_CONFIG_PATH/environments//deployment/wazuh-secrets.yml`` Remember to encrypt! -Wazuh secrets template is located in ``$KAYOBE_CONFIG_PATH/ansible/templates/wazuh-secrets.yml.j2``. +Wazuh secrets template is located in ``$KAYOBE_CONFIG_PATH/ansible/templates/deployment/wazuh-secrets.yml.j2``. It will be used by wazuh secrets playbook to generate wazuh secrets vault file. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-secrets.yml .. note:: Use ``ansible-vault`` to view the secrets: - ``ansible-vault view --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/wazuh-secrets.yml`` + ``ansible-vault view --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/deployment/wazuh-secrets.yml`` Configure Wazuh Dashboard's Server Host --------------------------------------- It is common to want to configure the Wazuh dashboard to serve on a different network than the overcloud provisioning network used for Wazuh's internal communication. -In order to do so, either create or edit the ``$KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/wazuh-manager.yml`` configuration file to include the dashboard variable: +In order to do so, either create or edit the ``$KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/deployment/wazuh-manager.yml`` configuration file to include the dashboard variable: .. code-block:: yaml - :caption: $KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/wazuh-manager.yml + :caption: $KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/deployment/wazuh-manager.yml dashboard_server_host: "{{ _net_name | net_ip }}" For example: .. code-block:: yaml - :caption: $KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/wazuh-manager.yml + :caption: $KAYOBE_CONFIG_PATH/environments//inventory/group_vars/wazuh-manager/deployment/wazuh-manager.yml dashboard_server_host: "{{ public_net_name | net_ip }}" @@ -288,7 +288,7 @@ If this is being added post deployment the user will be required to re-run the ` .. code-block:: bash :caption: Deploy or re-run the ``wazuh-manager.yml`` ansible playbook to apply changes made to the configuration. - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml More on the deployment of Wazuh dashboard can be found below in the :ref:`subsequent section `. @@ -357,7 +357,7 @@ Deploy Deploy Wazuh manager: -``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml`` +``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml`` If you are using the wazuh generated certificates, this will result in the creation of some certificates and keys (in case of custom certs adjust path to it). @@ -377,7 +377,7 @@ Verification The Wazuh portal should be accessible on port 443 of the Wazuh manager’s IPs (using HTTPS, with the root CA cert in ``$KAYOBE_CONFIG_PATH/ansible/wazuh/certificates/wazuh-certificates/root-ca.pem``). The first login should be as the admin user, -with the opendistro_admin_password password in ``$KAYOBE_CONFIG_PATH/wazuh-secrets.yml``. +with the opendistro_admin_password password in ``$KAYOBE_CONFIG_PATH/deployment/wazuh-secrets.yml``. This will create the necessary indices. Troubleshooting @@ -387,7 +387,7 @@ Logs are in ``/var/log/wazuh-indexer/wazuh.log``. There are also logs in the jou Wazuh agents ============ -Wazuh agent playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml``. +Wazuh agent playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-agent.yml``. Wazuh agent variables file is located in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-agent/wazuh-agent``. @@ -397,7 +397,7 @@ You may need to modify some variables, including: Deploy the Wazuh agents: -``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml`` +``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-agent.yml`` The Wazuh Agent is deployed to all hosts in the ``wazuh-agent`` inventory group, comprising the ``seed`` group diff --git a/doc/source/contributor/environments/aufn-ceph.rst b/doc/source/contributor/environments/aufn-ceph.rst index f96245bf2..537dd6631 100644 --- a/doc/source/contributor/environments/aufn-ceph.rst +++ b/doc/source/contributor/environments/aufn-ceph.rst @@ -119,10 +119,10 @@ We can now sync the contents of the local pulp server with that of SMS test pulp .. parsed-literal:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml kayobe seed service deploy With the seed VM configured, we use Tenks_ to deploy an additional set of VMs on the same baremetal node and configure them as 'virual baremetal' hosts in order to replicate a true multi-node kayobe deployment within a single node. @@ -146,8 +146,8 @@ These nodes can then be provisioned as overcloud control, compute and storage ho kayobe overcloud hardware inspect kayobe overcloud provision kayobe overcloud host configure - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-gather-keys.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-gather-keys.yml kayobe overcloud container image pull kayobe overcloud service deploy source $KOLLA_CONFIG_PATH/public-openrc.sh diff --git a/doc/source/contributor/environments/ci-aio.rst b/doc/source/contributor/environments/ci-aio.rst index ace880658..c00c45734 100644 --- a/doc/source/contributor/environments/ci-aio.rst +++ b/doc/source/contributor/environments/ci-aio.rst @@ -173,13 +173,13 @@ If using an LVM-based image, grow the root volume group. .. parsed-literal:: - kayobe playbook run etc/kayobe/ansible/growroot.yml + kayobe playbook run etc/kayobe/ansible/tools/growroot.yml On Ubuntu systems, purge the command-not-found package. .. parsed-literal:: - kayobe playbook run etc/kayobe/ansible/purge-command-not-found.yml + kayobe playbook run etc/kayobe/ansible/fixes/purge-command-not-found.yml Next, configure the host OS & services. diff --git a/doc/source/contributor/environments/ci-builder.rst b/doc/source/contributor/environments/ci-builder.rst index c22089ada..5e114deee 100644 --- a/doc/source/contributor/environments/ci-builder.rst +++ b/doc/source/contributor/environments/ci-builder.rst @@ -129,13 +129,13 @@ If using an LVM-based image, grow the root volume group. .. parsed-literal:: - kayobe playbook run etc/kayobe/ansible/growroot.yml -e growroot_group=seed + kayobe playbook run etc/kayobe/ansible/tools/growroot.yml -e growroot_group=seed On Ubuntu systems, purge the command-not-found package. .. parsed-literal:: - kayobe playbook run etc/kayobe/ansible/purge-command-not-found.yml + kayobe playbook run etc/kayobe/ansible/fixes/purge-command-not-found.yml Next, configure the host OS & services. @@ -176,7 +176,7 @@ To deploy the proxy: .. parsed-literal:: - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-auth-proxy.yml Building images =============== diff --git a/doc/source/contributor/environments/ci-multinode.rst b/doc/source/contributor/environments/ci-multinode.rst index 9041ea66e..06509ce86 100644 --- a/doc/source/contributor/environments/ci-multinode.rst +++ b/doc/source/contributor/environments/ci-multinode.rst @@ -37,10 +37,10 @@ is not enabled by default. To enable it, set the following in If you are working on an existing deployment, you need to do the following first. -1. Create CephFS pools: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-pools.yml`` -2. Create cephx key for Manila: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-keys.yml`` -3. Run Manila related Ceph commands: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-commands-post.yml`` -4. Gather Ceph configuration and keyring for Manila: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-gather-keys.yml`` +1. Create CephFS pools: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-pools.yml`` +2. Create cephx key for Manila: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-keys.yml`` +3. Run Manila related Ceph commands: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-commands-post.yml`` +4. Gather Ceph configuration and keyring for Manila: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-gather-keys.yml`` 5. Configure Storage network on Seed node: ``kayobe seed host configure -t network,ip-allocation,snat`` Then, run ``kayobe overcloud service deploy`` to deploy Manila. @@ -342,15 +342,15 @@ Create and encrypt the Wazuh secrets .. code-block:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml - ansible-vault encrypt --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/environments/ci-multinode/wazuh-secrets.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-secrets.yml + ansible-vault encrypt --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/environments/ci-multinode/deployment/wazuh-secrets.yml Run the Wazuh manager and agent deployment playbooks: .. code-block:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-agent.yml Wazuh should now be fully deployed. To test the service, you can use sshuttle or some other forwarding protocol to access the Wazuh dashboard. @@ -370,7 +370,7 @@ The default username is ``admin`` and the password is the .. code-block:: bash - ansible-vault view $KAYOBE_CONFIG_PATH/environments/ci-multinode/wazuh-secrets.yml --vault-password-file ~/vault.password | grep opendistro_admin_password + ansible-vault view $KAYOBE_CONFIG_PATH/environments/ci-multinode/deployment/wazuh-secrets.yml --vault-password-file ~/vault.password | grep opendistro_admin_password If the deployment has been successful, you should be able to see a Wazuh agent for each host in your deployment (aside from the Wazuh manager itself). diff --git a/doc/source/contributor/ofed.rst b/doc/source/contributor/ofed.rst index cbd57b421..6fea24fa1 100644 --- a/doc/source/contributor/ofed.rst +++ b/doc/source/contributor/ofed.rst @@ -61,8 +61,8 @@ by running: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml DOCA repositories can be templated to hosts by running Kayobe host configure. @@ -83,14 +83,14 @@ to be reset before rebooting. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reset-bls-entries.yml -e reset_bls_host=mlnx + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reset-bls-entries.yml -e reset_bls_host=mlnx The hosts can now be rebooted to use the latest kernel, a rolling reboot may be applicable here to reduce distruptions. See the `package updates documentation `. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit mlnx + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml --limit mlnx install-doca ------------ @@ -101,4 +101,4 @@ playbook: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/install-doca.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/tools/install-doca.yml diff --git a/doc/source/contributor/package-updates.rst b/doc/source/contributor/package-updates.rst index 8c46a1420..cb4450eff 100644 --- a/doc/source/contributor/package-updates.rst +++ b/doc/source/contributor/package-updates.rst @@ -85,7 +85,7 @@ To manually test the changes, there is a comprehensive guide to set up a Multino kayobe seed host command run -b --show-output --command "dnf list installed kernel" kayobe seed host command run -b --show-output --command "uname -a" - kayobe playbook run --limit seed,overcloud $KAYOBE_CONFIG_PATH/ansible/reboot.yml + kayobe playbook run --limit seed,overcloud $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml * The tempest tests run automatically at the end of the multinode deployment script. If you have the time, it is worth fixing any failing tests you can so that there is greater coverage for the package updates. (Also remember to propose these fixes in the relevant repos where applicable.) @@ -128,15 +128,15 @@ Perform a rolling reboot of hosts: # Reboot controller instances and zeroth compute instance (seed-hypervisor) export ANSIBLE_SERIAL=1 - (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit controllers - (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit compute[0] + (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml --limit controllers + (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml --limit compute[0] # Test live migration (seed) openstack server create --image cirros --flavor m1.tiny --network external --hypervisor-hostname --os-compute-api-version 2.74 server1 (seed) openstack server migrate --live-migration server1 (seed) watch openstack server show server1 - (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit compute[1] + (seed-hypervisor) kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml --limit compute[1] # Try and migrate back (seed) openstack server migrate --live-migration server1 diff --git a/doc/source/contributor/pre-commit.rst b/doc/source/contributor/pre-commit.rst index dc9f691bf..59f09d62d 100644 --- a/doc/source/contributor/pre-commit.rst +++ b/doc/source/contributor/pre-commit.rst @@ -29,12 +29,12 @@ Once done you should find `pre-commit` is available within the `kayobe` virtuale To run the playbook using the following command -- ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/install-pre-commit-hooks.yml`` +- ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/tools/install-pre-commit-hooks.yml`` Whereas to run the playbook when control host bootstrap runs ensure it registered as symlink using the following command - ``mkdir -p $KAYOBE_CONFIG_PATH/hooks/control-host-bootstrap/post.d`` -- ``ln -s $KAYOBE_CONFIG_PATH/ansible/install-pre-commit-hooks.yml $KAYOBE_CONFIG_PATH/hooks/control-host-bootstrap/post.d/install-pre-commit-hooks.yml`` +- ``ln -s $KAYOBE_CONFIG_PATH/ansible/tools/install-pre-commit-hooks.yml $KAYOBE_CONFIG_PATH/hooks/control-host-bootstrap/post.d/tools/install-pre-commit-hooks.yml`` All that remains is the installation of the hooks themselves which can be accomplished either by running `pre-commit run` or using `git commit` when you have changes that need to be committed. diff --git a/doc/source/contributor/testing-ci-automation.rst b/doc/source/contributor/testing-ci-automation.rst index 6fc1be3f7..f1559a61b 100644 --- a/doc/source/contributor/testing-ci-automation.rst +++ b/doc/source/contributor/testing-ci-automation.rst @@ -83,8 +83,8 @@ jobs: present in the ``stackhpc-dev`` namespace in Ark. Uses the ``.github/workflows/stackhpc-check-tags.yml`` reusable workflow, - which runs the ``etc/kayobe/ansible/check-tags.yml`` and - ``etc/kayobe/ansible/check-kolla-images-py.yml`` playbooks. + which runs the ``etc/kayobe/ansible/tools/check-tags.yml`` and + ``etc/kayobe/ansible/tools/check-kolla-images-py.yml`` playbooks. ``aio [upgrade] ( )`` Runs an all-in-one OpenStack deployment test. Various jobs are run using different parameters. diff --git a/doc/source/operations/bifrost-hardware-inventory-management.rst b/doc/source/operations/bifrost-hardware-inventory-management.rst index 673041819..eb900721b 100644 --- a/doc/source/operations/bifrost-hardware-inventory-management.rst +++ b/doc/source/operations/bifrost-hardware-inventory-management.rst @@ -215,7 +215,7 @@ into ``$KAYOBE_CONFIG_PATH/overcloud-introspection-data``: Using ADVise ------------ -The Ansible playbook ``advise-run.yml`` can be found at ``$KAYOBE_CONFIG_PATH/ansible/advise-run.yml``. +The Ansible playbook ``advise-run.yml`` can be found at ``$KAYOBE_CONFIG_PATH/ansible/tools/advise-run.yml``. The playbook will: @@ -226,7 +226,7 @@ The playbook will: .. code-block:: console cd $KAYOBE_CONFIG_PATH - ansible-playbook $KAYOBE_CONFIG_PATH/ansible/advise-run.yml + ansible-playbook $KAYOBE_CONFIG_PATH/ansible/tools/advise-run.yml The playbook has the following optional parameters: diff --git a/doc/source/operations/ceph-management.rst b/doc/source/operations/ceph-management.rst index 98988959b..a212bfc58 100644 --- a/doc/source/operations/ceph-management.rst +++ b/doc/source/operations/ceph-management.rst @@ -11,9 +11,9 @@ please refer to :ref:`cephadm-kayobe` documentation. Cephadm configuration location ------------------------------ -In kayobe-config repository, under ``$KAYOBE_CONFIG_PATH/cephadm.yml`` (or in a specific +In kayobe-config repository, under ``$KAYOBE_CONFIG_PATH/ceph/cephadm.yml`` (or in a specific Kayobe environment when using multiple environment, e.g. -``$KAYOBE_CONFIG_PATH/environments//cephadm.yml``) +``$KAYOBE_CONFIG_PATH/environments//ceph/cephadm.yml``) StackHPC's Cephadm Ansible collection relies on multiple inventory groups: @@ -38,14 +38,14 @@ and they can be run separately. additional playbooks - ``cephadm-commands-pre.yml`` - Runs Ceph commands before post-deployment configuration (You can set a list of commands at ``cephadm_commands_pre_extra`` - variable in ``$KAYOBE_CONFIG_PATH/cephadm.yml``) + variable in ``$KAYOBE_CONFIG_PATH/ceph/cephadm.yml``) - ``cephadm-ec-profiles.yml`` - Defines Ceph EC profiles - ``cephadm-crush-rules.yml`` - Defines Ceph crush rules according - ``cephadm-pools.yml`` - Defines Ceph pools - ``cephadm-keys.yml`` - Defines Ceph users/keys - ``cephadm-commands-post.yml`` - Runs Ceph commands after post-deployment configuration (You can set a list of commands at ``cephadm_commands_post_extra`` - variable in ``$KAYOBE_CONFIG_PATH/cephadm.yml``) + variable in ``$KAYOBE_CONFIG_PATH/ceph/cephadm.yml``) There are also other Ceph playbooks that are not part of ``cephadm.yml`` @@ -194,7 +194,7 @@ After removing OSDs, if the drives the OSDs were deployed on once again become available, Cephadm may automatically try to deploy more OSDs on these drives if they match an existing drivegroup spec. If this is not your desired action plan - it's best to modify the drivegroup -spec before (``cephadm_osd_spec`` variable in ``$KAYOBE_CONFIG_PATH/cephadm.yml``). +spec before (``cephadm_osd_spec`` variable in ``$KAYOBE_CONFIG_PATH/ceph/cephadm.yml``). Either set ``unmanaged: true`` to stop Cephadm from picking up new disks or modify it in some way that it no longer matches the drives you want to remove. diff --git a/doc/source/operations/control-plane-operation.rst b/doc/source/operations/control-plane-operation.rst index 3dfd1ec44..48ed72dbc 100644 --- a/doc/source/operations/control-plane-operation.rst +++ b/doc/source/operations/control-plane-operation.rst @@ -209,7 +209,7 @@ Example: Reboot all compute hosts apart from compute0: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml --limit 'compute:!compute0' + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml --limit 'compute:!compute0' References ---------- @@ -306,22 +306,22 @@ To sync host packages: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml If the system is production environment and want to use packages tested in test/staging environment, you can promote them by: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-promote-production.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-promote-production.yml To sync container images: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml For more information about StackHPC Release Train, see :ref:`stackhpc-release-train` documentation. diff --git a/doc/source/operations/gpu-in-openstack.rst b/doc/source/operations/gpu-in-openstack.rst index 6198edcaa..ddeaf59b7 100644 --- a/doc/source/operations/gpu-in-openstack.rst +++ b/doc/source/operations/gpu-in-openstack.rst @@ -65,7 +65,7 @@ configuration or trigger the playbook manually: kayobe overcloud host configure --limit compute_a100,compute_v100,compute_multi_gpu # OR - kayobe playbook run --playbook $KAYOBE_CONFIG_PATH/ansible/pci-passthrough.yml --limit compute_a100,compute_v100,compute_multi_gpu + kayobe playbook run --playbook $KAYOBE_CONFIG_PATH/ansible/maintenance/pci-passthrough.yml --limit compute_a100,compute_v100,compute_multi_gpu The playbook will apply the necessary configuraion and reboot the hosts if required. diff --git a/doc/source/operations/hotfix-playbook.rst b/doc/source/operations/hotfix-playbook.rst index 8f7c6145e..695a903bc 100644 --- a/doc/source/operations/hotfix-playbook.rst +++ b/doc/source/operations/hotfix-playbook.rst @@ -20,7 +20,7 @@ The playbook can be invoked with: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/hotfix-containers.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fixes/hotfix-containers.yml Playbook variables: ------------------- @@ -49,7 +49,7 @@ to a file, then add them as an extra var. e.g: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/hotfix-containers.yml -e "@~/vars.yml" + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fixes/hotfix-containers.yml -e "@~/vars.yml" Example Variables file diff --git a/doc/source/operations/octavia.rst b/doc/source/operations/octavia.rst index 966f3302d..52c25f231 100644 --- a/doc/source/operations/octavia.rst +++ b/doc/source/operations/octavia.rst @@ -20,7 +20,7 @@ You can then run the playbook to upload the image: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/octavia-amphora-image-register.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/octavia-amphora-image-register.yml By default, this will download Amphora image corresponds to OpenStack release from StackHPC Release Train. @@ -42,7 +42,7 @@ With your kayobe environment activated, you can build a new amphora image with: .. code-block:: console - kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/octavia-amphora-image-build.yml + kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/maintenance/octavia-amphora-image-build.yml The resultant image is based on Ubuntu. By default the image will be built on the seed, but it is possible to change the group in the ansible inventory using the @@ -63,7 +63,7 @@ The default image path is ``/tmp/amphora-x64-haproxy.qcow2``. .. code-block:: console - kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/octavia-amphora-image-register.yml -e image_path="" + kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/maintenance/octavia-amphora-image-register.yml -e image_path="" Manually deleting broken load balancers diff --git a/doc/source/operations/secret-rotation.rst b/doc/source/operations/secret-rotation.rst index a5f7fa18d..02bafa5d0 100644 --- a/doc/source/operations/secret-rotation.rst +++ b/doc/source/operations/secret-rotation.rst @@ -134,7 +134,7 @@ Full method .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/rekey-hosts.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/rekey-hosts.yml 2. Ensure you can SSH to other nodes using the new keypair @@ -142,7 +142,7 @@ Full method .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/rekey-hosts.yml -t remove-key -e rekey_remove_existing_key=true + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/rekey-hosts.yml -t remove-key -e rekey_remove_existing_key=true 9. Update the Pulp password @@ -311,7 +311,7 @@ Full method .. code:: bash - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/stop-openstack-services.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/stop-openstack-services.yml 16. Flush the Memcached data on all controllers (any old data will now be inaccessible) diff --git a/doc/source/operations/upgrading-ceph.rst b/doc/source/operations/upgrading-ceph.rst index 5ce711011..66e8a3e0e 100644 --- a/doc/source/operations/upgrading-ceph.rst +++ b/doc/source/operations/upgrading-ceph.rst @@ -63,7 +63,7 @@ Place the host or batch of hosts into maintenance mode: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-enter-maintenance.yml -l + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-enter-maintenance.yml -l To update all eligible packages, use ``*``, escaping if necessary: @@ -77,13 +77,13 @@ the maximum number of hosts that can safely reboot concurrently. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l Remove the host or batch of hosts from maintenance mode: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-exit-maintenance.yml -l + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-exit-maintenance.yml -l Wait for Ceph health to return to ``HEALTH_OK``: @@ -152,7 +152,7 @@ Update the Cephadm package: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-deploy.yml -e cephadm_package_update=true + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-deploy.yml -e cephadm_package_update=true Testing ======= diff --git a/doc/source/operations/upgrading-openstack.rst b/doc/source/operations/upgrading-openstack.rst index 328e8b163..c37a38e03 100644 --- a/doc/source/operations/upgrading-openstack.rst +++ b/doc/source/operations/upgrading-openstack.rst @@ -165,6 +165,22 @@ For example: - "pulp:http_2xx:{{ pulp_url }}/pulp/api/v3/status/" enabled: "{{ seed_pulp_container_enabled | bool }}" +Ansible playbook subdirectories +-------------------------------------- + +The playbooks under ``etc/kayobe/ansible`` have been subdivided into different +categories to make them easier to navigate. This change may result in merge +conflicts where playbooks have been edited downstream, and broken hooks where +symlinks have been used. + +To mitigate the impact of these changes, two scripts have been added: + +* ``tools/get-new-playbook-path.sh`` - Returns the new category of a given + playbook. For example ``tools/get-new-playbook-path.sh + deploy-os-capacity-exporter.yml`` returns ``deployment/`` +* ``tools/magic-symlink-fix.sh`` - Uses the previous script to attempt to fix + any broken symlinks in the kayobe configuration. + Known issues ============ @@ -416,22 +432,22 @@ To sync host packages: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml Once the host package content has been tested in a test/staging environment, it may be promoted to production: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-promote-production.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-promote-production.yml To sync container images: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml Build locally customised container images ----------------------------------------- @@ -557,7 +573,7 @@ change: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l seed-hypervisor + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l seed-hypervisor Upgrading Host Services ----------------------- @@ -623,7 +639,7 @@ If the kernel has been upgraded, reboot the seed to pick up the change: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l seed + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l seed Verify that Bifrost, Ironic and Inspector are running as expected: @@ -761,7 +777,7 @@ change: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l wazuh-manager + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l wazuh-manager Verify that Wazuh Manager is functioning correctly by :ref:`logging into the Wazuh UI `. @@ -799,7 +815,7 @@ Run the following playbook to update Wazuh Manager services and configuration: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-manager.yml Verify that Wazuh Manager is functioning correctly by :ref:`logging into the Wazuh UI `. @@ -821,7 +837,7 @@ Run the following playbook to update Wazuh Agent services and configuration: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deployment/wazuh-agent.yml Verify that the agents have conncted to Wazuh Manager correctly by :ref:`logging into the Wazuh UI `. @@ -877,7 +893,7 @@ the change: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l .. warning:: @@ -888,10 +904,10 @@ the change: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-enter-maintenance.yml --limit + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-enter-maintenance.yml --limit kayobe overcloud host package update --packages "*" --limit - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/reboot.yml -l - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-exit-maintenance.yml --limit + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/reboot.yml -l + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-exit-maintenance.yml --limit **Always** reconfigure hosts in small batches or one-by-one. Check the Ceph state after each host configuration. Ensure all warnings and errors are @@ -901,7 +917,7 @@ If the host is a hypervisor, enable the Nova compute service. .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/nova-compute-enable.yml --limit + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/nova-compute-enable.yml --limit If any VMs were powered off, they may now be powered back on. @@ -957,9 +973,9 @@ least start with a small number of hosts: .. code-block:: console - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-enter-maintenance.yml --limit + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-enter-maintenance.yml --limit kayobe overcloud host configure --limit - kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-exit-maintenance.yml --limit + kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/ceph-exit-maintenance.yml --limit **Always** reconfigure hosts in small batches or one-by-one. Check the Ceph state after each host configuration. Ensure all warnings and errors are diff --git a/etc/kayobe/ansible/openbao-deploy-barbican.yml b/etc/kayobe/ansible/bao/openbao-deploy-barbican.yml similarity index 100% rename from etc/kayobe/ansible/openbao-deploy-barbican.yml rename to etc/kayobe/ansible/bao/openbao-deploy-barbican.yml diff --git a/etc/kayobe/ansible/openbao-deploy-overcloud.yml b/etc/kayobe/ansible/bao/openbao-deploy-overcloud.yml similarity index 100% rename from etc/kayobe/ansible/openbao-deploy-overcloud.yml rename to etc/kayobe/ansible/bao/openbao-deploy-overcloud.yml diff --git a/etc/kayobe/ansible/openbao-deploy-seed.yml b/etc/kayobe/ansible/bao/openbao-deploy-seed.yml similarity index 100% rename from etc/kayobe/ansible/openbao-deploy-seed.yml rename to etc/kayobe/ansible/bao/openbao-deploy-seed.yml diff --git a/etc/kayobe/ansible/openbao-generate-backend-tls.yml b/etc/kayobe/ansible/bao/openbao-generate-backend-tls.yml similarity index 100% rename from etc/kayobe/ansible/openbao-generate-backend-tls.yml rename to etc/kayobe/ansible/bao/openbao-generate-backend-tls.yml diff --git a/etc/kayobe/ansible/openbao-generate-internal-tls.yml b/etc/kayobe/ansible/bao/openbao-generate-internal-tls.yml similarity index 100% rename from etc/kayobe/ansible/openbao-generate-internal-tls.yml rename to etc/kayobe/ansible/bao/openbao-generate-internal-tls.yml diff --git a/etc/kayobe/ansible/openbao-generate-test-external-tls.yml b/etc/kayobe/ansible/bao/openbao-generate-test-external-tls.yml similarity index 100% rename from etc/kayobe/ansible/openbao-generate-test-external-tls.yml rename to etc/kayobe/ansible/bao/openbao-generate-test-external-tls.yml diff --git a/etc/kayobe/ansible/openbao-unseal-overcloud.yml b/etc/kayobe/ansible/bao/openbao-unseal-overcloud.yml similarity index 100% rename from etc/kayobe/ansible/openbao-unseal-overcloud.yml rename to etc/kayobe/ansible/bao/openbao-unseal-overcloud.yml diff --git a/etc/kayobe/ansible/openbao-unseal-seed.yml b/etc/kayobe/ansible/bao/openbao-unseal-seed.yml similarity index 100% rename from etc/kayobe/ansible/openbao-unseal-seed.yml rename to etc/kayobe/ansible/bao/openbao-unseal-seed.yml diff --git a/etc/kayobe/ansible/ceph-enter-maintenance.yml b/etc/kayobe/ansible/ceph/ceph-enter-maintenance.yml similarity index 100% rename from etc/kayobe/ansible/ceph-enter-maintenance.yml rename to etc/kayobe/ansible/ceph/ceph-enter-maintenance.yml diff --git a/etc/kayobe/ansible/ceph-exit-maintenance.yml b/etc/kayobe/ansible/ceph/ceph-exit-maintenance.yml similarity index 100% rename from etc/kayobe/ansible/ceph-exit-maintenance.yml rename to etc/kayobe/ansible/ceph/ceph-exit-maintenance.yml diff --git a/etc/kayobe/ansible/cephadm-commands-post.yml b/etc/kayobe/ansible/ceph/cephadm-commands-post.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-commands-post.yml rename to etc/kayobe/ansible/ceph/cephadm-commands-post.yml diff --git a/etc/kayobe/ansible/cephadm-commands-pre.yml b/etc/kayobe/ansible/ceph/cephadm-commands-pre.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-commands-pre.yml rename to etc/kayobe/ansible/ceph/cephadm-commands-pre.yml diff --git a/etc/kayobe/ansible/cephadm-crush-rules.yml b/etc/kayobe/ansible/ceph/cephadm-crush-rules.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-crush-rules.yml rename to etc/kayobe/ansible/ceph/cephadm-crush-rules.yml diff --git a/etc/kayobe/ansible/cephadm-deploy.yml b/etc/kayobe/ansible/ceph/cephadm-deploy.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-deploy.yml rename to etc/kayobe/ansible/ceph/cephadm-deploy.yml diff --git a/etc/kayobe/ansible/cephadm-ec-profiles.yml b/etc/kayobe/ansible/ceph/cephadm-ec-profiles.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-ec-profiles.yml rename to etc/kayobe/ansible/ceph/cephadm-ec-profiles.yml diff --git a/etc/kayobe/ansible/cephadm-gather-keys.yml b/etc/kayobe/ansible/ceph/cephadm-gather-keys.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-gather-keys.yml rename to etc/kayobe/ansible/ceph/cephadm-gather-keys.yml diff --git a/etc/kayobe/ansible/cephadm-keys.yml b/etc/kayobe/ansible/ceph/cephadm-keys.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-keys.yml rename to etc/kayobe/ansible/ceph/cephadm-keys.yml diff --git a/etc/kayobe/ansible/cephadm-pools.yml b/etc/kayobe/ansible/ceph/cephadm-pools.yml similarity index 100% rename from etc/kayobe/ansible/cephadm-pools.yml rename to etc/kayobe/ansible/ceph/cephadm-pools.yml diff --git a/etc/kayobe/ansible/cephadm.yml b/etc/kayobe/ansible/ceph/cephadm.yml similarity index 100% rename from etc/kayobe/ansible/cephadm.yml rename to etc/kayobe/ansible/ceph/cephadm.yml diff --git a/etc/kayobe/ansible/deploy-github-runner.yml b/etc/kayobe/ansible/deployment/deploy-github-runner.yml similarity index 100% rename from etc/kayobe/ansible/deploy-github-runner.yml rename to etc/kayobe/ansible/deployment/deploy-github-runner.yml diff --git a/etc/kayobe/ansible/deploy-os-capacity-exporter.yml b/etc/kayobe/ansible/deployment/deploy-os-capacity-exporter.yml similarity index 100% rename from etc/kayobe/ansible/deploy-os-capacity-exporter.yml rename to etc/kayobe/ansible/deployment/deploy-os-capacity-exporter.yml diff --git a/etc/kayobe/ansible/deploy-radosgw-usage-exporter.yml b/etc/kayobe/ansible/deployment/deploy-radosgw-usage-exporter.yml similarity index 100% rename from etc/kayobe/ansible/deploy-radosgw-usage-exporter.yml rename to etc/kayobe/ansible/deployment/deploy-radosgw-usage-exporter.yml diff --git a/etc/kayobe/ansible/smartmon-tools.yml b/etc/kayobe/ansible/deployment/smartmon-tools.yml similarity index 100% rename from etc/kayobe/ansible/smartmon-tools.yml rename to etc/kayobe/ansible/deployment/smartmon-tools.yml diff --git a/etc/kayobe/ansible/wazuh-agent.yml b/etc/kayobe/ansible/deployment/wazuh-agent.yml similarity index 100% rename from etc/kayobe/ansible/wazuh-agent.yml rename to etc/kayobe/ansible/deployment/wazuh-agent.yml diff --git a/etc/kayobe/ansible/wazuh-manager.yml b/etc/kayobe/ansible/deployment/wazuh-manager.yml similarity index 100% rename from etc/kayobe/ansible/wazuh-manager.yml rename to etc/kayobe/ansible/deployment/wazuh-manager.yml diff --git a/etc/kayobe/ansible/wazuh-secrets.yml b/etc/kayobe/ansible/deployment/wazuh-secrets.yml similarity index 92% rename from etc/kayobe/ansible/wazuh-secrets.yml rename to etc/kayobe/ansible/deployment/wazuh-secrets.yml index fbaa3d3e9..11d0644b6 100644 --- a/etc/kayobe/ansible/wazuh-secrets.yml +++ b/etc/kayobe/ansible/deployment/wazuh-secrets.yml @@ -3,7 +3,7 @@ hosts: localhost gather_facts: false vars: - wazuh_secrets_path: "{{ kayobe_env_config_path }}/wazuh-secrets.yml" + wazuh_secrets_path: "{{ kayobe_env_config_path }}/deployment/wazuh-secrets.yml" override_special_characters: '"#$%&()*+,-./:;<=>?@[\]^_{|}~' tasks: - name: Install passlib[bcrypt] diff --git a/etc/kayobe/ansible/write-github-workflows.yml b/etc/kayobe/ansible/deployment/write-github-workflows.yml similarity index 100% rename from etc/kayobe/ansible/write-github-workflows.yml rename to etc/kayobe/ansible/deployment/write-github-workflows.yml diff --git a/etc/kayobe/ansible/fix-grub-rl9.yml b/etc/kayobe/ansible/fixes/fix-grub-rl9.yml similarity index 100% rename from etc/kayobe/ansible/fix-grub-rl9.yml rename to etc/kayobe/ansible/fixes/fix-grub-rl9.yml diff --git a/etc/kayobe/ansible/fix-hostname.yml b/etc/kayobe/ansible/fixes/fix-hostname.yml similarity index 92% rename from etc/kayobe/ansible/fix-hostname.yml rename to etc/kayobe/ansible/fixes/fix-hostname.yml index 539d47e62..9cf9ab8b9 100644 --- a/etc/kayobe/ansible/fix-hostname.yml +++ b/etc/kayobe/ansible/fixes/fix-hostname.yml @@ -23,7 +23,7 @@ become: true - name: Reboot hosts - import_playbook: "{{ playbook_dir | realpath }}/reboot.yml" + import_playbook: "{{ playbook_dir | realpath }}/../maintenance/reboot.yml" vars: reboot_hosts: fix-hostname reboot_with_bootstrap_user: true diff --git a/etc/kayobe/ansible/fix-houston.yml b/etc/kayobe/ansible/fixes/fix-houston.yml similarity index 93% rename from etc/kayobe/ansible/fix-houston.yml rename to etc/kayobe/ansible/fixes/fix-houston.yml index 9dfdc924f..ff464d568 100644 --- a/etc/kayobe/ansible/fix-houston.yml +++ b/etc/kayobe/ansible/fixes/fix-houston.yml @@ -7,11 +7,11 @@ # https://bugs.launchpad.net/charm-neutron-openvswitch/+bug/1899364 # https://patchwork.kernel.org/project/netdevbpf/patch/c2ef23da1d9a4eb62f4e7b7c4540f9bafb553c15.1658420239.git.dcaratti@redhat.com/ # To deploy this playbook, use the following commands: -# kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fix-houston.yml +# kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fixes/fix-houston.yml # Enable with Kayobe Hooks by running: # mkdir -p ${KAYOBE_CONFIG_PATH}/hooks/overcloud-service-deploy/post.d # cd ${KAYOBE_CONFIG_PATH}/hooks/overcloud-service-deploy/post.d -# ln -s ../../../ansible/fix-houston.yml 90-fix-houston.yml +# ln -s ../../../ansible/fixes/fix-houston.yml 90-fix-houston.yml - name: Create Systemd Unit to workaround 'tc mirred to Houston' error hosts: network,compute diff --git a/etc/kayobe/ansible/fix-networking.yml b/etc/kayobe/ansible/fixes/fix-networking.yml similarity index 100% rename from etc/kayobe/ansible/fix-networking.yml rename to etc/kayobe/ansible/fixes/fix-networking.yml diff --git a/etc/kayobe/ansible/hotfix-containers.yml b/etc/kayobe/ansible/fixes/hotfix-containers.yml similarity index 100% rename from etc/kayobe/ansible/hotfix-containers.yml rename to etc/kayobe/ansible/fixes/hotfix-containers.yml diff --git a/etc/kayobe/ansible/ovn-fix-chassis-priorities.yml b/etc/kayobe/ansible/fixes/ovn-fix-chassis-priorities.yml similarity index 97% rename from etc/kayobe/ansible/ovn-fix-chassis-priorities.yml rename to etc/kayobe/ansible/fixes/ovn-fix-chassis-priorities.yml index f5c7197fc..e6f63fd8c 100644 --- a/etc/kayobe/ansible/ovn-fix-chassis-priorities.yml +++ b/etc/kayobe/ansible/fixes/ovn-fix-chassis-priorities.yml @@ -12,7 +12,7 @@ # ha_chassis and gateway_chassis entries). # The playbook can be run as follows: -# kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ovn-fix-chassis-priorities.yml +# kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fixes/ovn-fix-chassis-priorities.yml # If the 'controllers' group does not align with the group used to deploy the # OVN NB DB, this can be overridden by passing the following: diff --git a/etc/kayobe/ansible/purge-command-not-found.yml b/etc/kayobe/ansible/fixes/purge-command-not-found.yml similarity index 100% rename from etc/kayobe/ansible/purge-command-not-found.yml rename to etc/kayobe/ansible/fixes/purge-command-not-found.yml diff --git a/etc/kayobe/ansible/rabbitmq-reset.yml b/etc/kayobe/ansible/fixes/rabbitmq-reset.yml similarity index 100% rename from etc/kayobe/ansible/rabbitmq-reset.yml rename to etc/kayobe/ansible/fixes/rabbitmq-reset.yml diff --git a/etc/kayobe/ansible/run-container-hotfix.yml b/etc/kayobe/ansible/fixes/run-container-hotfix.yml similarity index 100% rename from etc/kayobe/ansible/run-container-hotfix.yml rename to etc/kayobe/ansible/fixes/run-container-hotfix.yml diff --git a/etc/kayobe/ansible/cis.yml b/etc/kayobe/ansible/maintenance/cis.yml similarity index 100% rename from etc/kayobe/ansible/cis.yml rename to etc/kayobe/ansible/maintenance/cis.yml diff --git a/etc/kayobe/ansible/nova-compute-disable.yml b/etc/kayobe/ansible/maintenance/nova-compute-disable.yml similarity index 100% rename from etc/kayobe/ansible/nova-compute-disable.yml rename to etc/kayobe/ansible/maintenance/nova-compute-disable.yml diff --git a/etc/kayobe/ansible/nova-compute-drain.yml b/etc/kayobe/ansible/maintenance/nova-compute-drain.yml similarity index 100% rename from etc/kayobe/ansible/nova-compute-drain.yml rename to etc/kayobe/ansible/maintenance/nova-compute-drain.yml diff --git a/etc/kayobe/ansible/nova-compute-enable.yml b/etc/kayobe/ansible/maintenance/nova-compute-enable.yml similarity index 100% rename from etc/kayobe/ansible/nova-compute-enable.yml rename to etc/kayobe/ansible/maintenance/nova-compute-enable.yml diff --git a/etc/kayobe/ansible/octavia-amphora-image-build.yml b/etc/kayobe/ansible/maintenance/octavia-amphora-image-build.yml similarity index 100% rename from etc/kayobe/ansible/octavia-amphora-image-build.yml rename to etc/kayobe/ansible/maintenance/octavia-amphora-image-build.yml diff --git a/etc/kayobe/ansible/octavia-amphora-image-register.yml b/etc/kayobe/ansible/maintenance/octavia-amphora-image-register.yml similarity index 98% rename from etc/kayobe/ansible/octavia-amphora-image-register.yml rename to etc/kayobe/ansible/maintenance/octavia-amphora-image-register.yml index 3435397a3..612c3a4f7 100644 --- a/etc/kayobe/ansible/octavia-amphora-image-register.yml +++ b/etc/kayobe/ansible/maintenance/octavia-amphora-image-register.yml @@ -12,7 +12,7 @@ lookup('env', 'OS_PROJECT_NAME') != 'service' - name: Download Amphora image from Ark - ansible.builtin.import_playbook: pulp-amphora-image-download.yml + ansible.builtin.import_playbook: ../pulp/pulp-amphora-image-download.yml when: download_amphora_from_ark | bool - name: Register an Octavia Amphora image in Glance diff --git a/etc/kayobe/ansible/pci-passthrough.yml b/etc/kayobe/ansible/maintenance/pci-passthrough.yml similarity index 100% rename from etc/kayobe/ansible/pci-passthrough.yml rename to etc/kayobe/ansible/maintenance/pci-passthrough.yml diff --git a/etc/kayobe/ansible/reboot.yml b/etc/kayobe/ansible/maintenance/reboot.yml similarity index 100% rename from etc/kayobe/ansible/reboot.yml rename to etc/kayobe/ansible/maintenance/reboot.yml diff --git a/etc/kayobe/ansible/rekey-hosts.yml b/etc/kayobe/ansible/maintenance/rekey-hosts.yml similarity index 100% rename from etc/kayobe/ansible/rekey-hosts.yml rename to etc/kayobe/ansible/maintenance/rekey-hosts.yml diff --git a/etc/kayobe/ansible/reset-bls-entries.yml b/etc/kayobe/ansible/maintenance/reset-bls-entries.yml similarity index 100% rename from etc/kayobe/ansible/reset-bls-entries.yml rename to etc/kayobe/ansible/maintenance/reset-bls-entries.yml diff --git a/etc/kayobe/ansible/stop-openstack-services.yml b/etc/kayobe/ansible/maintenance/stop-openstack-services.yml similarity index 100% rename from etc/kayobe/ansible/stop-openstack-services.yml rename to etc/kayobe/ansible/maintenance/stop-openstack-services.yml diff --git a/etc/kayobe/ansible/ubuntu-upgrade.yml b/etc/kayobe/ansible/maintenance/ubuntu-upgrade.yml similarity index 100% rename from etc/kayobe/ansible/ubuntu-upgrade.yml rename to etc/kayobe/ansible/maintenance/ubuntu-upgrade.yml diff --git a/etc/kayobe/ansible/pulp-amphora-image-download.yml b/etc/kayobe/ansible/pulp/pulp-amphora-image-download.yml similarity index 100% rename from etc/kayobe/ansible/pulp-amphora-image-download.yml rename to etc/kayobe/ansible/pulp/pulp-amphora-image-download.yml diff --git a/etc/kayobe/ansible/pulp-artifact-promote.yml b/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml similarity index 100% rename from etc/kayobe/ansible/pulp-artifact-promote.yml rename to etc/kayobe/ansible/pulp/pulp-artifact-promote.yml diff --git a/etc/kayobe/ansible/pulp-artifact-upload.yml b/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml similarity index 100% rename from etc/kayobe/ansible/pulp-artifact-upload.yml rename to etc/kayobe/ansible/pulp/pulp-artifact-upload.yml diff --git a/etc/kayobe/ansible/pulp-auth-proxy.yml b/etc/kayobe/ansible/pulp/pulp-auth-proxy.yml similarity index 100% rename from etc/kayobe/ansible/pulp-auth-proxy.yml rename to etc/kayobe/ansible/pulp/pulp-auth-proxy.yml diff --git a/etc/kayobe/ansible/pulp-container-publish.yml b/etc/kayobe/ansible/pulp/pulp-container-publish.yml similarity index 100% rename from etc/kayobe/ansible/pulp-container-publish.yml rename to etc/kayobe/ansible/pulp/pulp-container-publish.yml diff --git a/etc/kayobe/ansible/pulp-container-sync.yml b/etc/kayobe/ansible/pulp/pulp-container-sync.yml similarity index 100% rename from etc/kayobe/ansible/pulp-container-sync.yml rename to etc/kayobe/ansible/pulp/pulp-container-sync.yml diff --git a/etc/kayobe/ansible/pulp-host-image-download.yml b/etc/kayobe/ansible/pulp/pulp-host-image-download.yml similarity index 100% rename from etc/kayobe/ansible/pulp-host-image-download.yml rename to etc/kayobe/ansible/pulp/pulp-host-image-download.yml diff --git a/etc/kayobe/ansible/pulp-repo-promote-production.yml b/etc/kayobe/ansible/pulp/pulp-repo-promote-production.yml similarity index 100% rename from etc/kayobe/ansible/pulp-repo-promote-production.yml rename to etc/kayobe/ansible/pulp/pulp-repo-promote-production.yml diff --git a/etc/kayobe/ansible/pulp-repo-publish.yml b/etc/kayobe/ansible/pulp/pulp-repo-publish.yml similarity index 100% rename from etc/kayobe/ansible/pulp-repo-publish.yml rename to etc/kayobe/ansible/pulp/pulp-repo-publish.yml diff --git a/etc/kayobe/ansible/pulp-repo-sync.yml b/etc/kayobe/ansible/pulp/pulp-repo-sync.yml similarity index 100% rename from etc/kayobe/ansible/pulp-repo-sync.yml rename to etc/kayobe/ansible/pulp/pulp-repo-sync.yml diff --git a/etc/kayobe/ansible/pulp-sync-publish-promote.yml b/etc/kayobe/ansible/pulp/pulp-sync-publish-promote.yml similarity index 100% rename from etc/kayobe/ansible/pulp-sync-publish-promote.yml rename to etc/kayobe/ansible/pulp/pulp-sync-publish-promote.yml diff --git a/etc/kayobe/ansible/roles/pulp_auth_proxy/README.md b/etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/README.md similarity index 100% rename from etc/kayobe/ansible/roles/pulp_auth_proxy/README.md rename to etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/README.md diff --git a/etc/kayobe/ansible/roles/pulp_auth_proxy/defaults/main.yml b/etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/defaults/main.yml similarity index 100% rename from etc/kayobe/ansible/roles/pulp_auth_proxy/defaults/main.yml rename to etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/defaults/main.yml diff --git a/etc/kayobe/ansible/roles/pulp_auth_proxy/tasks/main.yml b/etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/tasks/main.yml similarity index 100% rename from etc/kayobe/ansible/roles/pulp_auth_proxy/tasks/main.yml rename to etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/tasks/main.yml diff --git a/etc/kayobe/ansible/roles/pulp_auth_proxy/templates/pulp_proxy.conf.j2 b/etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/templates/pulp_proxy.conf.j2 similarity index 100% rename from etc/kayobe/ansible/roles/pulp_auth_proxy/templates/pulp_proxy.conf.j2 rename to etc/kayobe/ansible/pulp/roles/pulp_auth_proxy/templates/pulp_proxy.conf.j2 diff --git a/etc/kayobe/ansible/advise-run.yml b/etc/kayobe/ansible/tools/advise-run.yml similarity index 100% rename from etc/kayobe/ansible/advise-run.yml rename to etc/kayobe/ansible/tools/advise-run.yml diff --git a/etc/kayobe/ansible/build-ofed-rocky.yml b/etc/kayobe/ansible/tools/build-ofed-rocky.yml similarity index 100% rename from etc/kayobe/ansible/build-ofed-rocky.yml rename to etc/kayobe/ansible/tools/build-ofed-rocky.yml diff --git a/etc/kayobe/ansible/check-kayobe-version.yml b/etc/kayobe/ansible/tools/check-kayobe-version.yml similarity index 100% rename from etc/kayobe/ansible/check-kayobe-version.yml rename to etc/kayobe/ansible/tools/check-kayobe-version.yml diff --git a/etc/kayobe/ansible/check-kolla-ansible-version.yml b/etc/kayobe/ansible/tools/check-kolla-ansible-version.yml similarity index 100% rename from etc/kayobe/ansible/check-kolla-ansible-version.yml rename to etc/kayobe/ansible/tools/check-kolla-ansible-version.yml diff --git a/etc/kayobe/ansible/check-kolla-images-py.yml b/etc/kayobe/ansible/tools/check-kolla-images-py.yml similarity index 100% rename from etc/kayobe/ansible/check-kolla-images-py.yml rename to etc/kayobe/ansible/tools/check-kolla-images-py.yml diff --git a/etc/kayobe/ansible/check-tags.yml b/etc/kayobe/ansible/tools/check-tags.yml similarity index 100% rename from etc/kayobe/ansible/check-tags.yml rename to etc/kayobe/ansible/tools/check-tags.yml diff --git a/etc/kayobe/ansible/configure-aio-resources.yml b/etc/kayobe/ansible/tools/configure-aio-resources.yml similarity index 100% rename from etc/kayobe/ansible/configure-aio-resources.yml rename to etc/kayobe/ansible/tools/configure-aio-resources.yml diff --git a/etc/kayobe/ansible/configure-vxlan.yml b/etc/kayobe/ansible/tools/configure-vxlan.yml similarity index 100% rename from etc/kayobe/ansible/configure-vxlan.yml rename to etc/kayobe/ansible/tools/configure-vxlan.yml diff --git a/etc/kayobe/ansible/diagnostics.yml b/etc/kayobe/ansible/tools/diagnostics.yml similarity index 100% rename from etc/kayobe/ansible/diagnostics.yml rename to etc/kayobe/ansible/tools/diagnostics.yml diff --git a/etc/kayobe/ansible/docker-registry-login.yml b/etc/kayobe/ansible/tools/docker-registry-login.yml similarity index 100% rename from etc/kayobe/ansible/docker-registry-login.yml rename to etc/kayobe/ansible/tools/docker-registry-login.yml diff --git a/etc/kayobe/ansible/firewalld-watchdog.yml b/etc/kayobe/ansible/tools/firewalld-watchdog.yml similarity index 92% rename from etc/kayobe/ansible/firewalld-watchdog.yml rename to etc/kayobe/ansible/tools/firewalld-watchdog.yml index c74edd358..b1ec1a54d 100644 --- a/etc/kayobe/ansible/firewalld-watchdog.yml +++ b/etc/kayobe/ansible/tools/firewalld-watchdog.yml @@ -3,11 +3,11 @@ # configuration. It sets up a timer that disables the firewalld service after a # period of time (default 600s). It should be used as follows: # 1. Enable firewalld-watchdog -# kayobe playbook run etc/kayobe/ansible/firewalld-watchdog.yml -l +# kayobe playbook run etc/kayobe/ansible/tools/firewalld-watchdog.yml -l # 2. Apply firewall config # kayobe host configure -l -t network,firewall # 3. Disable watchdog -# kayobe playbook run etc/kayobe/ansible/firewalld-watchdog.yml -l -e firewalld_watchdog_state=absent +# kayobe playbook run etc/kayobe/ansible/tools/firewalld-watchdog.yml -l -e firewalld_watchdog_state=absent # If the firewall changes result in being locked out of the system, the # watchdog will disable the firewall after the timeout. # Remember to disable the watchdog, otherwise the firewall will be disabled! diff --git a/etc/kayobe/ansible/growroot.yml b/etc/kayobe/ansible/tools/growroot.yml similarity index 100% rename from etc/kayobe/ansible/growroot.yml rename to etc/kayobe/ansible/tools/growroot.yml diff --git a/etc/kayobe/ansible/install-doca.yml b/etc/kayobe/ansible/tools/install-doca.yml similarity index 100% rename from etc/kayobe/ansible/install-doca.yml rename to etc/kayobe/ansible/tools/install-doca.yml diff --git a/etc/kayobe/ansible/install-pre-commit-hooks.yml b/etc/kayobe/ansible/tools/install-pre-commit-hooks.yml similarity index 100% rename from etc/kayobe/ansible/install-pre-commit-hooks.yml rename to etc/kayobe/ansible/tools/install-pre-commit-hooks.yml diff --git a/etc/kayobe/ansible/openstack-host-image-upload.yml b/etc/kayobe/ansible/tools/openstack-host-image-upload.yml similarity index 100% rename from etc/kayobe/ansible/openstack-host-image-upload.yml rename to etc/kayobe/ansible/tools/openstack-host-image-upload.yml diff --git a/etc/kayobe/ansible/prometheus-network-names.yml b/etc/kayobe/ansible/tools/prometheus-network-names.yml similarity index 100% rename from etc/kayobe/ansible/prometheus-network-names.yml rename to etc/kayobe/ansible/tools/prometheus-network-names.yml diff --git a/etc/kayobe/ansible/prometheus.yml.j2 b/etc/kayobe/ansible/tools/prometheus.yml.j2 similarity index 100% rename from etc/kayobe/ansible/prometheus.yml.j2 rename to etc/kayobe/ansible/tools/prometheus.yml.j2 diff --git a/etc/kayobe/ansible/push-ofed.yml b/etc/kayobe/ansible/tools/push-ofed.yml similarity index 100% rename from etc/kayobe/ansible/push-ofed.yml rename to etc/kayobe/ansible/tools/push-ofed.yml diff --git a/etc/kayobe/ansible/rsyslog.yml b/etc/kayobe/ansible/tools/rsyslog.yml similarity index 100% rename from etc/kayobe/ansible/rsyslog.yml rename to etc/kayobe/ansible/tools/rsyslog.yml diff --git a/etc/kayobe/ansible/stackhpc-cloud-tests.yml b/etc/kayobe/ansible/tools/stackhpc-cloud-tests.yml similarity index 100% rename from etc/kayobe/ansible/stackhpc-cloud-tests.yml rename to etc/kayobe/ansible/tools/stackhpc-cloud-tests.yml diff --git a/etc/kayobe/ansible/vault-deploy-barbican.yml b/etc/kayobe/ansible/vault/vault-deploy-barbican.yml similarity index 100% rename from etc/kayobe/ansible/vault-deploy-barbican.yml rename to etc/kayobe/ansible/vault/vault-deploy-barbican.yml diff --git a/etc/kayobe/ansible/vault-deploy-overcloud.yml b/etc/kayobe/ansible/vault/vault-deploy-overcloud.yml similarity index 100% rename from etc/kayobe/ansible/vault-deploy-overcloud.yml rename to etc/kayobe/ansible/vault/vault-deploy-overcloud.yml diff --git a/etc/kayobe/ansible/vault-deploy-seed.yml b/etc/kayobe/ansible/vault/vault-deploy-seed.yml similarity index 100% rename from etc/kayobe/ansible/vault-deploy-seed.yml rename to etc/kayobe/ansible/vault/vault-deploy-seed.yml diff --git a/etc/kayobe/ansible/vault-generate-backend-tls.yml b/etc/kayobe/ansible/vault/vault-generate-backend-tls.yml similarity index 100% rename from etc/kayobe/ansible/vault-generate-backend-tls.yml rename to etc/kayobe/ansible/vault/vault-generate-backend-tls.yml diff --git a/etc/kayobe/ansible/vault-generate-internal-tls.yml b/etc/kayobe/ansible/vault/vault-generate-internal-tls.yml similarity index 100% rename from etc/kayobe/ansible/vault-generate-internal-tls.yml rename to etc/kayobe/ansible/vault/vault-generate-internal-tls.yml diff --git a/etc/kayobe/ansible/vault-generate-test-external-tls.yml b/etc/kayobe/ansible/vault/vault-generate-test-external-tls.yml similarity index 100% rename from etc/kayobe/ansible/vault-generate-test-external-tls.yml rename to etc/kayobe/ansible/vault/vault-generate-test-external-tls.yml diff --git a/etc/kayobe/ansible/vault-unseal-overcloud.yml b/etc/kayobe/ansible/vault/vault-unseal-overcloud.yml similarity index 100% rename from etc/kayobe/ansible/vault-unseal-overcloud.yml rename to etc/kayobe/ansible/vault/vault-unseal-overcloud.yml diff --git a/etc/kayobe/ansible/vault-unseal-seed.yml b/etc/kayobe/ansible/vault/vault-unseal-seed.yml similarity index 100% rename from etc/kayobe/ansible/vault-unseal-seed.yml rename to etc/kayobe/ansible/vault/vault-unseal-seed.yml diff --git a/etc/kayobe/environments/aufn-ceph/a-universe-from-nothing.sh b/etc/kayobe/environments/aufn-ceph/a-universe-from-nothing.sh index 4b35d3cf8..f9bd0628c 100755 --- a/etc/kayobe/environments/aufn-ceph/a-universe-from-nothing.sh +++ b/etc/kayobe/environments/aufn-ceph/a-universe-from-nothing.sh @@ -84,10 +84,10 @@ kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/configure-local-networking.sh # Sync package & container repositories. -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-sync.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-repo-publish.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-sync.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp/pulp-container-publish.yml # Re-run full task to set up bifrost_deploy etc. using newly-populated pulp repo kayobe seed service deploy @@ -104,8 +104,8 @@ kayobe overcloud inventory discover kayobe overcloud hardware inspect kayobe overcloud provision kayobe overcloud host configure -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm.yml -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cephadm-gather-keys.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph/cephadm-gather-keys.yml kayobe overcloud container image pull kayobe overcloud service deploy source $KOLLA_CONFIG_PATH/public-openrc.sh diff --git a/etc/kayobe/environments/ci-aio/automated-setup.sh b/etc/kayobe/environments/ci-aio/automated-setup.sh index 77167803a..f34ba1c10 100644 --- a/etc/kayobe/environments/ci-aio/automated-setup.sh +++ b/etc/kayobe/environments/ci-aio/automated-setup.sh @@ -82,7 +82,7 @@ source kayobe-env --environment ci-aio kayobe control host bootstrap -kayobe playbook run etc/kayobe/ansible/growroot.yml etc/kayobe/ansible/purge-command-not-found.yml +kayobe playbook run etc/kayobe/ansible/tools/growroot.yml etc/kayobe/ansible/fixes/purge-command-not-found.yml kayobe overcloud host configure diff --git a/etc/kayobe/environments/ci-multinode/hooks/overcloud-host-configure/pre.d/10-fix-hostname.yml b/etc/kayobe/environments/ci-multinode/hooks/overcloud-host-configure/pre.d/10-fix-hostname.yml index 829fbfd77..2fe412184 120000 --- a/etc/kayobe/environments/ci-multinode/hooks/overcloud-host-configure/pre.d/10-fix-hostname.yml +++ b/etc/kayobe/environments/ci-multinode/hooks/overcloud-host-configure/pre.d/10-fix-hostname.yml @@ -1 +1 @@ -../../../../../ansible/fix-hostname.yml \ No newline at end of file +../../../../../ansible/fixes/fix-hostname.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/control-host-bootstrap/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/control-host-bootstrap/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/control-host-bootstrap/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/control-host-bootstrap/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/control-host-upgrade/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/control-host-upgrade/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/control-host-upgrade/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/control-host-upgrade/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/infra-vm-host-configure/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/infra-vm-service-deploy/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-configure/post.d/99-cis.yml b/etc/kayobe/hooks/overcloud-host-configure/post.d/99-cis.yml index 9c132efbc..ef046a8a8 100644 --- a/etc/kayobe/hooks/overcloud-host-configure/post.d/99-cis.yml +++ b/etc/kayobe/hooks/overcloud-host-configure/post.d/99-cis.yml @@ -1,4 +1,4 @@ --- -- import_playbook: ../../../ansible/cis.yml +- import_playbook: ../../../ansible/maintenance/cis.yml when: stackhpc_enable_cis_benchmark_hardening_hook | bool diff --git a/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/overcloud-host-configure/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-configure/pre.d/pci-passthrough.yml b/etc/kayobe/hooks/overcloud-host-configure/pre.d/pci-passthrough.yml index ffdf55f6a..6a5f6fd2c 120000 --- a/etc/kayobe/hooks/overcloud-host-configure/pre.d/pci-passthrough.yml +++ b/etc/kayobe/hooks/overcloud-host-configure/pre.d/pci-passthrough.yml @@ -1 +1 @@ -../../../ansible/pci-passthrough.yml \ No newline at end of file +../../../ansible/maintenance/pci-passthrough.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-package-update/post.d/10-fix-grub-rl9.yml b/etc/kayobe/hooks/overcloud-host-package-update/post.d/10-fix-grub-rl9.yml index 775762abf..7a1ed099d 120000 --- a/etc/kayobe/hooks/overcloud-host-package-update/post.d/10-fix-grub-rl9.yml +++ b/etc/kayobe/hooks/overcloud-host-package-update/post.d/10-fix-grub-rl9.yml @@ -1 +1 @@ -../../../ansible/fix-grub-rl9.yml \ No newline at end of file +../../../ansible/fixes/fix-grub-rl9.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/overcloud-host-upgrade/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-os-capacity-exporter.yml b/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-os-capacity-exporter.yml index 0cc70aace..eb14c99e7 120000 --- a/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-os-capacity-exporter.yml +++ b/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-os-capacity-exporter.yml @@ -1 +1 @@ -../../../ansible/deploy-os-capacity-exporter.yml \ No newline at end of file +../../../ansible/deployment/deploy-os-capacity-exporter.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-radosgw-usage-exporter.yml b/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-radosgw-usage-exporter.yml index 3d939329a..720ccda99 120000 --- a/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-radosgw-usage-exporter.yml +++ b/etc/kayobe/hooks/overcloud-service-deploy/post.d/deploy-radosgw-usage-exporter.yml @@ -1 +1 @@ -../../../ansible/deploy-radosgw-usage-exporter.yml \ No newline at end of file +../../../ansible/deployment/deploy-radosgw-usage-exporter.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/overcloud-service-deploy/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/overcloud-service-reconfigure/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-upgrade/post.d/deploy-os-capacity-exporter.yml b/etc/kayobe/hooks/overcloud-service-upgrade/post.d/deploy-os-capacity-exporter.yml index 0cc70aace..eb14c99e7 120000 --- a/etc/kayobe/hooks/overcloud-service-upgrade/post.d/deploy-os-capacity-exporter.yml +++ b/etc/kayobe/hooks/overcloud-service-upgrade/post.d/deploy-os-capacity-exporter.yml @@ -1 +1 @@ -../../../ansible/deploy-os-capacity-exporter.yml \ No newline at end of file +../../../ansible/deployment/deploy-os-capacity-exporter.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/overcloud-service-upgrade/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-host-configure/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/seed-host-configure/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/seed-host-configure/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/seed-host-configure/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-host-configure/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/seed-host-configure/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/seed-host-configure/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/seed-host-configure/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/seed-hypervisor-host-configure/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kayobe-version.yml b/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kayobe-version.yml index bec8ed4c6..d64c1cc85 120000 --- a/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kayobe-version.yml +++ b/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kayobe-version.yml @@ -1 +1 @@ -../../../ansible/check-kayobe-version.yml \ No newline at end of file +../../../ansible/tools/check-kayobe-version.yml \ No newline at end of file diff --git a/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kolla-ansible-version.yml b/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kolla-ansible-version.yml index 0f7651f53..e96e0241b 120000 --- a/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kolla-ansible-version.yml +++ b/etc/kayobe/hooks/seed-service-deploy/pre.d/check-kolla-ansible-version.yml @@ -1 +1 @@ -../../../ansible/check-kolla-ansible-version.yml \ No newline at end of file +../../../ansible/tools/check-kolla-ansible-version.yml \ No newline at end of file diff --git a/etc/kayobe/inventory/group_vars/all/growroot b/etc/kayobe/inventory/group_vars/all/growroot index 280cee665..0fefc4b01 100644 --- a/etc/kayobe/inventory/group_vars/all/growroot +++ b/etc/kayobe/inventory/group_vars/all/growroot @@ -1,3 +1,3 @@ --- -# Name of the LVM VG containing the root PV for ansible/growroot.yml +# Name of the LVM VG containing the root PV for ansible/tools/growroot.yml growroot_vg: "rootvg" diff --git a/releasenotes/notes/ansible-playbook-categories-4abf3a4246d45cba.yaml b/releasenotes/notes/ansible-playbook-categories-4abf3a4246d45cba.yaml new file mode 100644 index 000000000..e9d1c70bc --- /dev/null +++ b/releasenotes/notes/ansible-playbook-categories-4abf3a4246d45cba.yaml @@ -0,0 +1,12 @@ +--- +upgrade: + - | + The playbooks under ``etc/kayobe/ansible`` have been subdivided into + different categories to make them easier to navigate. This change may + result in merge conflicts where playbooks have been edited downstream, and + broken hooks where symlinks have been used. + + To mitigate the impact of these changes, two scripts have been added to + help fix broken links. ``tools/get-new-playbook-path.sh`` returns the new + category of a given playbook, and ``tools/magic-symlink-fix.sh`` attempts + to fix any broken symlinks in the kayobe configuration. diff --git a/terraform/aio/README.rst b/terraform/aio/README.rst index 0e173ad24..60382ebac 100644 --- a/terraform/aio/README.rst +++ b/terraform/aio/README.rst @@ -179,7 +179,7 @@ Configure aio resources: .. code-block:: console - sudo -E docker run -it --rm -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY kayobe:latest /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml + sudo -E docker run -it --rm -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY kayobe:latest /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/tools/configure-aio-resources.yml Run Tempest: diff --git a/tools/get-new-playbook-path.sh b/tools/get-new-playbook-path.sh new file mode 100755 index 000000000..b3467c897 --- /dev/null +++ b/tools/get-new-playbook-path.sh @@ -0,0 +1,139 @@ +#!/bin/bash + +# Script to determine the new directory of a playbook based on its name. + +# Check if an argument is provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +PLAYBOOK_NAME="$1" + +# Arrays for specific cases +PULP_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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_PLAYBOOKS=( + "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" +) + + +# Match name +if [[ " ${PULP_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "pulp/" +elif [[ " ${CEPH_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "ceph/" +elif [[ " ${VAULT_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "vault/" +elif [[ " ${BAO_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "bao/" +elif [[ " ${FIXES_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "fixes/" +elif [[ " ${DEPLOYMENT_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "deployment/" +elif [[ " ${MAINTENANCE_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "maintenance/" +elif [[ " ${TOOLS_PLAYBOOKS[*]} " =~ [[:space:]]$PLAYBOOK_NAME[[:space:]] ]]; then + echo "tools/" +else + echo "Error: Unknown playbook name '$PLAYBOOK_NAME'" >&2 + exit 1 +fi diff --git a/tools/magic-symlink-fix.sh b/tools/magic-symlink-fix.sh new file mode 100755 index 000000000..dcff59ee2 --- /dev/null +++ b/tools/magic-symlink-fix.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Script to fix broken symlinks to playbooks by updating their paths. + +# Ensure KAYOBE_CONFIG_PATH is defined +if [[ -z "$KAYOBE_CONFIG_PATH" ]]; then + echo "Error: KAYOBE_CONFIG_PATH is not defined." + exit 1 +fi + +pushd "$KAYOBE_CONFIG_PATH/../.." > /dev/null + +HELPER_SCRIPT="$KAYOBE_CONFIG_PATH/../../tools/get-new-playbook-path.sh" + +# Find all broken symlinks +for symlink in $(find . -xtype l); do + + # Set up vars + symlink_directory=$(dirname "$symlink") + target=$(readlink "$symlink") + playbook_name=$(basename "$target") + + # Get new directory name + new_directory=$("$HELPER_SCRIPT" "$playbook_name") + if [[ -z "$new_directory" ]]; then + echo "Warning: Could not determine new dir for playbook '$playbook_name' - Skipping '$symlink'" + continue + fi + + # Construct the new target path & check it actually exists + new_target=$(dirname "$target")/$new_directory$playbook_name + if [[ ! -e "$symlink_directory/$new_target" ]]; then + echo "Warning: New target '$symlink_directory/$new_target' does not exist. Skipping '$symlink'." + exit 0 + continue + fi + + # Update the symlink + ln -sf "$new_target" "$symlink" + echo "Updated symlink: $symlink -> $new_target" +done + +popd > /dev/null diff --git a/tools/ubuntu-upgrade-infra-vm.sh b/tools/ubuntu-upgrade-infra-vm.sh index 8316021b4..b7a79200c 100755 --- a/tools/ubuntu-upgrade-infra-vm.sh +++ b/tools/ubuntu-upgrade-infra-vm.sh @@ -29,6 +29,6 @@ fi set -x -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ubuntu-upgrade.yml -e os_release=noble --limit $1 +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/ubuntu-upgrade.yml -e os_release=noble --limit $1 kayobe infra vm host configure --limit $1 -e os_release=noble diff --git a/tools/ubuntu-upgrade-overcloud.sh b/tools/ubuntu-upgrade-overcloud.sh index 05d50068b..1fed28592 100755 --- a/tools/ubuntu-upgrade-overcloud.sh +++ b/tools/ubuntu-upgrade-overcloud.sh @@ -29,8 +29,8 @@ fi set -x -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ubuntu-upgrade.yml -e os_release=noble --limit $1 +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/ubuntu-upgrade.yml -e os_release=noble --limit $1 -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ovn-fix-chassis-priorities.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/fixes/ovn-fix-chassis-priorities.yml kayobe overcloud host configure --limit $1 -e os_release=noble diff --git a/tools/ubuntu-upgrade-seed-hypervisor.sh b/tools/ubuntu-upgrade-seed-hypervisor.sh index 259d0da5d..e165b11af 100755 --- a/tools/ubuntu-upgrade-seed-hypervisor.sh +++ b/tools/ubuntu-upgrade-seed-hypervisor.sh @@ -24,6 +24,6 @@ fi set -x -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ubuntu-upgrade.yml -e os_release=noble --limit seed-hypervisor +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/ubuntu-upgrade.yml -e os_release=noble --limit seed-hypervisor kayobe seed hypervisor host configure -e os_release=noble diff --git a/tools/ubuntu-upgrade-seed.sh b/tools/ubuntu-upgrade-seed.sh index 96553225b..cf5ddf40b 100755 --- a/tools/ubuntu-upgrade-seed.sh +++ b/tools/ubuntu-upgrade-seed.sh @@ -24,6 +24,6 @@ fi set -x -kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ubuntu-upgrade.yml -e os_release=noble --limit seed +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/maintenance/ubuntu-upgrade.yml -e os_release=noble --limit seed kayobe seed host configure -e os_release=noble