Skip to content

Commit

Permalink
minor: Upgrade ceems roles (#16)
Browse files Browse the repository at this point in the history
* Fix ansible lint issues

* Add ansible 2.17 to test matrix

* Remove centos 7,8 and alma8 from test matrix. Python 3.6 shipped by them is not supported anymore in Ansible >=2.17

* Remove unnecessary lint ignores

* Bump actions workflows

* Fix docs pr workflow permissions

---------

Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri authored Jul 9, 2024
1 parent 7359e2c commit a13fcd3
Show file tree
Hide file tree
Showing 54 changed files with 255 additions and 223 deletions.
2 changes: 1 addition & 1 deletion .config/molecule/config-podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ verifier:
name: testinfra
directory: ${MOLECULE_SCENARIO_DIRECTORY}/tests
options:
rootdir: "${MOLECULE_SCENARIO_DIRECTORY}"
rootdir: ${MOLECULE_SCENARIO_DIRECTORY}
provisioner:
playbooks:
converge: ${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/converge.yml
41 changes: 22 additions & 19 deletions .config/molecule/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,34 @@ dependency:
prerun: false
driver:
name: docker
# Almalinux 8, Centos 7 and 8 ships Python 3.6 which is not supported anymore
# from Ansible >= 2.17
# So we are removing them from test matrix
platforms:
- name: almalinux-8
image: dokken/almalinux-8
pre_build_image: true
privileged: true
cgroup_parent: docker.slice
command: /lib/systemd/systemd
# - name: almalinux-8
# image: dokken/almalinux-8
# pre_build_image: true
# privileged: true
# cgroup_parent: docker.slice
# command: /lib/systemd/systemd
- name: almalinux-9
image: dokken/almalinux-9
pre_build_image: true
privileged: true
cgroup_parent: docker.slice
command: /lib/systemd/systemd
- name: centos-7
image: dokken/centos-7
pre_build_image: true
privileged: true
cgroup_parent: docker.slice
command: /usr/lib/systemd/systemd
- name: centos-stream-8
image: dokken/centos-stream-8
pre_build_image: true
privileged: true
cgroup_parent: docker.slice
command: /lib/systemd/systemd
# - name: centos-7
# image: dokken/centos-7
# pre_build_image: true
# privileged: true
# cgroup_parent: docker.slice
# command: /usr/lib/systemd/systemd
# - name: centos-stream-8
# image: dokken/centos-stream-8
# pre_build_image: true
# privileged: true
# cgroup_parent: docker.slice
# command: /lib/systemd/systemd
- name: centos-stream-9
image: dokken/centos-stream-9
pre_build_image: true
Expand Down Expand Up @@ -75,7 +78,7 @@ verifier:
name: testinfra
directory: ${MOLECULE_SCENARIO_DIRECTORY}/tests
options:
rootdir: "${MOLECULE_SCENARIO_DIRECTORY}"
rootdir: ${MOLECULE_SCENARIO_DIRECTORY}
provisioner:
playbooks:
converge: ${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/converge.yml
2 changes: 1 addition & 1 deletion .github/scripts/collection_version_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

"""
This module provides functions for parsing PEP 440 compliant
Expand Down
6 changes: 3 additions & 3 deletions .github/version-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
major-labels: ['semver:major', 'major', 'breaking']
minor-labels: ['semver:minor', 'minor', 'enhancement', 'deprecated', 'removed', 'security']
patch-labels: ['semver:patch', 'bug', 'trivial', 'bugfix']
major-labels: ['semver:major', major, breaking]
minor-labels: ['semver:minor', minor, enhancement, deprecated, removed, security]
patch-labels: ['semver:patch', bug, trivial, bugfix]
8 changes: 4 additions & 4 deletions .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Lint collection
uses: ansible/ansible-lint@main
Expand All @@ -33,7 +33,7 @@ jobs:
container:
image: quay.io/prometheus/golang-builder:base
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Lint arguments spec
run: ./.github/scripts/lint_arguments_spec.sh

Expand All @@ -42,7 +42,7 @@ jobs:
outputs:
versions: ${{ steps.supported-ansible-versions.outputs.result }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get Ansible versions that the collection supports
id: supported-ansible-versions
Expand All @@ -65,7 +65,7 @@ jobs:
molecule-tests: ${{ steps.set-molecule-tests.outputs.tests }}
integration-tests: ${{ steps.set-integration-tests.outputs.tests }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,51 @@ jobs:
issues: write
pull-requests: write
steps:
- name: "Confirm correct pull request title"
- name: Confirm correct pull request title
uses: mmubeen/action-pr-title@master # until PR gets merged https://github.com/deepakputhraya/action-pr-title/pull/29
with:
allowed_prefixes: 'feat,feature,fix,major,breaking,minor,enhancement,deprecated,removed,security,bug,bugfix,docs,packaging,test,refactor,refactoring,skip-release,skip_changelog,patch'
allowed_prefixes: feat,feature,fix,major,breaking,minor,enhancement,deprecated,removed,security,bug,bugfix,docs,packaging,test,refactor,refactoring,skip-release,skip_changelog,patch

- name: "Apply label"
- name: Apply label
if: github.event.pull_request.labels.length == 0
uses: bcoe/conventional-release-labels@v1
with:
type_labels: |
{
"feature": "enhancement",
"feat": "enhancement",
"fix": "bugfix",
"major": "major",
"breaking": "breaking",
"minor": "minor",
"enhancement": "enhancement",
"deprecated": "deprecated",
"removed": "removed",
"security": "security",
"bug": "bug",
"bugfix": "bugfix",
"docs": "trivial",
"packaging": "trivial",
"test": "trivial",
"refactor": "trivial",
"refactoring": "trivial",
"skip-release": "skip_changelog",
"skip_changelog": "skip_changelog",
"patch": "trivial"
}
{
"feature": "enhancement",
"feat": "enhancement",
"fix": "bugfix",
"major": "major",
"breaking": "breaking",
"minor": "minor",
"enhancement": "enhancement",
"deprecated": "deprecated",
"removed": "removed",
"security": "security",
"bug": "bug",
"bugfix": "bugfix",
"docs": "trivial",
"packaging": "trivial",
"test": "trivial",
"refactor": "trivial",
"refactoring": "trivial",
"skip-release": "skip_changelog",
"skip_changelog": "skip_changelog",
"patch": "trivial"
}
role-label:
runs-on: ubuntu-latest
needs: pr-label
if: github.event.pull_request.labels.length == 0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get changed roles
id: changed-roles
uses: tj-actions/changed-files@v35
with:
path: "roles"
path: roles
diff_relative: "true"
files: "**"
dir_names: "true"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
if: github.repository == 'mahendrapaipuri/ansible'
permissions:
contents: write
pages: write
id-token: write
needs: [build-docs]
name: Publish Ansible Docs
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install tools
run: python -m pip install ansible-base --disable-pip-version-check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
push_options: --force

- name: Checkout updated branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version_bumper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
container:
image: quay.io/prometheus/golang-builder:base
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get repos for each role
id: discover
Expand All @@ -36,5 +36,5 @@ jobs:
matrix:
include: ${{ fromJson(needs.discover-role-repos.outputs.role-repos) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./.github/scripts/version_updater.sh ${{ matrix.repo }} ${{ matrix.role }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/ansible/ansible-lint.git
rev: v24.2.0
rev: v24.6.1
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
Expand Down
18 changes: 9 additions & 9 deletions changelogs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
prelude_section_name: release_summary
prelude_section_title: "Release Summary"
prelude_section_title: Release Summary
sanitize_changelog: true
sections:
- - major_changes
- "Major Changes"
- Major Changes
- - minor_changes
- "Minor Changes"
- Minor Changes
- - breaking_changes
- "Breaking Changes / Porting Guide"
- Breaking Changes / Porting Guide
- - deprecated_features
- "Deprecated Features"
- Deprecated Features
- - removed_features
- "Removed Features (previously deprecated)"
- Removed Features (previously deprecated)
- - security_fixes
- "Security Fixes"
- Security Fixes
- - bugfixes
- "Bugfixes"
- Bugfixes
- - known_issues
- "Known Issues"
- Known Issues
title: mahendrapaipuri.Ansible
trivial_section_name: trivial
use_fqcn: true
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace: mahendrapaipuri
# The name of the collection. Has the same character restrictions as 'namespace'
name: ansible
# The version of the collection. Must be compatible with semantic versioning
version: 0.3.2
version: "0.3.2"
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
Expand Down Expand Up @@ -38,7 +38,7 @@ tags:
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies:
community.general: '>=1.0.0'
community.general: ">=1.0.0"
# The URL of the originating SCM repository
repository: https://github.com/mahendrapaipuri/ansible
# The URL to any online docs
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Collections must specify a minimum required ansible version to upload
# to galaxy
requires_ansible: ">=2.9.0,<=2.16.99"
requires_ansible: ">=2.10.0,<=2.17.99"

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
Expand Down
16 changes: 6 additions & 10 deletions roles/ceems_api_server/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ceems_api_server_version: 0.1.0-rc.5
ceems_api_server_version: "0.1.0"
ceems_api_server_binary_local_dir: ""
ceems_api_server_binary_url: "https://github.com/{{ _ceems_api_server_repo }}/releases/download/\
v{{ ceems_api_server_version }}/ceems-{{ ceems_api_server_version }}.linux-{{ go_arch }}.tar.gz"
Expand All @@ -12,18 +12,14 @@ ceems_api_server_web_listen_address: "0.0.0.0:9020"
ceems_api_server_tls_server_config: {}
ceems_api_server_http_server_config: {}
ceems_api_server_basic_auth_users: {}
ceems_api_server_resource_manager: slurm
ceems_api_server_config:
data:
path: /var/lib/ceems

ceems_api_server_data_path: /var/lib/ceems_api_server
ceems_api_server_data_retention_period: 1y
ceems_api_server_data_update_interval: 15m
ceems_api_server_data_backup_path: ""
ceems_api_server_data_backup_interval: ""

ceems_api_server_admin_users: []
ceems_api_server_clusters_config: []
ceems_api_server_updaters_config: []
ceems_api_server_cli_args: []
ceems_api_server_env_vars: {}
ceems_api_server_extra_configs: {}
ceems_api_server_binary_install_dir: /usr/local/bin
ceems_api_server_system_group: ceems
ceems_api_server_system_user: "{{ ceems_api_server_system_group }}"
Expand Down
Loading

0 comments on commit a13fcd3

Please sign in to comment.