Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bump Ansible to <10 to support Python 3.12 #362

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -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]
41 changes: 20 additions & 21 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,30 @@ on:
branches:
- main
pull_request:

jobs:
ansible-lint:
name: Ansible Lint

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 }}
3 changes: 1 addition & 2 deletions .github/workflows/ansible-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/container-promote-old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
78 changes: 39 additions & 39 deletions .github/workflows/container-promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
58 changes: 29 additions & 29 deletions .github/workflows/container-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
Loading
Loading