From 9700f197db2aed5c67409bf317223c0934b26f72 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Tue, 5 Mar 2024 12:35:42 -0800 Subject: [PATCH] fix remaining lint issues --- .github/workflows/kompose.yml | 14 ++++++++------ .github/workflows/kubectl.yml | 14 ++++++-------- changelogs/changelog.yaml | 22 +++++++++++----------- changelogs/config.yaml | 34 +++++++++++++++++----------------- meta/runtime.yml | 1 + molecule/kompose/molecule.yml | 2 +- molecule/kompose/verify.yml | 6 +++--- molecule/kubectl/molecule.yml | 2 +- molecule/kubectl/verify.yml | 6 +++--- 9 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 meta/runtime.yml diff --git a/.github/workflows/kompose.yml b/.github/workflows/kompose.yml index 651eb71..dc9f434 100644 --- a/.github/workflows/kompose.yml +++ b/.github/workflows/kompose.yml @@ -34,18 +34,20 @@ jobs: with: path: ansible_collections/ericsysmin/kubernetes - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | - sudo apt install docker + sudo apt install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://get.docker.com -o get-docker.sh + sudo sh get-docker.sh python -m pip install --upgrade pip - pip install molecule yamllint ansible-lint docker + pip install ansible molecule yamllint ansible-lint molecule-plugins[docker] - - name: Run role test + - name: Run role tests run: >- molecule --version && ansible --version && diff --git a/.github/workflows/kubectl.yml b/.github/workflows/kubectl.yml index 6a3c952..43a20b8 100644 --- a/.github/workflows/kubectl.yml +++ b/.github/workflows/kubectl.yml @@ -21,13 +21,11 @@ jobs: fail-fast: true matrix: molecule_distro: - - distro: centos:7 - command: /usr/sbin/init - - {distro: centos-8, command: /usr/sbin/init} - - {distro: ubuntu-18.04, command: /lib/systemd/systemd} - - {distro: ubuntu-20.04, command: /lib/systemd/systemd} - - {distro: ubuntu-22.04, command: /lib/systemd/systemd} - - {distro: debian-10, command: /lib/systemd/systemd} + - { distro: centos-8, command: /usr/sbin/init } + - { distro: ubuntu-18.04, command: /lib/systemd/systemd } + - { distro: ubuntu-20.04, command: /lib/systemd/systemd } + - { distro: ubuntu-22.04, command: /lib/systemd/systemd } + - { distro: debian-10, command: /lib/systemd/systemd } collection_role: - kubectl steps: @@ -55,4 +53,4 @@ jobs: ansible --version && MOLECULE_COMMAND=${{ matrix.molecule_distro.command }} MOLECULE_DISTRO=${{ matrix.molecule_distro.distro }} - molecule --debug test -s ${{ matrix.collection_role }} \ No newline at end of file + molecule --debug test -s ${{ matrix.collection_role }} diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b30e9e3..302eaa9 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -3,17 +3,17 @@ releases: 1.0.0: changes: major_changes: - - added recent versions of OS tests - - ensured existing role works with newer OS releases - - updated all tasks to meet newer ansible-lint requirements - - updated molecule testing + - added recent versions of OS tests + - ensured existing role works with newer OS releases + - updated all tasks to meet newer ansible-lint requirements + - updated molecule testing release_summary: 1.0.0 release of the Kubernetes collection objects: role: - - description: Ansible role to deploy kompose - name: kompose - namespace: null - - description: Ansible role to deploy kubectl - name: kubectl - namespace: null - release_date: '2024-03-05' + - description: Ansible role to deploy kompose + name: kompose + namespace: null + - description: Ansible role to deploy kubectl + name: kubectl + namespace: null + release_date: "2024-03-05" diff --git a/changelogs/config.yaml b/changelogs/config.yaml index fe972fb..dc6c097 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -8,27 +8,27 @@ mention_ancestor: true new_plugins_after_name: removed_features notesdir: fragments output_formats: -- rst + - rst prelude_section_name: release_summary prelude_section_title: Release Summary sanitize_changelog: true sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: Ericsysmin.Kubernetes trivial_section_name: trivial use_fqcn: true diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 0000000..bb3fca1 --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1 @@ +requires_ansible: '>=2.14.0' diff --git a/molecule/kompose/molecule.yml b/molecule/kompose/molecule.yml index ccdcfee..2780dfc 100644 --- a/molecule/kompose/molecule.yml +++ b/molecule/kompose/molecule.yml @@ -18,4 +18,4 @@ platforms: provisioner: name: ansible playbooks: - converge: ${MOLECULE_PLAYBOOK:-converge.yml} \ No newline at end of file + converge: ${MOLECULE_PLAYBOOK:-converge.yml} diff --git a/molecule/kompose/verify.yml b/molecule/kompose/verify.yml index a82dd6f..6e148b1 100644 --- a/molecule/kompose/verify.yml +++ b/molecule/kompose/verify.yml @@ -4,6 +4,6 @@ - name: Verify hosts: all tasks: - - name: Example assertion - assert: - that: true + - name: Example assertion + ansible.builtin.assert: + that: true diff --git a/molecule/kubectl/molecule.yml b/molecule/kubectl/molecule.yml index ccdcfee..2780dfc 100644 --- a/molecule/kubectl/molecule.yml +++ b/molecule/kubectl/molecule.yml @@ -18,4 +18,4 @@ platforms: provisioner: name: ansible playbooks: - converge: ${MOLECULE_PLAYBOOK:-converge.yml} \ No newline at end of file + converge: ${MOLECULE_PLAYBOOK:-converge.yml} diff --git a/molecule/kubectl/verify.yml b/molecule/kubectl/verify.yml index a82dd6f..6e148b1 100644 --- a/molecule/kubectl/verify.yml +++ b/molecule/kubectl/verify.yml @@ -4,6 +4,6 @@ - name: Verify hosts: all tasks: - - name: Example assertion - assert: - that: true + - name: Example assertion + ansible.builtin.assert: + that: true