diff --git a/.ansible-lint b/.ansible-lint index d03f74b4..ebe6361f 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,2 +1,6 @@ +--- skip_list: - - unnamed-task # All tasks should be named + - no-changed-when + - role-name + - unnamed-task # All tasks should be named + - yaml[line-length] diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 6a5e7340..12e39b73 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -6,7 +6,6 @@ on: branches: - main pull_request: - jobs: ansible-lint: name: Ansible Lint @@ -14,23 +13,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Install Ansible collections - run: | - ansible-galaxy collection install -r requirements.yml - - - name: Install pip dependencies - run: | - pip install -r requirements.txt - - # FIXME: rich pinned due to https://github.com/ansible-community/ansible-lint/issues/1795. - - name: Install ansible-lint - run: | - pip install ansible-core==2.12.* 'rich<11' ansible-lint==5.3.* - - - name: Lint Ansible playbooks - run: | - ansible-lint -v --force-color ansible/*.yml - env: - ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + - uses: actions/checkout@v4 + + - name: Install Ansible collections + run: | + ansible-galaxy collection install -r requirements.yml + + - name: Install pip dependencies + run: | + pip install -r requirements.txt + + # FIXME: rich pinned due to https://github.com/ansible-community/ansible-lint/issues/1795. + - name: Install ansible-lint + run: | + pip install ansible-core==2.16.* 'rich<11' ansible-lint==24.* + + - name: Lint Ansible playbooks + run: | + ansible-lint -v --force-color ansible/*.yml + env: + ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} diff --git a/.github/workflows/ansible-validations.yml b/.github/workflows/ansible-validations.yml index 6510f4df..9b9ff35c 100644 --- a/.github/workflows/ansible-validations.yml +++ b/.github/workflows/ansible-validations.yml @@ -6,9 +6,8 @@ on: branches: - main pull_request: - env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: ansible-validations: diff --git a/.github/workflows/container-promote-old.yml b/.github/workflows/container-promote-old.yml index 4e12de31..8c3f7893 100644 --- a/.github/workflows/container-promote-old.yml +++ b/.github/workflows/container-promote-old.yml @@ -26,34 +26,34 @@ on: default: true env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: container-promote: name: Promote container repositories runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Promote images from stackhpc-dev to stackhpc namespace in Ark - run: | - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-container-promote-old.yml \ - -e dev_pulp_repository_container_promotion_tag="$TAG" \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kolla_base_distros_override="'$DISTROS'" \ - -e sync_old_images="'$PROMOTE_OLD_IMAGES'" \ - -e sync_new_images="'$PROMOTE_NEW_IMAGES'" - env: - TAG: ${{ github.event.inputs.tag }} - FILTER: ${{ github.event.inputs.filter }} - DISTROS: ${{ github.event.inputs.distros }} - PROMOTE_OLD_IMAGES: ${{ github.event.inputs.promote-old-images }} - PROMOTE_NEW_IMAGES: ${{ github.event.inputs.promote-new-images }} + - name: Promote images from stackhpc-dev to stackhpc namespace in Ark + run: | + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-container-promote-old.yml \ + -e dev_pulp_repository_container_promotion_tag="$TAG" \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kolla_base_distros_override="'$DISTROS'" \ + -e sync_old_images="'$PROMOTE_OLD_IMAGES'" \ + -e sync_new_images="'$PROMOTE_NEW_IMAGES'" + env: + TAG: ${{ github.event.inputs.tag }} + FILTER: ${{ github.event.inputs.filter }} + DISTROS: ${{ github.event.inputs.distros }} + PROMOTE_OLD_IMAGES: ${{ github.event.inputs.promote-old-images }} + PROMOTE_NEW_IMAGES: ${{ github.event.inputs.promote-new-images }} diff --git a/.github/workflows/container-promote.yml b/.github/workflows/container-promote.yml index 363cfe99..849c77e2 100644 --- a/.github/workflows/container-promote.yml +++ b/.github/workflows/container-promote.yml @@ -18,52 +18,52 @@ on: default: false env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: container-promote: name: Promote container repositories runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Clone StackHPC Kayobe configuration repository - uses: actions/checkout@v4 - with: - repository: stackhpc/stackhpc-kayobe-config - ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }} - path: stackhpc-kayobe-config + - name: Clone StackHPC Kayobe configuration repository + uses: actions/checkout@v4 + with: + repository: stackhpc/stackhpc-kayobe-config + ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }} + path: stackhpc-kayobe-config - - name: Promote images from stackhpc-dev to stackhpc namespace in Ark - run: | - args="" - if [[ $CHECK_MODE = true ]]; then - args="$args --check --diff" - fi - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-container-tag-query-kayobe.yml \ - ansible/dev-pulp-container-promote.yml \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kayobe_config_repo_path=./stackhpc-kayobe-config/ \ - $args - env: - FILTER: ${{ github.event.inputs.filter }} - CHECK_MODE: ${{ inputs.check_mode }} + - name: Promote images from stackhpc-dev to stackhpc namespace in Ark + run: | + args="" + if [[ $CHECK_MODE = true ]]; then + args="$args --check --diff" + fi + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-container-tag-query-kayobe.yml \ + ansible/dev-pulp-container-promote.yml \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kayobe_config_repo_path=./stackhpc-kayobe-config/ \ + $args + env: + FILTER: ${{ github.event.inputs.filter }} + CHECK_MODE: ${{ inputs.check_mode }} - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n - check_mode: ${{ inputs.check_mode }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n + check_mode: ${{ inputs.check_mode }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() diff --git a/.github/workflows/container-publish.yml b/.github/workflows/container-publish.yml index d30e1458..ac3a3d39 100644 --- a/.github/workflows/container-publish.yml +++ b/.github/workflows/container-publish.yml @@ -4,10 +4,10 @@ on: push: branches: [main] paths: - - '.github/workflows/container-publish.yml' - - 'ansible/dev-pulp-container-publish.yml' - - 'ansible/inventory/group_vars/all/dev-pulp-containers' - - 'ansible/inventory/group_vars/all/kolla' + - ".github/workflows/container-publish.yml" + - "ansible/dev-pulp-container-publish.yml" + - "ansible/inventory/group_vars/all/dev-pulp-containers" + - "ansible/inventory/group_vars/all/kolla" workflow_dispatch: inputs: filter: @@ -22,37 +22,37 @@ on: default: "" env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: container-publish: name: Publish container repositories runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Publish container repositories - run: | - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-container-publish.yml \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kolla_base_distros_override="'$DISTROS'" - env: - FILTER: ${{ github.event.inputs.filter }} - DISTROS: ${{ github.event.inputs.distros }} + - name: Publish container repositories + run: | + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-container-publish.yml \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kolla_base_distros_override="'$DISTROS'" + env: + FILTER: ${{ github.event.inputs.filter }} + DISTROS: ${{ github.event.inputs.distros }} - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - distros: ${{ inputs.distros }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() && github.event_name == 'push' + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + distros: ${{ inputs.distros }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() && github.event_name == 'push' diff --git a/.github/workflows/container-sync.yml b/.github/workflows/container-sync.yml index cc1ac39d..e9567324 100644 --- a/.github/workflows/container-sync.yml +++ b/.github/workflows/container-sync.yml @@ -27,7 +27,7 @@ on: default: false env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: container-sync: @@ -35,68 +35,68 @@ jobs: runs-on: arc-release-train-runner timeout-minutes: 720 steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Configure access control for stackhpc-dev namespace in Ark - run: | - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-container-publish.yml \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kolla_base_distros_override="'$DISTROS'" \ - -e sync_old_images="'$SYNC_OLD_IMAGES'" \ - -e sync_new_images="'$SYNC_NEW_IMAGES'" - env: - FILTER: ${{ github.event.inputs.filter }} - DISTROS: ${{ github.event.inputs.distros }} - SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} - SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} + - name: Configure access control for stackhpc-dev namespace in Ark + run: | + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-container-publish.yml \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kolla_base_distros_override="'$DISTROS'" \ + -e sync_old_images="'$SYNC_OLD_IMAGES'" \ + -e sync_new_images="'$SYNC_NEW_IMAGES'" + env: + FILTER: ${{ github.event.inputs.filter }} + DISTROS: ${{ github.event.inputs.distros }} + SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} + SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} - - name: Sync images in test with stackhpc-dev namespace in Ark - run: | - ansible-playbook -i ansible/inventory \ - ansible/test-pulp-container-sync.yml \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kolla_base_distros_override="'$DISTROS'" \ - -e sync_old_images="'$SYNC_OLD_IMAGES'" \ - -e sync_new_images="'$SYNC_NEW_IMAGES'" - if: inputs.sync-test-pulp - env: - FILTER: ${{ github.event.inputs.filter }} - DISTROS: ${{ github.event.inputs.distros }} - SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} - SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} + - name: Sync images in test with stackhpc-dev namespace in Ark + run: | + ansible-playbook -i ansible/inventory \ + ansible/test-pulp-container-sync.yml \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kolla_base_distros_override="'$DISTROS'" \ + -e sync_old_images="'$SYNC_OLD_IMAGES'" \ + -e sync_new_images="'$SYNC_NEW_IMAGES'" + if: inputs.sync-test-pulp + env: + FILTER: ${{ github.event.inputs.filter }} + DISTROS: ${{ github.event.inputs.distros }} + SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} + SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} - - name: Publish images in test - run: | - ansible-playbook -i ansible/inventory \ - ansible/test-pulp-container-publish.yml \ - -e kolla_container_image_filter="'$FILTER'" \ - -e kolla_base_distros_override="'$DISTROS'" \ - -e sync_old_images="'$SYNC_OLD_IMAGES'" \ - -e sync_new_images="'$SYNC_NEW_IMAGES'" - if: inputs.sync-test-pulp - env: - FILTER: ${{ github.event.inputs.filter }} - DISTROS: ${{ github.event.inputs.distros }} - SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} - SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} + - name: Publish images in test + run: | + ansible-playbook -i ansible/inventory \ + ansible/test-pulp-container-publish.yml \ + -e kolla_container_image_filter="'$FILTER'" \ + -e kolla_base_distros_override="'$DISTROS'" \ + -e sync_old_images="'$SYNC_OLD_IMAGES'" \ + -e sync_new_images="'$SYNC_NEW_IMAGES'" + if: inputs.sync-test-pulp + env: + FILTER: ${{ github.event.inputs.filter }} + DISTROS: ${{ github.event.inputs.distros }} + SYNC_OLD_IMAGES: ${{ github.event.inputs.sync-old-images }} + SYNC_NEW_IMAGES: ${{ github.event.inputs.sync-new-images }} - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - distros: ${{ inputs.distros }}\n - sync-old-images: ${{ inputs.sync-old-images }}\n - sync-new-images: ${{ inputs.sync-new-images }}\n - sync-test-pulp: ${{ inputs.sync-test-pulp }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + distros: ${{ inputs.distros }}\n + sync-old-images: ${{ inputs.sync-old-images }}\n + sync-new-images: ${{ inputs.sync-new-images }}\n + sync-test-pulp: ${{ inputs.sync-test-pulp }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index a251c874..e6b249e5 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -13,4 +13,3 @@ jobs: python-version: 3.x - run: pip install -r docs-requirements.txt - run: mkdocs build - diff --git a/.github/workflows/package-promote.yml b/.github/workflows/package-promote.yml index c63d8c8a..b880e0a0 100644 --- a/.github/workflows/package-promote.yml +++ b/.github/workflows/package-promote.yml @@ -19,53 +19,53 @@ on: default: false env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: package-promote: name: Promote package repositories runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Clone StackHPC Kayobe configuration repository - uses: actions/checkout@v4 - with: - repository: stackhpc/stackhpc-kayobe-config - ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }} - path: stackhpc-kayobe-config + - name: Clone StackHPC Kayobe configuration repository + uses: actions/checkout@v4 + with: + repository: stackhpc/stackhpc-kayobe-config + ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }} + path: stackhpc-kayobe-config - - name: Promote package repositories in Ark to release - run: | - args="" - if [[ $CHECK_MODE = true ]]; then - args="$args --check --diff" - fi - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-repo-version-query-kayobe.yml \ - ansible/dev-pulp-repo-promote.yml \ - -e deb_package_repo_filter="'$FILTER'" \ - -e rpm_package_repo_filter="'$FILTER'" \ - -e kayobe_config_repo_path=./stackhpc-kayobe-config/ \ - $args - env: - FILTER: ${{ github.event.inputs.filter }} - CHECK_MODE: ${{ inputs.check_mode }} + - name: Promote package repositories in Ark to release + run: | + args="" + if [[ $CHECK_MODE = true ]]; then + args="$args --check --diff" + fi + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-repo-version-query-kayobe.yml \ + ansible/dev-pulp-repo-promote.yml \ + -e deb_package_repo_filter="'$FILTER'" \ + -e rpm_package_repo_filter="'$FILTER'" \ + -e kayobe_config_repo_path=./stackhpc-kayobe-config/ \ + $args + env: + FILTER: ${{ github.event.inputs.filter }} + CHECK_MODE: ${{ inputs.check_mode }} - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n - check_mode: ${{ inputs.check_mode }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n + check_mode: ${{ inputs.check_mode }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() diff --git a/.github/workflows/package-sync-nightly.yml b/.github/workflows/package-sync-nightly.yml index bcf39858..216d1f0e 100644 --- a/.github/workflows/package-sync-nightly.yml +++ b/.github/workflows/package-sync-nightly.yml @@ -3,9 +3,9 @@ name: Nightly package repository sync on: schedule: # Daily at 23:17 - - cron: '17 23 * * *' + - cron: "17 23 * * *" env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true jobs: sync-matrix-build: name: Build package matrix of package repo sync jobs @@ -13,34 +13,33 @@ jobs: outputs: matrix: ${{ steps.matrix-build.outputs.matrix }} steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Checkout - uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt update + sudo apt install wget - - name: Install dependencies - run: | - sudo apt update - sudo apt install wget + - name: Install YQ + uses: dcarbone/install-yq-action@v1.1.1 - - name: Install YQ - uses: dcarbone/install-yq-action@v1.1.1 + - name: Create sync matrix + id: matrix-build + # Use YQ to make a list of all unique sync groups, and format as a GH + # actions matrix + run: | + groups=$(yq -o=json -I=0 \ + '([.rpm_package_repos[] | .sync_group | select(.) ]) + ([.deb_package_repos[] | .sync_group | select(.) ]) | unique' \ + ansible/inventory/group_vars/all/package-repos) + echo -n "matrix={\"sync_group\": " >> $GITHUB_OUTPUT + echo -n $groups >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT - - name: Create sync matrix - id: matrix-build - # Use YQ to make a list of all unique sync groups, and format as a GH - # actions matrix - run: | - groups=$(yq -o=json -I=0 \ - '([.rpm_package_repos[] | .sync_group | select(.) ]) + ([.deb_package_repos[] | .sync_group | select(.) ]) | unique' \ - ansible/inventory/group_vars/all/package-repos) - echo -n "matrix={\"sync_group\": " >> $GITHUB_OUTPUT - echo -n $groups >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT - - - name: Print sync matrix - run: | - echo "Package sync matrix:" - echo -n "${{ steps.matrix-build.outputs.matrix }}" + - name: Print sync matrix + run: | + echo "Package sync matrix:" + echo -n "${{ steps.matrix-build.outputs.matrix }}" sync-matrix-run: name: Sync @@ -49,10 +48,10 @@ jobs: strategy: matrix: ${{ fromJson(needs.sync-matrix-build.outputs.matrix) }} max-parallel: 1 - fail-fast: False + fail-fast: false uses: stackhpc/stackhpc-release-train/.github/workflows/package-sync.yml@main with: - sync_ark: True - sync_test: False + sync_ark: true + sync_test: false package_sync_group: ${{ matrix.sync_group }} secrets: inherit diff --git a/.github/workflows/package-sync-version-test-pulp.yml b/.github/workflows/package-sync-version-test-pulp.yml index 02ee3c33..1130604e 100644 --- a/.github/workflows/package-sync-version-test-pulp.yml +++ b/.github/workflows/package-sync-version-test-pulp.yml @@ -15,7 +15,7 @@ on: default: "" env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: @@ -23,28 +23,28 @@ jobs: name: Sync specific package repository versions from Ark to Test Pulp runs-on: arc-release-train-runner steps: - - name: This workflow does not currently work. Test pulp does not exist. - run: exit 1 + - name: This workflow does not currently work. Test pulp does not exist. + run: exit 1 - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Sync and publish package repositories in test - run: | - ansible-playbook -i ansible/inventory \ - ansible/test-pulp-repo-specific-version-query.yml \ - ansible/test-pulp-repo-sync.yml \ - ansible/test-pulp-repo-publication-cleanup.yml \ - ansible/test-pulp-repo-publish.yml \ - -e test_pulp_sync_repo_version="'$REPO_VERSION'" \ - -e deb_package_repo_filter="'$FILTER'" \ - -e rpm_package_repo_filter="'$FILTER'" - env: - FILTER: ${{ github.event.inputs.filter }} - REPO_VERSION: ${{ github.event.inputs.repo_version }} + - name: Sync and publish package repositories in test + run: | + ansible-playbook -i ansible/inventory \ + ansible/test-pulp-repo-specific-version-query.yml \ + ansible/test-pulp-repo-sync.yml \ + ansible/test-pulp-repo-publication-cleanup.yml \ + ansible/test-pulp-repo-publish.yml \ + -e test_pulp_sync_repo_version="'$REPO_VERSION'" \ + -e deb_package_repo_filter="'$FILTER'" \ + -e rpm_package_repo_filter="'$FILTER'" + env: + FILTER: ${{ github.event.inputs.filter }} + REPO_VERSION: ${{ github.event.inputs.repo_version }} diff --git a/.github/workflows/package-sync.yml b/.github/workflows/package-sync.yml index 483723dd..ddd2f7bc 100644 --- a/.github/workflows/package-sync.yml +++ b/.github/workflows/package-sync.yml @@ -34,7 +34,7 @@ on: required: false default: "" env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: package-sync-ark: @@ -43,45 +43,44 @@ jobs: timeout-minutes: 480 if: inputs.sync_ark steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Checkout - uses: actions/checkout@v4 + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Sync and publish package repositories in Ark + uses: nick-fields/retry@v3 + with: + timeout_minutes: 360 + max_attempts: 2 + command: | + ansible-playbook -i ansible/inventory \ + ansible/dev-pulp-repo-sync.yml \ + ansible/dev-pulp-repo-publication-cleanup.yml \ + ansible/dev-pulp-repo-publish.yml \ + -e package_sync_group="'$PACKAGE_SYNC_GROUP'" \ + -e deb_package_repo_filter="'$FILTER'" \ + -e rpm_package_repo_filter="'$FILTER'" + retry_wait_seconds: 3600 + env: + FILTER: ${{ inputs.filter }} + PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }} - - name: Sync and publish package repositories in Ark - uses: nick-fields/retry@v3 - with: - timeout_minutes: 360 - max_attempts: 2 - command: | - ansible-playbook -i ansible/inventory \ - ansible/dev-pulp-repo-sync.yml \ - ansible/dev-pulp-repo-publication-cleanup.yml \ - ansible/dev-pulp-repo-publish.yml \ - -e package_sync_group="'$PACKAGE_SYNC_GROUP'" \ - -e deb_package_repo_filter="'$FILTER'" \ - -e rpm_package_repo_filter="'$FILTER'" - retry_wait_seconds: 3600 - env: - FILTER: ${{ inputs.filter }} - PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }} - - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - sync_ark: ${{ inputs.sync_ark }}\n - sync_test: ${{ inputs.sync_test }}\n - package_sync_group: ${{ inputs.package_sync_group }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + sync_ark: ${{ inputs.sync_ark }}\n + sync_test: ${{ inputs.sync_test }}\n + package_sync_group: ${{ inputs.package_sync_group }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() package-sync-test: name: Sync package repositories in test @@ -90,42 +89,42 @@ jobs: timeout-minutes: 480 if: inputs.sync_test steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Setup Release Train & dependencies - uses: ./.github/actions/setup - with: - vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} - vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} + - name: Setup Release Train & dependencies + uses: ./.github/actions/setup + with: + vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} + vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }} - - name: Sync and publish package repositories in test - uses: nick-fields/retry@v3 - with: - timeout_minutes: 360 - max_attempts: 2 - command: | - ansible-playbook -i ansible/inventory \ - ansible/test-pulp-repo-version-query.yml \ - ansible/test-pulp-repo-sync.yml \ - ansible/test-pulp-repo-publication-cleanup.yml \ - ansible/test-pulp-repo-publish.yml \ - -e package_sync_group="'$PACKAGE_SYNC_GROUP'" \ - -e deb_package_repo_filter="'$FILTER'" \ - -e rpm_package_repo_filter="'$FILTER'" - retry_wait_seconds: 3600 - env: - FILTER: ${{ inputs.filter }} - PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }} + - name: Sync and publish package repositories in test + uses: nick-fields/retry@v3 + with: + timeout_minutes: 360 + max_attempts: 2 + command: | + ansible-playbook -i ansible/inventory \ + ansible/test-pulp-repo-version-query.yml \ + ansible/test-pulp-repo-sync.yml \ + ansible/test-pulp-repo-publication-cleanup.yml \ + ansible/test-pulp-repo-publish.yml \ + -e package_sync_group="'$PACKAGE_SYNC_GROUP'" \ + -e deb_package_repo_filter="'$FILTER'" \ + -e rpm_package_repo_filter="'$FILTER'" + retry_wait_seconds: 3600 + env: + FILTER: ${{ inputs.filter }} + PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }} - - name: Send message to Slack via Workflow Builder - uses: ./.github/actions/slack-alert - with: - inputs: >- - filter: ${{ inputs.filter }}\n - sync_ark: ${{ inputs.sync_ark }}\n - sync_test: ${{ inputs.sync_test }}\n - package_sync_group: ${{ inputs.package_sync_group }}\n - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} - if: failure() + - name: Send message to Slack via Workflow Builder + uses: ./.github/actions/slack-alert + with: + inputs: >- + filter: ${{ inputs.filter }}\n + sync_ark: ${{ inputs.sync_ark }}\n + sync_test: ${{ inputs.sync_test }}\n + package_sync_group: ${{ inputs.package_sync_group }}\n + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} + if: failure() diff --git a/.github/workflows/package-update-kayobe.yml b/.github/workflows/package-update-kayobe.yml index 6af8bf6c..fe72bda0 100644 --- a/.github/workflows/package-update-kayobe.yml +++ b/.github/workflows/package-update-kayobe.yml @@ -14,7 +14,7 @@ on: default: stackhpc/2023.1 env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass jobs: package-update-kayobe: diff --git a/.github/workflows/source-repo-sync.yml b/.github/workflows/source-repo-sync.yml index 3e4e3724..968a87f0 100644 --- a/.github/workflows/source-repo-sync.yml +++ b/.github/workflows/source-repo-sync.yml @@ -1,13 +1,13 @@ --- name: Synchronise Source Repositories -'on': +"on": push: branches: [main] paths: - - '.github/workflows/source-repo-sync.yml' - - 'ansible/inventory/group_vars/all/source-repositories' - - 'ansible/roles/source-repo-sync/**' - - 'ansible/source-repo-sync.yml' + - ".github/workflows/source-repo-sync.yml" + - "ansible/inventory/group_vars/all/source-repositories" + - "ansible/roles/source-repo-sync/**" + - "ansible/source-repo-sync.yml" workflow_dispatch: permissions: contents: write @@ -24,11 +24,11 @@ jobs: - name: Github checkout 🛎 uses: actions/checkout@v4 with: - persist-credentials: 'false' + persist-credentials: "false" - name: Run ansible playbook 📖 run: ansible-playbook ansible/source-repo-sync.yml -i ansible/inventory env: - ANSIBLE_FORCE_COLOR: True + ANSIBLE_FORCE_COLOR: true GITHUB_TOKEN: ${{secrets.repository_configuration_token}} - name: Send message to Slack via Workflow Builder diff --git a/.github/workflows/terraform-github-import.yml b/.github/workflows/terraform-github-import.yml index 9abc8244..2c4f4510 100644 --- a/.github/workflows/terraform-github-import.yml +++ b/.github/workflows/terraform-github-import.yml @@ -16,14 +16,14 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: './terraform/github/' + working-directory: "./terraform/github/" steps: - name: GitHub Checkout 🛎 uses: actions/checkout@v4 - name: Setup Python 🐍 uses: actions/setup-python@v5 with: - python-version: '3.10.4' + python-version: "3.10.4" - name: Setup Terraform uses: hashicorp/setup-terraform@v3 with: diff --git a/.github/workflows/terraform-github.yml b/.github/workflows/terraform-github.yml index d309464d..0ea1ce70 100644 --- a/.github/workflows/terraform-github.yml +++ b/.github/workflows/terraform-github.yml @@ -1,15 +1,16 @@ +--- name: Terraform GitHub -'on': +"on": push: branches: [main] paths: - - '.github/workflows/terraform-github.yml' - - 'terraform/github/**' + - ".github/workflows/terraform-github.yml" + - "terraform/github/**" pull_request: branches: [main] paths: - - '.github/workflows/terraform-github.yml' - - 'terraform/github/**' + - ".github/workflows/terraform-github.yml" + - "terraform/github/**" env: TF_VAR_GITHUB_APP_PEM_FILE: ${{ secrets.TF_VAR_GITHUB_APP_PEM_FILE }} jobs: @@ -18,7 +19,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: './terraform/github/' + working-directory: "./terraform/github/" steps: - uses: actions/checkout@v4 - uses: hashicorp/setup-terraform@v3 @@ -81,17 +82,17 @@ jobs: #### Terraform Plan 📖\`${{ steps.plan.outcome }}\` - +
Show Plan - + \`\`\`\n ${process.env.PLAN} \`\`\` - +
- + *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`; - + // 3. If we have a comment, update it, otherwise create a new one if (botComment) { github.rest.issues.updateComment({ diff --git a/ansible/dev-pulp-container-promote-old.yml b/ansible/dev-pulp-container-promote-old.yml index 7870cd67..55d77b41 100644 --- a/ansible/dev-pulp-container-promote-old.yml +++ b/ansible/dev-pulp-container-promote-old.yml @@ -9,17 +9,17 @@ gather_facts: false tasks: - name: Fail if container image to promote is not defined - fail: + ansible.builtin.fail: msg: > The container image to promote must be specified via 'dev_pulp_repository_container_promotion_tag' when: dev_pulp_repository_container_promotion_tag is not defined - - debug: + - ansible.builtin.debug: msg: "Promoting tag {{ dev_pulp_repository_container_promotion_tag }}" # Copy tags from stackhpc-dev to stackhpc repositories. - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_container_content vars: pulp_url: "{{ dev_pulp_url }}" diff --git a/ansible/dev-pulp-container-promote.yml b/ansible/dev-pulp-container-promote.yml index 4d11de17..0e551528 100644 --- a/ansible/dev-pulp-container-promote.yml +++ b/ansible/dev-pulp-container-promote.yml @@ -15,18 +15,18 @@ gather_facts: false tasks: - name: Fail if container images to promote are not defined - fail: + ansible.builtin.fail: msg: > The container images to promote must be specified via 'dev_pulp_repository_container_promotion_tags' when: dev_pulp_repository_container_promotion_tags is not defined - name: Display which tags are being promoted - debug: + ansible.builtin.debug: var: "dev_pulp_repository_container_promotion_tags" # Copy tags from stackhpc-dev to stackhpc repositories. - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_container_content vars: pulp_url: "{{ dev_pulp_url }}" diff --git a/ansible/dev-pulp-container-publish.yml b/ansible/dev-pulp-container-publish.yml index 2fb1fed7..2898153c 100644 --- a/ansible/dev-pulp-container-publish.yml +++ b/ansible/dev-pulp-container-publish.yml @@ -9,7 +9,7 @@ hosts: localhost gather_facts: false tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_distribution vars: pulp_url: "{{ dev_pulp_url }}" @@ -21,7 +21,7 @@ hosts: localhost gather_facts: false tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_repository vars: pulp_url: "{{ dev_pulp_url }}" @@ -29,7 +29,7 @@ pulp_password: "{{ dev_pulp_password }}" pulp_repository_container_repos: "{{ dev_pulp_repository_container_repos_release }}" - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_distribution vars: pulp_url: "{{ dev_pulp_url }}" diff --git a/ansible/dev-pulp-container-tag-query-kayobe.yml b/ansible/dev-pulp-container-tag-query-kayobe.yml index 6b76d383..e5e89e14 100644 --- a/ansible/dev-pulp-container-tag-query-kayobe.yml +++ b/ansible/dev-pulp-container-tag-query-kayobe.yml @@ -5,14 +5,15 @@ # upon those tags, which defines the set of container image tags that # will be promoted when the dev-pulp-container-promote.yml playbook is run. -- import_playbook: kayobe-container-tag-query.yml +- name: Import kayobe-container-tag-query playbook + import_playbook: kayobe-container-tag-query.yml - name: Set dev Pulp container image tags to promote from Kayobe config tags hosts: localhost gather_facts: true tasks: - name: Set a fact about container image tags to promote - set_fact: + ansible.builtin.set_fact: dev_pulp_repository_container_promotion_tags: >- {{ kayobe_kolla_image_tags | dict2items | @@ -20,11 +21,11 @@ items2dict }} - name: Display container promotion tags facts - debug: + ansible.builtin.debug: var: dev_pulp_repository_container_promotion_tags - name: Assert that tags variable is populated - assert: + ansible.builtin.assert: that: - dev_pulp_repository_container_promotion_tags | length > 0 msg: >- diff --git a/ansible/dev-pulp-content-guards.yml b/ansible/dev-pulp-content-guards.yml index 77dd9044..211605be 100644 --- a/ansible/dev-pulp-content-guards.yml +++ b/ansible/dev-pulp-content-guards.yml @@ -4,7 +4,7 @@ gather_facts: true tasks: - name: Run stackhpc.pulp.pulp_content_guard role - import_role: + ansible.builtin.import_role: name: stackhpc.pulp.pulp_content_guard vars: pulp_url: "{{ dev_pulp_url }}" diff --git a/ansible/dev-pulp-distribution-list.yml b/ansible/dev-pulp-distribution-list.yml index a0858c85..9d099099 100644 --- a/ansible/dev-pulp-distribution-list.yml +++ b/ansible/dev-pulp-distribution-list.yml @@ -1,7 +1,7 @@ --- - name: Display Pulp distributions, publications & repositories hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ dev_pulp_url }}" pulp_username: "{{ dev_pulp_username }}" @@ -44,7 +44,7 @@ repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ item }}" - debug: + ansible.builtin.debug: var: info loop: "{{ pulp_deb_dists_list.distributions }}" loop_control: @@ -79,7 +79,7 @@ repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ item }}" - debug: + ansible.builtin.debug: var: info loop: "{{ pulp_rpm_dists_list.distributions }}" loop_control: diff --git a/ansible/dev-pulp-repo-promote.yml b/ansible/dev-pulp-repo-promote.yml index 1c7cfd2d..6e35cba7 100644 --- a/ansible/dev-pulp-repo-promote.yml +++ b/ansible/dev-pulp-repo-promote.yml @@ -13,7 +13,7 @@ gather_facts: true tasks: - name: Assert that a versions variable is populated - assert: + ansible.builtin.assert: that: - >- dev_pulp_distribution_deb_promote_versions | length > 0 or diff --git a/ansible/dev-pulp-repo-publication-cleanup.yml b/ansible/dev-pulp-repo-publication-cleanup.yml index 04076f4f..eace1b0e 100644 --- a/ansible/dev-pulp-repo-publication-cleanup.yml +++ b/ansible/dev-pulp-repo-publication-cleanup.yml @@ -10,13 +10,13 @@ - name: Clean up duplicate publications hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ dev_pulp_url }}" pulp_username: "{{ dev_pulp_username }}" pulp_password: "{{ dev_pulp_password }}" tasks: - - import_role: + - ansible.builtin.import_role: name: pulp-rpm-publication-cleanup vars: pulp_rpm_publication_cleanup_repos: "{{ dev_pulp_distribution_rpm | map(attribute='repository') | list }}" diff --git a/ansible/dev-pulp-repo-publish.yml b/ansible/dev-pulp-repo-publish.yml index f7ff8d99..f15122e8 100644 --- a/ansible/dev-pulp-repo-publish.yml +++ b/ansible/dev-pulp-repo-publish.yml @@ -1,19 +1,19 @@ --- - name: Publish dev Pulp repositories hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ dev_pulp_url }}" pulp_username: "{{ dev_pulp_username }}" pulp_password: "{{ dev_pulp_password }}" tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_publication vars: pulp_publication_deb: "{{ dev_pulp_publication_deb }}" pulp_publication_rpm: "{{ dev_pulp_publication_rpm }}" - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_distribution vars: pulp_distribution_deb: "{{ dev_pulp_distribution_deb }}" diff --git a/ansible/dev-pulp-repo-sync.yml b/ansible/dev-pulp-repo-sync.yml index ea8c5388..8326d048 100644 --- a/ansible/dev-pulp-repo-sync.yml +++ b/ansible/dev-pulp-repo-sync.yml @@ -1,9 +1,9 @@ --- - name: Sync dev Pulp repositories hosts: localhost - gather_facts: False + gather_facts: false tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_repository vars: pulp_url: "{{ dev_pulp_url }}" diff --git a/ansible/dev-pulp-repo-version-query-kayobe.yml b/ansible/dev-pulp-repo-version-query-kayobe.yml index 20c0a327..dd7c234a 100644 --- a/ansible/dev-pulp-repo-version-query-kayobe.yml +++ b/ansible/dev-pulp-repo-version-query-kayobe.yml @@ -5,14 +5,15 @@ # upon those versions, which defines the set of repository versions that will # be promoted when the dev-pulp-repo-promote.yml playbook is run. -- import_playbook: kayobe-repo-version-query.yml +- name: Import kayobe-repo-version-query playbook + import_playbook: kayobe-repo-version-query.yml - name: Set dev Pulp repo versions to promote from Kayobe config versions hosts: localhost gather_facts: true tasks: - name: Set a fact about rpm versions to promote - set_fact: + ansible.builtin.set_fact: dev_pulp_distribution_rpm_promote_versions: >- {{ dev_pulp_distribution_rpm_promote_versions | default({}) | @@ -23,7 +24,7 @@ when: item.short_name in kayobe_pulp_repo_versions - name: Set a fact about deb versions to promote - set_fact: + ansible.builtin.set_fact: dev_pulp_distribution_deb_promote_versions: >- {{ dev_pulp_distribution_deb_promote_versions | default({}) | @@ -34,15 +35,15 @@ when: item.short_name in kayobe_pulp_repo_versions - name: Display rpm promotion versions facts - debug: + ansible.builtin.debug: var: dev_pulp_distribution_rpm_promote_versions - name: Display deb promotion versions facts - debug: + ansible.builtin.debug: var: dev_pulp_distribution_deb_promote_versions - name: Assert that versions variable is populated - assert: + ansible.builtin.assert: that: - >- dev_pulp_distribution_deb_promote_versions | length > 0 or diff --git a/ansible/kayobe-container-tag-query.yml b/ansible/kayobe-container-tag-query.yml index 97821b9c..9c89c408 100644 --- a/ansible/kayobe-container-tag-query.yml +++ b/ansible/kayobe-container-tag-query.yml @@ -8,24 +8,24 @@ - name: Query container image tags for Kayobe hosts: localhost - gather_facts: True + gather_facts: true vars: kayobe_config_repo_path: "" tasks: - name: Fail if Kayobe config repo path is not specified - fail: + ansible.builtin.fail: msg: > Kayobe config git repository path must be specified via 'kayobe_config_repo_path'. when: not kayobe_config_repo_path - name: Fail if Kayobe config repo path is not a directory - fail: + ansible.builtin.fail: msg: > Kayobe config git repository path {{ kayobe_config_repo_path }} is not a directory. when: kayobe_config_repo_path is not directory - name: List Kayobe Kolla image tags - command: + ansible.builtin.command: cmd: >- {{ kayobe_config_repo_path | realpath }}/tools/kolla-images.py list-tags chdir: "{{ kayobe_config_repo_path | realpath }}" @@ -34,9 +34,9 @@ changed_when: false - name: Set a fact about Kayobe Kolla image tags - set_fact: + ansible.builtin.set_fact: kayobe_kolla_image_tags: "{{ list_tags.stdout | from_yaml }}" - name: Display Kayobe Kolla image tags - debug: + ansible.builtin.debug: var: kayobe_kolla_image_tags diff --git a/ansible/kayobe-repo-version-query.yml b/ansible/kayobe-repo-version-query.yml index a1e37497..454a2af1 100644 --- a/ansible/kayobe-repo-version-query.yml +++ b/ansible/kayobe-repo-version-query.yml @@ -9,25 +9,25 @@ - name: Query repository versions for Kayobe hosts: localhost - gather_facts: True + gather_facts: true vars: kayobe_config_repo_path: "" kayobe_pulp_repo_versions_path: "{{ (kayobe_config_repo_path ~ '/etc/kayobe/pulp-repo-versions.yml') | realpath }}" tasks: - name: Fail if Kayobe config repo path is not specified - fail: + ansible.builtin.fail: msg: > Kayobe config git repository path must be specified via 'kayobe_config_repo_path'. when: not kayobe_config_repo_path - name: Fail if Kayobe config repo path is not a directory - fail: + ansible.builtin.fail: msg: > Kayobe config git repository path {{ kayobe_config_repo_path }} is not a directory. when: kayobe_config_repo_path is not directory - name: Fail if Kayobe Pulp repository versions file not found - fail: + ansible.builtin.fail: msg: > Can't find Kayobe Pulp repository versions file {{ kayobe_pulp_repo_versions_path }}. when: kayobe_pulp_repo_versions_path is not file @@ -37,12 +37,12 @@ vars: full_kayobe_pulp_repo_versions: "{{ lookup('file', kayobe_pulp_repo_versions_path) | from_yaml }}" short_name: "{{ item.key | regex_replace('^stackhpc_pulp_repo_(.*)_version$', '\\1') }}" - set_fact: + ansible.builtin.set_fact: kayobe_pulp_repo_versions: "{{ kayobe_pulp_repo_versions | default({}) | combine({short_name: item.value}) }}" loop: "{{ query('dict', full_kayobe_pulp_repo_versions) }}" loop_control: label: "{{ short_name }}" - name: Display Kayobe Pulp repository versions - debug: + ansible.builtin.debug: var: kayobe_pulp_repo_versions diff --git a/ansible/roles/pulp-rpm-publication-cleanup/defaults/main.yml b/ansible/roles/pulp-rpm-publication-cleanup/defaults/main.yml index effd10b6..16ac276f 100644 --- a/ansible/roles/pulp-rpm-publication-cleanup/defaults/main.yml +++ b/ansible/roles/pulp-rpm-publication-cleanup/defaults/main.yml @@ -2,6 +2,5 @@ pulp_url: https://localhost:8080 pulp_username: admin pulp_password: - # List of names of repositories to clean up publications in. pulp_rpm_publication_cleanup_repos: [] diff --git a/ansible/roles/pulp-rpm-publication-cleanup/tasks/destroy-pubs.yml b/ansible/roles/pulp-rpm-publication-cleanup/tasks/destroy-pubs.yml index dc0ad960..20e3f71d 100644 --- a/ansible/roles/pulp-rpm-publication-cleanup/tasks/destroy-pubs.yml +++ b/ansible/roles/pulp-rpm-publication-cleanup/tasks/destroy-pubs.yml @@ -1,10 +1,10 @@ --- - name: Show duplicate publications - debug: + ansible.builtin.debug: msg: "{{ pubs | sort(attribute='pulp_created') }}" - name: Fail if duplicate publications have distributions - assert: + ansible.builtin.assert: that: dists | length == 0 loop: "{{ duplicate_pubs }}" loop_control: @@ -16,7 +16,7 @@ # Use URI module since pulp.squeezer.rpm_publication fails if there are # multiple matching publications. - name: Destroy duplicate publications - uri: + ansible.builtin.uri: url: "{{ pulp_url }}{{ duplicate_pub.pulp_href }}" user: "{{ pulp_username }}" password: "{{ pulp_password }}" diff --git a/ansible/roles/pulp-rpm-publication-cleanup/tasks/main.yml b/ansible/roles/pulp-rpm-publication-cleanup/tasks/main.yml index 0177e7e6..f7df733d 100644 --- a/ansible/roles/pulp-rpm-publication-cleanup/tasks/main.yml +++ b/ansible/roles/pulp-rpm-publication-cleanup/tasks/main.yml @@ -21,7 +21,7 @@ register: pulp_dists_list - name: Destroy duplicate publications - include_tasks: destroy-pubs.yml + ansible.builtin.include_tasks: destroy-pubs.yml loop: "{{ pulp_rpm_publication_cleanup_repos }}" when: pubs | length > 1 vars: diff --git a/ansible/roles/source-repo-sync/tasks/add_community_files.yml b/ansible/roles/source-repo-sync/tasks/add_community_files.yml index 0dddd128..cee41f28 100644 --- a/ansible/roles/source-repo-sync/tasks/add_community_files.yml +++ b/ansible/roles/source-repo-sync/tasks/add_community_files.yml @@ -1,5 +1,5 @@ --- -- name: Check if release series exists on the remote +- name: Check if release series exists on the remote # noqa no-handler ansible.builtin.shell: cmd: | gh api \ @@ -10,6 +10,7 @@ register: release_series_exists - name: Proceed with adding community files + when: release_series_exists.rc == 0 block: - name: Check if working branch already exists on the remote ansible.builtin.shell: @@ -35,22 +36,22 @@ cmd: > git checkout -b {{ community_manifest.branch }}-community-files \ origin/{{ community_manifest.prefix | default("") }}{{ community_manifest.branch }} - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: true - name: Create .github directory ansible.builtin.file: - path: '{{ staging_path }}/{{ repository_manifest.name }}/.github/' + path: "{{ staging_path }}/{{ repository_manifest.name }}/.github/" state: directory - mode: 0755 + mode: "0755" - name: Copy community files ansible.builtin.copy: - content: '{{ community_file.value.content }}' - dest: '{{ staging_path }}/{{ repository_manifest.name }}/{{ community_file.value.dest }}' - mode: 0644 + content: "{{ community_file.value.content }}" + dest: "{{ staging_path }}/{{ repository_manifest.name }}/{{ community_file.value.dest }}" + mode: "0644" register: community_copy - with_dict: '{{ repository_manifest.community_files }}' + with_dict: "{{ repository_manifest.community_files }}" loop_control: loop_var: community_file @@ -59,17 +60,17 @@ cmd: | git add . --force && git commit -m \ 'feat: automatic update of community files {{ community_manifest.prefix | default("") }}{{ community_manifest.branch }}' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" when: community_copy.changed | bool - name: Push branch to remote # noqa command-instead-of-module command-instead-of-shell no-handler ansible.builtin.shell: - cmd: 'git push -u origin {{ community_manifest.branch }}-community-files' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + cmd: "git push -u origin {{ community_manifest.branch }}-community-files" + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" when: community_copy.changed | bool - - name: Ensure required labels exists on remote - ansible.builtin.include_tasks: 'tasks/add_label.yml' + - name: Ensure required labels exists on remote # noqa no-handler + ansible.builtin.include_tasks: "tasks/add_label.yml" with_items: - stackhpc-ci - community-files @@ -80,11 +81,10 @@ - name: Open pull request # noqa command-instead-of-shell no-handler ansible.builtin.shell: cmd: 'gh pr create -f -B {{ community_manifest.prefix | default("") }}{{ community_manifest.branch }} -l stackhpc-ci --label community-files' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" when: community_copy.changed | bool - name: Pause playbook to prevent exceeding API rate limit # noqa no-handler ansible.builtin.pause: seconds: 10 when: community_copy.changed | bool - when: release_series_exists.rc == 0 diff --git a/ansible/roles/source-repo-sync/tasks/add_label.yml b/ansible/roles/source-repo-sync/tasks/add_label.yml index e6439db4..7fa7bebe 100644 --- a/ansible/roles/source-repo-sync/tasks/add_label.yml +++ b/ansible/roles/source-repo-sync/tasks/add_label.yml @@ -2,12 +2,12 @@ - name: Check if required label exists # noqa command-instead-of-shell ansible.builtin.shell: cmd: gh label list --json name --jq 'any(.name == "{{ label_name }}")' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: false register: label_exists - name: Add missing label to repository # noqa command-instead-of-shell ansible.builtin.shell: cmd: gh label create {{ label_name | quote }} - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" when: not label_exists.stdout | bool diff --git a/ansible/roles/source-repo-sync/tasks/add_workflows.yml b/ansible/roles/source-repo-sync/tasks/add_workflows.yml index f743d550..5c9998cf 100644 --- a/ansible/roles/source-repo-sync/tasks/add_workflows.yml +++ b/ansible/roles/source-repo-sync/tasks/add_workflows.yml @@ -10,6 +10,7 @@ register: release_series_exists - name: Proceed with adding workflows + when: release_series_exists.rc == 0 block: - name: Check if working branch already exists on the remote ansible.builtin.shell: @@ -35,34 +36,34 @@ cmd: > git checkout -b {{ workflow_manifest.branch }}-workflows \ origin/{{ workflow_manifest.prefix | default("") }}{{ workflow_manifest.branch }} - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: true - name: Create .github/workflows directory ansible.builtin.file: - path: '{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows' + path: "{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows" state: directory - mode: 0755 + mode: "0755" - name: Copy workflow into repository ansible.builtin.template: - src: 'templates/{{ workflow }}.jinja' - dest: '{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows/{{ workflow }}.yml' - mode: 0644 - with_items: '{{ workflow_manifest.workflows }}' + src: "templates/{{ workflow }}.jinja" + dest: "{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows/{{ workflow }}.yml" + mode: "0644" + with_items: "{{ workflow_manifest.workflows }}" loop_control: loop_var: workflow register: workflow_copy - name: Remove TravisCI file ansible.builtin.file: - path: '{{ staging_path }}/{{ repository_manifest.name }}/.travis.yml' + path: "{{ staging_path }}/{{ repository_manifest.name }}/.travis.yml" state: absent register: travis_rm - name: Remove publish workflow ansible.builtin.file: - path: '{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows/{{ unwanted_workflow }}.yml' + path: "{{ staging_path }}/{{ repository_manifest.name }}/.github/workflows/{{ unwanted_workflow }}.yml" state: absent register: publish_rm with_items: @@ -71,23 +72,24 @@ loop_control: loop_var: unwanted_workflow - - block: + - when: workflow_copy.changed | bool or travis_rm.changed or publish_rm.changed | bool + block: - name: Commit changes # noqa command-instead-of-module no-handler ansible.builtin.shell: cmd: | git add . --force && git commit -m \ 'feat: automatic update of workflows {{ workflow_manifest.prefix | default("") }}{{ workflow_manifest.branch }}' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: true - name: Push branch to remote # noqa command-instead-of-module command-instead-of-shell no-handler ansible.builtin.shell: - cmd: 'git push -u origin {{ workflow_manifest.branch }}-workflows' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + cmd: "git push -u origin {{ workflow_manifest.branch }}-workflows" + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: true - name: Ensure required labels exists on remote - ansible.builtin.include_tasks: 'tasks/add_label.yml' + ansible.builtin.include_tasks: "tasks/add_label.yml" with_items: - stackhpc-ci - workflows @@ -97,11 +99,9 @@ - name: Open pull request # noqa command-instead-of-shell no-handler ansible.builtin.shell: cmd: 'gh pr create --fill --base {{ workflow_manifest.prefix | default("") }}{{ workflow_manifest.branch }} --label stackhpc-ci --label workflows' - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" changed_when: true - name: Pause playbook to prevent exceeding API rate limit # noqa no-handler ansible.builtin.pause: seconds: 10 - when: workflow_copy.changed | bool or travis_rm.changed or publish_rm.changed | bool - when: release_series_exists.rc == 0 diff --git a/ansible/roles/source-repo-sync/tasks/configure_repository.yml b/ansible/roles/source-repo-sync/tasks/configure_repository.yml index 4c5a4652..9f9b2a6c 100644 --- a/ansible/roles/source-repo-sync/tasks/configure_repository.yml +++ b/ansible/roles/source-repo-sync/tasks/configure_repository.yml @@ -3,72 +3,57 @@ ansible.builtin.debug: var: repository_manifest -- name: Clone repository # noqa git-latest +- name: Clone repository # noqa latest[git] ansible.builtin.git: - repo: 'https://{{ owner }}:$GITHUB_TOKEN@github.com/{{ owner }}/{{ repository_manifest.name }}.git' - dest: '{{ staging_path }}/{{ repository_manifest.name }}' + repo: "https://{{ owner }}:$GITHUB_TOKEN@github.com/{{ owner }}/{{ repository_manifest.name }}.git" + dest: "{{ staging_path }}/{{ repository_manifest.name }}" # Don't clone submodules. - recursive: no + recursive: false - name: Get default branch name # noqa command-instead-of-module ansible.builtin.command: cmd: git rev-parse --abbrev-ref HEAD - chdir: '{{ staging_path }}/{{ repository_manifest.name }}' + chdir: "{{ staging_path }}/{{ repository_manifest.name }}" register: default_branch_name changed_when: false - name: Add workflows to default branch - include_tasks: tasks/add_workflows.yml + ansible.builtin.include_tasks: tasks/add_workflows.yml vars: workflow_manifest: - { - branch: '{{ default_branch_name.stdout }}', - workflows: '{{ repository_manifest.workflows.default_branch_only }}', - workflow_args: '{{ repository_manifest.workflow_args }}', - } + branch: "{{ default_branch_name.stdout }}" + workflows: "{{ repository_manifest.workflows.default_branch_only }}" + workflow_args: "{{ repository_manifest.workflow_args }}" when: - repository_manifest.copy_workflows | bool - - not default_branch_name.stdout.startswith('stackhpc/') or - default_branch_name.stdout[9:] not in repository_manifest.releases | default([]) + - not default_branch_name.stdout.startswith('stackhpc/') or default_branch_name.stdout[9:] not in repository_manifest.releases | default([]) - name: Add workflows to supported releases - include_tasks: tasks/add_workflows.yml + ansible.builtin.include_tasks: tasks/add_workflows.yml vars: workflow_manifest: - { - branch: '{{ branch_name }}', - prefix: 'stackhpc/', - workflows: '{{ repository_manifest.workflows.elsewhere }}', - workflow_args: '{{ repository_manifest.workflow_args }}', - } + branch: "{{ branch_name }}" + prefix: "stackhpc/" + workflows: "{{ repository_manifest.workflows.elsewhere }}" + workflow_args: "{{ repository_manifest.workflow_args }}" when: repository_manifest.copy_workflows and repository_manifest.releases is defined - with_items: '{{ repository_manifest.releases }}' + with_items: "{{ repository_manifest.releases }}" loop_control: loop_var: branch_name - name: Add community files to default branch - include_tasks: tasks/add_community_files.yml + ansible.builtin.include_tasks: tasks/add_community_files.yml vars: - community_manifest: - { - branch: '{{ default_branch_name.stdout }}', - community_files: '{{ repository_manifest.community_files }}', - } + community_manifest: { branch: "{{ default_branch_name.stdout }}", community_files: "{{ repository_manifest.community_files }}" } when: - repository_manifest.community_files is defined - - not default_branch_name.stdout.startswith('stackhpc/') or - default_branch_name.stdout[9:] not in repository_manifest.releases | default([]) + - not default_branch_name.stdout.startswith('stackhpc/') or default_branch_name.stdout[9:] not in repository_manifest.releases | default([]) - name: Add community files to supported releases - include_tasks: tasks/add_community_files.yml + ansible.builtin.include_tasks: tasks/add_community_files.yml vars: - community_manifest: - { - branch: '{{ branch_name }}', - prefix: 'stackhpc/', - community_files: '{{ repository_manifest.community_files }}', - } + community_manifest: { branch: "{{ branch_name }}", prefix: "stackhpc/", community_files: "{{ repository_manifest.community_files }}" } when: repository_manifest.community_files is defined and repository_manifest.releases is defined - with_items: '{{ repository_manifest.releases }}' + with_items: "{{ repository_manifest.releases }}" loop_control: loop_var: branch_name diff --git a/ansible/roles/source-repo-sync/tasks/main.yml b/ansible/roles/source-repo-sync/tasks/main.yml index f2865cec..04db8b92 100644 --- a/ansible/roles/source-repo-sync/tasks/main.yml +++ b/ansible/roles/source-repo-sync/tasks/main.yml @@ -1,53 +1,46 @@ --- - name: Delete staging area directory ansible.builtin.file: - path: '{{ staging_path }}' + path: "{{ staging_path }}" state: absent - name: Create staging area directory ansible.builtin.file: - path: '{{ staging_path }}' + path: "{{ staging_path }}" state: directory - mode: 0755 + mode: "0755" - name: Configure openstack repositories - include_tasks: tasks/configure_repository.yml + ansible.builtin.include_tasks: tasks/configure_repository.yml vars: repository_manifest: - { - name: '{{ item.key }}', - releases: - '{{ default_releases | map("string") | difference(item.value.ignored_releases | default([]) | map("string")) | - union(item.value.additional_releases | default([]) | map("string")) | sort }}', - workflows: - { default_branch_only: '{{ openstack_workflows.default_branch_only | - difference(item.value.workflows.ignored_workflows.default_branch_only | default([])) | - union(item.value.workflows.additional_workflows.default_branch_only | default([])) }}', - elsewhere: '{{ openstack_workflows.elsewhere | - difference(item.value.workflows.ignored_workflows.elsewhere | default([])) | - union(item.value.workflows.additional_workflows.elsewhere | default([])) }}' }, - workflow_args: '{{ item.value.workflow_args | default({}) }}', - copy_workflows: '{{ item.value.copy_workflows | default(true) }}', - community_files: '{{ item.value.community_files | default({}) }}' - } - with_dict: '{{ source_repositories }}' + name: "{{ item.key }}" + releases: '{{ default_releases | map("string") | difference(item.value.ignored_releases | default([]) | map("string")) | union(item.value.additional_releases + | default([]) | map("string")) | sort }}' + workflows: + default_branch_only: "{{ openstack_workflows.default_branch_only | difference(item.value.workflows.ignored_workflows.default_branch_only | default([])) | + union(item.value.workflows.additional_workflows.default_branch_only | default([])) }}" + elsewhere: "{{ openstack_workflows.elsewhere | difference(item.value.workflows.ignored_workflows.elsewhere | default([])) | union(item.value.workflows.additional_workflows.elsewhere + | default([])) }}" + workflow_args: "{{ item.value.workflow_args | default({}) }}" + copy_workflows: "{{ item.value.copy_workflows | default(true) }}" + community_files: "{{ item.value.community_files | default({}) }}" + with_dict: "{{ source_repositories }}" when: item.value.repository_type | default('openstack') == 'openstack' - name: Configure branchless repositories - include_tasks: tasks/configure_repository.yml + ansible.builtin.include_tasks: tasks/configure_repository.yml vars: repository_manifest: - { - name: '{{ item.key }}', - workflows: { default_branch_only: '{{ item.value.workflows }}' }, - workflow_args: '{{ item.value.workflow_args | default({}) }}', - copy_workflows: '{{ item.value.copy_workflows | default(true) }}', - community_files: '{{ item.value.community_files | default({}) }}' - } - with_dict: '{{ source_repositories }}' + name: "{{ item.key }}" + workflows: { default_branch_only: "{{ item.value.workflows }}" } + workflow_args: "{{ item.value.workflow_args | default({}) }}" + copy_workflows: "{{ item.value.copy_workflows | default(true) }}" + community_files: "{{ item.value.community_files | default({}) }}" + with_dict: "{{ source_repositories }}" when: item.value.repository_type | default('openstack') != 'openstack' - name: Delete staging area directory ansible.builtin.file: - path: '{{ staging_path }}' + path: "{{ staging_path }}" state: absent diff --git a/ansible/test-kayobe-repo-version-generate.yml b/ansible/test-kayobe-repo-version-generate.yml index e953ded7..2fb2f869 100644 --- a/ansible/test-kayobe-repo-version-generate.yml +++ b/ansible/test-kayobe-repo-version-generate.yml @@ -7,11 +7,12 @@ # test-pulp-repo-version-query.yml). # Query existing Kayobe config repo versions. -- import_playbook: kayobe-repo-version-query.yml +- name: Import kayobe-repo-version-query playbook + import_playbook: kayobe-repo-version-query.yml - name: Update repository versions for Kayobe hosts: localhost - gather_facts: True + gather_facts: true vars: kayobe_config_repo_path: "" kayobe_pulp_repo_versions_path: "{{ (kayobe_config_repo_path ~ '/etc/kayobe/pulp-repo-versions.yml') | realpath }}" @@ -21,18 +22,18 @@ vars: kayobe_var_name: "{{ 'stackhpc_pulp_repo_' ~ item.key ~ '_version' }}" version: "{{ test_pulp_repository_rpm_repo_versions.get(item.key, test_pulp_repository_deb_repo_versions.get(item.key, item.value)) }}" - set_fact: + ansible.builtin.set_fact: updated_kayobe_pulp_repo_versions: "{{ updated_kayobe_pulp_repo_versions | default({}) | combine({kayobe_var_name: version}) }}" loop: "{{ query('dict', kayobe_pulp_repo_versions) }}" loop_control: label: "{{ item.key }}" - name: "Write updated versions to {{ kayobe_pulp_repo_versions_dest }}" - copy: + ansible.builtin.copy: content: | --- # This file is autogenerated by Ansible using the following workflow: # https://github.com/stackhpc/stackhpc-release-train/actions/workflows/package-update-kayobe.yml {{ updated_kayobe_pulp_repo_versions | to_nice_yaml }} dest: "{{ kayobe_pulp_repo_versions_dest }}" - mode: 0755 + mode: "0755" diff --git a/ansible/test-pulp-container-publish.yml b/ansible/test-pulp-container-publish.yml index 6ecef696..7eea5285 100644 --- a/ansible/test-pulp-container-publish.yml +++ b/ansible/test-pulp-container-publish.yml @@ -1,13 +1,13 @@ --- - name: Publish test Pulp container images hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ test_pulp_url }}" pulp_username: "{{ test_pulp_username }}" pulp_password: "{{ test_pulp_password }}" tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_distribution vars: pulp_distribution_container: "{{ test_pulp_distribution_container }}" diff --git a/ansible/test-pulp-container-sync.yml b/ansible/test-pulp-container-sync.yml index 344ede78..c37971ec 100644 --- a/ansible/test-pulp-container-sync.yml +++ b/ansible/test-pulp-container-sync.yml @@ -1,9 +1,9 @@ --- - name: Sync test Pulp container repositories hosts: localhost - gather_facts: False + gather_facts: false tasks: - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_repository vars: pulp_url: "{{ test_pulp_url }}" diff --git a/ansible/test-pulp-distribution-list.yml b/ansible/test-pulp-distribution-list.yml index 968cb1d4..9993cc48 100644 --- a/ansible/test-pulp-distribution-list.yml +++ b/ansible/test-pulp-distribution-list.yml @@ -1,7 +1,7 @@ --- - name: Display Pulp distributions, publications & repositories hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ test_pulp_url }}" pulp_username: "{{ test_pulp_username }}" @@ -44,7 +44,7 @@ repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ item }}" - debug: + ansible.builtin.debug: var: info loop: "{{ pulp_deb_dists_list.distributions }}" loop_control: @@ -79,7 +79,7 @@ repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ item }}" - debug: + ansible.builtin.debug: var: info loop: "{{ pulp_rpm_dists_list.distributions }}" loop_control: diff --git a/ansible/test-pulp-repo-publication-cleanup.yml b/ansible/test-pulp-repo-publication-cleanup.yml index e5b31a74..07dd3889 100644 --- a/ansible/test-pulp-repo-publication-cleanup.yml +++ b/ansible/test-pulp-repo-publication-cleanup.yml @@ -10,7 +10,7 @@ - name: Clean up duplicate publications hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ test_pulp_url }}" pulp_username: "{{ test_pulp_username }}" @@ -37,9 +37,12 @@ password: "{{ pulp_password }}" register: pulp_dists_list - - block: + - vars: + repo: "{{ pulp_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" + pubs: "{{ pulp_pubs_list.publications | selectattr('repository_version', 'equalto', repo.latest_version_href) }}" + block: - name: Show duplicate publications - debug: + ansible.builtin.debug: msg: "{{ pubs | sort(attribute='pulp_created') }}" loop: "{{ test_pulp_distribution_rpm }}" loop_control: @@ -47,7 +50,7 @@ when: pubs | length > 1 - name: Fail if duplicate publications have distributions - assert: + ansible.builtin.assert: that: dists | length == 0 loop: "{{ test_pulp_distribution_rpm }}" loop_control: @@ -60,7 +63,7 @@ # Use URI module since pulp.squeezer.rpm_publication fails if there are # multiple matching publications. - name: Destroy duplicate publications - uri: + ansible.builtin.uri: url: "{{ pulp_url }}{{ duplicate_pub.pulp_href }}" user: "{{ pulp_username }}" password: "{{ pulp_password }}" @@ -73,6 +76,3 @@ when: pubs | length > 1 vars: duplicate_pub: "{{ pubs | sort(attribute='pulp_created') | last }}" - vars: - repo: "{{ pulp_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" - pubs: "{{ pulp_pubs_list.publications | selectattr('repository_version', 'equalto', repo.latest_version_href) }}" diff --git a/ansible/test-pulp-repo-publish.yml b/ansible/test-pulp-repo-publish.yml index 5ea2e978..c0407f6f 100644 --- a/ansible/test-pulp-repo-publish.yml +++ b/ansible/test-pulp-repo-publish.yml @@ -1,14 +1,14 @@ --- - name: Publish test Pulp repositories hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ test_pulp_url }}" pulp_username: "{{ test_pulp_username }}" pulp_password: "{{ test_pulp_password }}" tasks: - name: Assert that Deb versions variable is populated - assert: + ansible.builtin.assert: that: - missing_repos | length == 0 msg: >- @@ -17,7 +17,7 @@ missing_repos: "{{ test_pulp_repository_deb_repos | map(attribute='short_name') | list | difference(test_pulp_repository_deb_repo_versions) | list }}" - name: Assert that RPM versions variable is populated - assert: + ansible.builtin.assert: that: - missing_repos | length == 0 msg: >- @@ -25,13 +25,13 @@ vars: missing_repos: "{{ test_pulp_repository_rpm_repos | map(attribute='short_name') | list | difference(test_pulp_repository_rpm_repo_versions) | list }}" - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_publication vars: pulp_publication_deb: "{{ test_pulp_publication_deb }}" pulp_publication_rpm: "{{ test_pulp_publication_rpm }}" - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_distribution vars: pulp_distribution_deb: "{{ test_pulp_distribution_deb }}" diff --git a/ansible/test-pulp-repo-sync.yml b/ansible/test-pulp-repo-sync.yml index e39a8d49..3e3b24c3 100644 --- a/ansible/test-pulp-repo-sync.yml +++ b/ansible/test-pulp-repo-sync.yml @@ -1,10 +1,10 @@ --- - name: Sync test Pulp repositories hosts: localhost - gather_facts: False + gather_facts: false tasks: - name: Assert that Deb versions variable is populated - assert: + ansible.builtin.assert: that: - missing_repos | length == 0 msg: >- @@ -14,7 +14,7 @@ when: not test_pulp_sync_repo_version - name: Assert that RPM versions variable is populated - assert: + ansible.builtin.assert: that: - missing_repos | length == 0 msg: >- @@ -23,7 +23,7 @@ missing_repos: "{{ test_pulp_repository_rpm_repos | map(attribute='short_name') | list | difference(test_pulp_repository_rpm_repo_versions) | list }}" when: not test_pulp_sync_repo_version - - import_role: + - ansible.builtin.import_role: name: stackhpc.pulp.pulp_repository vars: pulp_url: "{{ test_pulp_url }}" diff --git a/ansible/test-pulp-repo-version-query.yml b/ansible/test-pulp-repo-version-query.yml index 4818cb5e..25a0e3d0 100644 --- a/ansible/test-pulp-repo-version-query.yml +++ b/ansible/test-pulp-repo-version-query.yml @@ -7,7 +7,7 @@ - name: Update test repo versions hosts: localhost - gather_facts: True + gather_facts: true vars: pulp_url: "{{ dev_pulp_url }}" pulp_username: "{{ dev_pulp_username }}" @@ -63,58 +63,61 @@ password: "{{ pulp_password }}" register: pulp_rpm_dists_list - - block: + - vars: + repo: "{{ pulp_deb_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" + pub: "{{ (pulp_deb_pubs_list.publications + pulp_deb_verbatim_pubs_list.publications) | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications + | first }}" + dist: "{{ pulp_deb_dists_list.distributions | selectattr('publication', 'equalto', pub.pulp_href) | first }}" + + block: - name: Display latest Deb distributions vars: info: repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ dist }}" - debug: + ansible.builtin.debug: var: info loop: "{{ dev_pulp_distribution_deb }}" loop_control: label: "{{ item.repository }}" - name: Set a fact about latest Deb versions - set_fact: - test_pulp_repository_deb_repo_versions: "{{ test_pulp_repository_deb_repo_versions | default({}) | combine({item.short_name: dist.base_path | basename}) }}" + ansible.builtin.set_fact: + test_pulp_repository_deb_repo_versions: "{{ test_pulp_repository_deb_repo_versions | default({}) | combine({item.short_name: dist.base_path | basename}) + }}" loop: "{{ dev_pulp_distribution_deb }}" loop_control: label: "{{ item.repository }}" - name: Display latest versions fact - debug: + ansible.builtin.debug: var: test_pulp_repository_deb_repo_versions - vars: - repo: "{{ pulp_deb_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" - pub: "{{ (pulp_deb_pubs_list.publications + pulp_deb_verbatim_pubs_list.publications) | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications | first }}" - dist: "{{ pulp_deb_dists_list.distributions | selectattr('publication', 'equalto', pub.pulp_href) | first }}" - - - block: + - vars: + repo: "{{ pulp_rpm_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" + pub: "{{ pulp_rpm_pubs_list.publications | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications | first }}" + dist: "{{ pulp_rpm_dists_list.distributions | selectattr('publication', 'equalto', pub.pulp_href) | first }}" + block: - name: Display latest RPM distributions vars: info: repo: "{{ repo }}" pub: "{{ pub }}" dist: "{{ dist }}" - debug: + ansible.builtin.debug: var: info loop: "{{ dev_pulp_distribution_rpm }}" loop_control: label: "{{ item.repository }}" - name: Set a fact about latest RPM versions - set_fact: - test_pulp_repository_rpm_repo_versions: "{{ test_pulp_repository_rpm_repo_versions | default({}) | combine({item.short_name: dist.base_path | basename}) }}" + ansible.builtin.set_fact: + test_pulp_repository_rpm_repo_versions: "{{ test_pulp_repository_rpm_repo_versions | default({}) | combine({item.short_name: dist.base_path | basename}) + }}" loop: "{{ dev_pulp_distribution_rpm }}" loop_control: label: "{{ item.repository }}" - name: Display latest versions fact - debug: + ansible.builtin.debug: var: test_pulp_repository_rpm_repo_versions - vars: - repo: "{{ pulp_rpm_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" - pub: "{{ pulp_rpm_pubs_list.publications | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications | first }}" - dist: "{{ pulp_rpm_dists_list.distributions | selectattr('publication', 'equalto', pub.pulp_href) | first }}" diff --git a/ansible/test-repo-test.yml b/ansible/test-repo-test.yml index 5796af8b..c80a18fd 100644 --- a/ansible/test-repo-test.yml +++ b/ansible/test-repo-test.yml @@ -11,7 +11,7 @@ tasks: - name: Install keys for test repositories become: true - rpm_key: + ansible.builtin.rpm_key: key: "{{ item }}" loop: - https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Cloud @@ -24,7 +24,7 @@ - name: Install test repositories become: true - yum_repository: + ansible.builtin.yum_repository: name: "{{ item.name }}" description: "{{ item.repository }}" baseurl: "{{ test_pulp_url ~ '/pulp/content/' ~ item.base_path }}" @@ -36,20 +36,19 @@ - name: Run package update become: true - package: + ansible.builtin.package: name: "*" - state: latest # noqa package-latest + state: latest # noqa package-latest - name: Run DNF distro-sync become: true - command: + ansible.builtin.command: cmd: dnf distro-sync - warn: false when: ansible_facts.os_family == 'RedHat' - name: Install packages become: true - package: + ansible.builtin.package: name: "{{ item.packages }}" loop: - repo: CentOS Stream 8 - BaseOS diff --git a/ansible/validate-deb-repos.yml b/ansible/validate-deb-repos.yml index f66eaedc..43953461 100644 --- a/ansible/validate-deb-repos.yml +++ b/ansible/validate-deb-repos.yml @@ -3,64 +3,66 @@ hosts: localhost gather_facts: true vars: - synced_deb_package_repos: "{{ deb_package_repos | selectattr('sync', 'defined') | selectattr('sync') | list + deb_package_repos | rejectattr('sync', 'defined') | list }}" - published_deb_package_repos: "{{ deb_package_repos | selectattr('publish', 'defined') | selectattr('publish') | list + deb_package_repos | rejectattr('publish', 'defined') | list }}" + synced_deb_package_repos: "{{ deb_package_repos | selectattr('sync', 'defined') | selectattr('sync') | list + deb_package_repos | rejectattr('sync', 'defined') + | list }}" + published_deb_package_repos: "{{ deb_package_repos | selectattr('publish', 'defined') | selectattr('publish') | list + deb_package_repos | rejectattr('publish', + 'defined') | list }}" num_deb_package_repos: "{{ deb_package_repos | length }}" num_published_deb_package_repos: "{{ published_deb_package_repos | length }}" tasks: - name: Assert that Deb package repository list is defined - assert: + ansible.builtin.assert: that: - deb_package_repos is defined - name: Assert that Deb package repositories have names - assert: + ansible.builtin.assert: that: - deb_package_repos | rejectattr('name', 'defined') | list | length == 0 - name: Assert that Deb package repository names are unique - assert: + ansible.builtin.assert: that: - deb_package_repos | map(attribute='name') | unique | list | length == num_deb_package_repos | int - name: Assert that synced Deb package repositories have URLs - assert: + ansible.builtin.assert: that: - synced_deb_package_repos | rejectattr('url', 'defined') | list | length == 0 - name: Assert that synced Deb package repositories have sync groups - assert: + ansible.builtin.assert: that: - synced_deb_package_repos | rejectattr('sync_group', 'defined') | list | length == 0 - name: Assert that published Deb package repositories have short names - assert: + ansible.builtin.assert: that: - published_deb_package_repos | rejectattr('short_name', 'defined') | list | length == 0 - name: Assert that published Deb package repository short names are unique - assert: + ansible.builtin.assert: that: - published_deb_package_repos | map(attribute='short_name') | unique | list | length == num_published_deb_package_repos | int - name: Assert that published Deb package repositories have base paths - assert: + ansible.builtin.assert: that: - published_deb_package_repos | rejectattr('base_path', 'defined') | list | length == 0 - name: Assert that published Deb package repository base_paths are unique - assert: + ansible.builtin.assert: that: - published_deb_package_repos | map(attribute='base_path') | list | length == num_published_deb_package_repos | int - name: Assert that published Deb package repository base_paths have a trailing slash - assert: + ansible.builtin.assert: that: - published_deb_package_repos | map(attribute='base_path') | list | map('last') | unique == ['/'] when: num_published_deb_package_repos | int > 0 - name: Assert that Deb package repository list can be filtered to single - assert: + ansible.builtin.assert: that: - deb_package_repos_filtered | length == 1 - deb_package_repos_filtered[0].short_name == 'ubuntu_jammy_security' @@ -68,7 +70,7 @@ deb_package_repo_filter: ubuntu_jammy_security$ - name: Assert that Deb package repository list can be filtered to multiple - assert: + ansible.builtin.assert: that: - deb_package_repos_filtered | length == 2 - deb_package_repos_filtered[0].short_name == 'ubuntu_jammy_security' @@ -77,7 +79,7 @@ deb_package_repo_filter: docker_ce_ubuntu_jammy ubuntu_jammy_security$ - name: Assert that Deb package repository list can be filtered to one group - assert: + ansible.builtin.assert: that: - deb_package_repos_filtered | length == 2 - deb_package_repos_filtered[0].short_name == 'docker_ce_ubuntu_focal' @@ -86,7 +88,7 @@ package_sync_group: docker - name: Assert that Deb package repository list can be filtered and use a sync group together - assert: + ansible.builtin.assert: that: - deb_package_repos_filtered | length == 1 - deb_package_repos_filtered[0].short_name == 'docker_ce_ubuntu_jammy' @@ -95,36 +97,36 @@ deb_package_repo_filter: jammy - name: Assert that dev package repository list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_repository_deb_repos is defined - name: Assert that dev package publication list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_publication_deb is defined - name: Assert that dev package distribution list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_distribution_deb is defined - name: Assert that dev package distribution promote list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_distribution_deb_promote is defined - name: Assert that test package repository list is defined - assert: + ansible.builtin.assert: that: - test_pulp_repository_deb_repos is defined - name: Assert that test package publication list is defined - assert: + ansible.builtin.assert: that: - test_pulp_publication_deb is defined - name: Assert that test package distribution list is defined - assert: + ansible.builtin.assert: that: - test_pulp_distribution_deb is defined diff --git a/ansible/validate-kolla-container-images.yml b/ansible/validate-kolla-container-images.yml index fccdc83f..ae41d1d6 100644 --- a/ansible/validate-kolla-container-images.yml +++ b/ansible/validate-kolla-container-images.yml @@ -6,22 +6,22 @@ num_kolla_container_images: "{{ kolla_container_images | length }}" tasks: - name: Assert that Kolla container image list is defined - assert: + ansible.builtin.assert: that: - kolla_container_images is defined - name: Assert that Kolla container images are strings - assert: + ansible.builtin.assert: that: - kolla_container_images | reject('string') | list | length == 0 - name: Assert that Kolla container image names are unique - assert: + ansible.builtin.assert: that: - kolla_container_images | unique | list | length == num_kolla_container_images | int - name: Assert that Kolla container image list can be filtered to single - assert: + ansible.builtin.assert: that: - kolla_container_images_filtered | length == 1 - kolla_container_images_filtered[0] == 'horizon' @@ -29,7 +29,7 @@ kolla_container_image_filter: horizon - name: Assert that Kolla container image list can be filtered to multiple - assert: + ansible.builtin.assert: that: - kolla_container_images_filtered | length == 2 - kolla_container_images_filtered[0] == 'horizon' @@ -38,7 +38,7 @@ kolla_container_image_filter: horizon nova-api - name: Assert that Kolla container image list can be filtered to single regexes - assert: + ansible.builtin.assert: that: - kolla_container_images_filtered | length == 2 - kolla_container_images_filtered[0] == 'glance-api' @@ -47,7 +47,7 @@ kolla_container_image_filter: "ance-" - name: Assert that Kolla container image list can be filtered to multiple regexes - assert: + ansible.builtin.assert: that: - kolla_container_images_filtered | length == 4 - kolla_container_images_filtered[0] == 'keystone' diff --git a/ansible/validate-rpm-repos.yml b/ansible/validate-rpm-repos.yml index 9999fa59..d9881b75 100644 --- a/ansible/validate-rpm-repos.yml +++ b/ansible/validate-rpm-repos.yml @@ -3,64 +3,66 @@ hosts: localhost gather_facts: true vars: - synced_rpm_package_repos: "{{ rpm_package_repos | selectattr('sync', 'defined') | selectattr('sync') | list + rpm_package_repos | rejectattr('sync', 'defined') | list }}" - published_rpm_package_repos: "{{ rpm_package_repos | selectattr('publish', 'defined') | selectattr('publish') | list + rpm_package_repos | rejectattr('publish', 'defined') | list }}" + synced_rpm_package_repos: "{{ rpm_package_repos | selectattr('sync', 'defined') | selectattr('sync') | list + rpm_package_repos | rejectattr('sync', 'defined') + | list }}" + published_rpm_package_repos: "{{ rpm_package_repos | selectattr('publish', 'defined') | selectattr('publish') | list + rpm_package_repos | rejectattr('publish', + 'defined') | list }}" num_rpm_package_repos: "{{ rpm_package_repos | length }}" num_published_rpm_package_repos: "{{ published_rpm_package_repos | length }}" tasks: - name: Assert that RPM package repository list is defined - assert: + ansible.builtin.assert: that: - rpm_package_repos is defined - name: Assert that RPM package repositories have names - assert: + ansible.builtin.assert: that: - rpm_package_repos | rejectattr('name', 'defined') | list | length == 0 - name: Assert that RPM package repository names are unique - assert: + ansible.builtin.assert: that: - rpm_package_repos | map(attribute='name') | unique | list | length == num_rpm_package_repos | int - name: Assert that synced RPM package repositories have URLs - assert: + ansible.builtin.assert: that: - synced_rpm_package_repos | rejectattr('url', 'defined') | list | length == 0 - name: Assert that synced RPM package repositories have sync groups - assert: + ansible.builtin.assert: that: - synced_rpm_package_repos | rejectattr('sync_group', 'defined') | list | length == 0 - name: Assert that published RPM package repositories have short names - assert: + ansible.builtin.assert: that: - published_rpm_package_repos | rejectattr('short_name', 'defined') | list | length == 0 - name: Assert that published RPM package repository short names are unique - assert: + ansible.builtin.assert: that: - published_rpm_package_repos | map(attribute='short_name') | unique | list | length == num_published_rpm_package_repos | int - name: Assert that published RPM package repositories have base paths - assert: + ansible.builtin.assert: that: - published_rpm_package_repos | rejectattr('base_path', 'defined') | list | length == 0 - name: Assert that published RPM package repository base_paths are unique - assert: + ansible.builtin.assert: that: - published_rpm_package_repos | map(attribute='base_path') | list | length == num_published_rpm_package_repos | int - name: Assert that published RPM package repository base_paths have a trailing slash - assert: + ansible.builtin.assert: that: - published_rpm_package_repos | map(attribute='base_path') | list | map('last') | unique == ['/'] when: num_published_rpm_package_repos | int > 0 - name: Assert that RPM package repository list can be filtered to single - assert: + ansible.builtin.assert: that: - rpm_package_repos_filtered | length == 1 - rpm_package_repos_filtered[0].short_name == 'centos_stream_9_openstack_caracal_aarch64' @@ -68,7 +70,7 @@ rpm_package_repo_filter: centos_stream_9_openstack_caracal_aarch64 - name: Assert that RPM package repository list can be filtered to multiple - assert: + ansible.builtin.assert: that: - rpm_package_repos_filtered | length == 3 - rpm_package_repos_filtered[0].short_name == 'grafana' @@ -78,7 +80,7 @@ rpm_package_repo_filter: centos_stream_9_openstack_caracal grafana - name: Assert that RPM package repository list can be filtered to one group - assert: + ansible.builtin.assert: that: - rpm_package_repos_filtered | length == 2 - rpm_package_repos_filtered[0].short_name == 'docker' @@ -87,7 +89,7 @@ package_sync_group: docker - name: Assert that RPM package repository list can be filtered and use a sync group together - assert: + ansible.builtin.assert: that: - rpm_package_repos_filtered | length == 1 - rpm_package_repos_filtered[0].short_name == 'centos_stream_9_docker' @@ -96,36 +98,36 @@ rpm_package_repo_filter: stream_9 - name: Assert that dev package repository list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_repository_rpm_repos is defined - name: Assert that dev package publication list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_publication_rpm is defined - name: Assert that dev package distribution list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_distribution_rpm is defined - name: Assert that dev package distribution promote list is defined - assert: + ansible.builtin.assert: that: - dev_pulp_distribution_rpm_promote is defined - name: Assert that test package repository list is defined - assert: + ansible.builtin.assert: that: - test_pulp_repository_rpm_repos is defined - name: Assert that test package publication list is defined - assert: + ansible.builtin.assert: that: - test_pulp_publication_rpm is defined - name: Assert that test package distribution list is defined - assert: + ansible.builtin.assert: that: - test_pulp_distribution_rpm is defined diff --git a/mkdocs.yml b/mkdocs.yml index 25e5a513..af57d54b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,4 @@ +--- site_name: StackHPC Release Train site_url: https://stackhpc.github.io/stackhpc-release-train/ repo_url: https://github.com/stackhpc/stackhpc-release-train/ @@ -13,7 +14,7 @@ markdown_extensions: # From mkdocs-material: allow !!! note. - admonition - toc: - permalink: True + permalink: true - pymdownx.details - pymdownx.superfences - tables diff --git a/requirements.txt b/requirements.txt index f9470ba1..59a6f652 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -ansible<6 +ansible<10 jmespath==0.10.0 diff --git a/requirements.yml b/requirements.yml index 72b21916..eaa7177c 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,3 +1,4 @@ +--- collections: - name: stackhpc.pulp version: 0.5.4 diff --git a/terraform/github-runners/ansible/inventory.yml b/terraform/github-runners/ansible/inventory.yml index 15988426..8c670985 100644 --- a/terraform/github-runners/ansible/inventory.yml +++ b/terraform/github-runners/ansible/inventory.yml @@ -1 +1,2 @@ +--- plugin: cloud.terraform.terraform_provider diff --git a/terraform/github-runners/ansible/site.yml b/terraform/github-runners/ansible/site.yml index 23b9449a..45fe0a0b 100644 --- a/terraform/github-runners/ansible/site.yml +++ b/terraform/github-runners/ansible/site.yml @@ -1,7 +1,7 @@ --- - name: Deploy GitHub runners hosts: runners - gather_facts: no + gather_facts: false tasks: - name: Wait for connection ansible.builtin.wait_for_connection: