Skip to content

Commit f569bf1

Browse files
authored
Merge pull request #362 from stackhpc/bump_ansible
Bump Ansible to <10 to support Python 3.12
2 parents 7f2f7b4 + d8b570e commit f569bf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+642
-651
lines changed

.ansible-lint

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
---
12
skip_list:
2-
- unnamed-task # All tasks should be named
3+
- no-changed-when
4+
- role-name
5+
- unnamed-task # All tasks should be named
6+
- yaml[line-length]

.github/workflows/ansible-lint.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,30 @@ on:
66
branches:
77
- main
88
pull_request:
9-
109
jobs:
1110
ansible-lint:
1211
name: Ansible Lint
1312

1413
runs-on: ubuntu-latest
1514

1615
steps:
17-
- uses: actions/checkout@v4
18-
19-
- name: Install Ansible collections
20-
run: |
21-
ansible-galaxy collection install -r requirements.yml
22-
23-
- name: Install pip dependencies
24-
run: |
25-
pip install -r requirements.txt
26-
27-
# FIXME: rich pinned due to https://github.com/ansible-community/ansible-lint/issues/1795.
28-
- name: Install ansible-lint
29-
run: |
30-
pip install ansible-core==2.12.* 'rich<11' ansible-lint==5.3.*
31-
32-
- name: Lint Ansible playbooks
33-
run: |
34-
ansible-lint -v --force-color ansible/*.yml
35-
env:
36-
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
16+
- uses: actions/checkout@v4
17+
18+
- name: Install Ansible collections
19+
run: |
20+
ansible-galaxy collection install -r requirements.yml
21+
22+
- name: Install pip dependencies
23+
run: |
24+
pip install -r requirements.txt
25+
26+
# FIXME: rich pinned due to https://github.com/ansible-community/ansible-lint/issues/1795.
27+
- name: Install ansible-lint
28+
run: |
29+
pip install ansible-core==2.16.* 'rich<11' ansible-lint==24.*
30+
31+
- name: Lint Ansible playbooks
32+
run: |
33+
ansible-lint -v --force-color ansible/*.yml
34+
env:
35+
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}

.github/workflows/ansible-validations.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ on:
66
branches:
77
- main
88
pull_request:
9-
109
env:
11-
ANSIBLE_FORCE_COLOR: True
10+
ANSIBLE_FORCE_COLOR: true
1211
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
1312
jobs:
1413
ansible-validations:

.github/workflows/container-promote-old.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,34 @@ on:
2626
default: true
2727

2828
env:
29-
ANSIBLE_FORCE_COLOR: True
29+
ANSIBLE_FORCE_COLOR: true
3030
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
3131
jobs:
3232
container-promote:
3333
name: Promote container repositories
3434
runs-on: ubuntu-latest
3535
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v4
36+
- name: Checkout
37+
uses: actions/checkout@v4
3838

39-
- name: Setup Release Train & dependencies
40-
uses: ./.github/actions/setup
41-
with:
42-
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
43-
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
39+
- name: Setup Release Train & dependencies
40+
uses: ./.github/actions/setup
41+
with:
42+
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
43+
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
4444

45-
- name: Promote images from stackhpc-dev to stackhpc namespace in Ark
46-
run: |
47-
ansible-playbook -i ansible/inventory \
48-
ansible/dev-pulp-container-promote-old.yml \
49-
-e dev_pulp_repository_container_promotion_tag="$TAG" \
50-
-e kolla_container_image_filter="'$FILTER'" \
51-
-e kolla_base_distros_override="'$DISTROS'" \
52-
-e sync_old_images="'$PROMOTE_OLD_IMAGES'" \
53-
-e sync_new_images="'$PROMOTE_NEW_IMAGES'"
54-
env:
55-
TAG: ${{ github.event.inputs.tag }}
56-
FILTER: ${{ github.event.inputs.filter }}
57-
DISTROS: ${{ github.event.inputs.distros }}
58-
PROMOTE_OLD_IMAGES: ${{ github.event.inputs.promote-old-images }}
59-
PROMOTE_NEW_IMAGES: ${{ github.event.inputs.promote-new-images }}
45+
- name: Promote images from stackhpc-dev to stackhpc namespace in Ark
46+
run: |
47+
ansible-playbook -i ansible/inventory \
48+
ansible/dev-pulp-container-promote-old.yml \
49+
-e dev_pulp_repository_container_promotion_tag="$TAG" \
50+
-e kolla_container_image_filter="'$FILTER'" \
51+
-e kolla_base_distros_override="'$DISTROS'" \
52+
-e sync_old_images="'$PROMOTE_OLD_IMAGES'" \
53+
-e sync_new_images="'$PROMOTE_NEW_IMAGES'"
54+
env:
55+
TAG: ${{ github.event.inputs.tag }}
56+
FILTER: ${{ github.event.inputs.filter }}
57+
DISTROS: ${{ github.event.inputs.distros }}
58+
PROMOTE_OLD_IMAGES: ${{ github.event.inputs.promote-old-images }}
59+
PROMOTE_NEW_IMAGES: ${{ github.event.inputs.promote-new-images }}

.github/workflows/container-promote.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,52 @@ on:
1818
default: false
1919

2020
env:
21-
ANSIBLE_FORCE_COLOR: True
21+
ANSIBLE_FORCE_COLOR: true
2222
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
2323
jobs:
2424
container-promote:
2525
name: Promote container repositories
2626
runs-on: ubuntu-latest
2727
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
28+
- name: Checkout
29+
uses: actions/checkout@v4
3030

31-
- name: Setup Release Train & dependencies
32-
uses: ./.github/actions/setup
33-
with:
34-
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
35-
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
31+
- name: Setup Release Train & dependencies
32+
uses: ./.github/actions/setup
33+
with:
34+
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
35+
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
3636

37-
- name: Clone StackHPC Kayobe configuration repository
38-
uses: actions/checkout@v4
39-
with:
40-
repository: stackhpc/stackhpc-kayobe-config
41-
ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }}
42-
path: stackhpc-kayobe-config
37+
- name: Clone StackHPC Kayobe configuration repository
38+
uses: actions/checkout@v4
39+
with:
40+
repository: stackhpc/stackhpc-kayobe-config
41+
ref: refs/heads/${{ github.event.inputs.kayobe_config_branch }}
42+
path: stackhpc-kayobe-config
4343

44-
- name: Promote images from stackhpc-dev to stackhpc namespace in Ark
45-
run: |
46-
args=""
47-
if [[ $CHECK_MODE = true ]]; then
48-
args="$args --check --diff"
49-
fi
50-
ansible-playbook -i ansible/inventory \
51-
ansible/dev-pulp-container-tag-query-kayobe.yml \
52-
ansible/dev-pulp-container-promote.yml \
53-
-e kolla_container_image_filter="'$FILTER'" \
54-
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
55-
$args
56-
env:
57-
FILTER: ${{ github.event.inputs.filter }}
58-
CHECK_MODE: ${{ inputs.check_mode }}
44+
- name: Promote images from stackhpc-dev to stackhpc namespace in Ark
45+
run: |
46+
args=""
47+
if [[ $CHECK_MODE = true ]]; then
48+
args="$args --check --diff"
49+
fi
50+
ansible-playbook -i ansible/inventory \
51+
ansible/dev-pulp-container-tag-query-kayobe.yml \
52+
ansible/dev-pulp-container-promote.yml \
53+
-e kolla_container_image_filter="'$FILTER'" \
54+
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
55+
$args
56+
env:
57+
FILTER: ${{ github.event.inputs.filter }}
58+
CHECK_MODE: ${{ inputs.check_mode }}
5959

60-
- name: Send message to Slack via Workflow Builder
61-
uses: ./.github/actions/slack-alert
62-
with:
63-
inputs: >-
64-
filter: ${{ inputs.filter }}\n
65-
kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n
66-
check_mode: ${{ inputs.check_mode }}\n
67-
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
68-
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
69-
if: failure()
60+
- name: Send message to Slack via Workflow Builder
61+
uses: ./.github/actions/slack-alert
62+
with:
63+
inputs: >-
64+
filter: ${{ inputs.filter }}\n
65+
kayobe_config_branch: ${{ inputs.kayobe_config_branch }}\n
66+
check_mode: ${{ inputs.check_mode }}\n
67+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
68+
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
69+
if: failure()

.github/workflows/container-publish.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- '.github/workflows/container-publish.yml'
8-
- 'ansible/dev-pulp-container-publish.yml'
9-
- 'ansible/inventory/group_vars/all/dev-pulp-containers'
10-
- 'ansible/inventory/group_vars/all/kolla'
7+
- ".github/workflows/container-publish.yml"
8+
- "ansible/dev-pulp-container-publish.yml"
9+
- "ansible/inventory/group_vars/all/dev-pulp-containers"
10+
- "ansible/inventory/group_vars/all/kolla"
1111
workflow_dispatch:
1212
inputs:
1313
filter:
@@ -22,37 +22,37 @@ on:
2222
default: ""
2323

2424
env:
25-
ANSIBLE_FORCE_COLOR: True
25+
ANSIBLE_FORCE_COLOR: true
2626
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
2727
jobs:
2828
container-publish:
2929
name: Publish container repositories
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v4
3333

34-
- name: Setup Release Train & dependencies
35-
uses: ./.github/actions/setup
36-
with:
37-
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
38-
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
34+
- name: Setup Release Train & dependencies
35+
uses: ./.github/actions/setup
36+
with:
37+
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
38+
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
3939

40-
- name: Publish container repositories
41-
run: |
42-
ansible-playbook -i ansible/inventory \
43-
ansible/dev-pulp-container-publish.yml \
44-
-e kolla_container_image_filter="'$FILTER'" \
45-
-e kolla_base_distros_override="'$DISTROS'"
46-
env:
47-
FILTER: ${{ github.event.inputs.filter }}
48-
DISTROS: ${{ github.event.inputs.distros }}
40+
- name: Publish container repositories
41+
run: |
42+
ansible-playbook -i ansible/inventory \
43+
ansible/dev-pulp-container-publish.yml \
44+
-e kolla_container_image_filter="'$FILTER'" \
45+
-e kolla_base_distros_override="'$DISTROS'"
46+
env:
47+
FILTER: ${{ github.event.inputs.filter }}
48+
DISTROS: ${{ github.event.inputs.distros }}
4949

50-
- name: Send message to Slack via Workflow Builder
51-
uses: ./.github/actions/slack-alert
52-
with:
53-
inputs: >-
54-
filter: ${{ inputs.filter }}\n
55-
distros: ${{ inputs.distros }}\n
56-
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
57-
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
58-
if: failure() && github.event_name == 'push'
50+
- name: Send message to Slack via Workflow Builder
51+
uses: ./.github/actions/slack-alert
52+
with:
53+
inputs: >-
54+
filter: ${{ inputs.filter }}\n
55+
distros: ${{ inputs.distros }}\n
56+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
57+
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
58+
if: failure() && github.event_name == 'push'

0 commit comments

Comments
 (0)