From a13fcd372a93d2ef959f02a5a5cfba30ea02d143 Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri <44365948+mahendrapaipuri@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:02:50 +0200 Subject: [PATCH] minor: Upgrade ceems roles (#16) * 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 --- .config/molecule/config-podman.yml | 2 +- .config/molecule/config.yml | 41 +++++++------- .github/scripts/collection_version_parser.py | 2 +- .github/version-drafter.yml | 6 +-- .github/workflows/ansible-ci.yml | 8 +-- .github/workflows/conventional-label.yml | 54 +++++++++---------- .github/workflows/docs-pr.yml | 2 + .github/workflows/publish.yml | 2 +- .github/workflows/release.yml | 4 +- .github/workflows/version_bumper.yml | 4 +- .pre-commit-config.yaml | 2 +- changelogs/config.yaml | 18 +++---- galaxy.yml | 4 +- meta/runtime.yml | 2 +- roles/ceems_api_server/defaults/main.yml | 16 +++--- .../ceems_api_server/meta/argument_specs.yml | 50 +++++------------ .../molecule/alternative/molecule.yml | 24 +++++---- .../molecule/alternative/prepare.yml | 2 +- .../alternative/tests/test_alternative.py | 13 +++-- .../molecule/default/molecule.yml | 3 ++ .../molecule/default/prepare.yml | 2 +- .../molecule/default/tests/test_default.py | 2 +- .../molecule/latest/molecule.yml | 3 ++ .../molecule/latest/prepare.yml | 2 +- .../molecule/latest/tests/test_latest.py | 2 +- roles/ceems_api_server/tasks/configure.yml | 36 +++++-------- roles/ceems_api_server/tasks/preflight.yml | 20 +++++-- .../templates/ceems_api_server.service.j2 | 18 ++----- .../ceems_api_server/templates/config.yaml.j2 | 20 ++++--- .../templates/web-config.yaml.j2 | 18 +++++++ roles/ceems_exporter/defaults/main.yml | 3 +- roles/ceems_exporter/meta/argument_specs.yml | 3 -- .../molecule/alternative/molecule.yml | 2 +- roles/ceems_exporter/tasks/configure.yml | 2 +- .../templates/ceems_exporter.service.j2 | 4 -- roles/ceems_lb/defaults/main.yml | 11 ++-- roles/ceems_lb/meta/argument_specs.yml | 13 ++++- .../molecule/alternative/molecule.yml | 9 +++- roles/ceems_lb/molecule/default/molecule.yml | 6 ++- roles/ceems_lb/molecule/latest/molecule.yml | 6 ++- roles/ceems_lb/tasks/configure.yml | 5 +- roles/ceems_lb/templates/config.yaml.j2 | 16 ++++++ .../molecule/alternative/prepare.yml | 2 +- roles/litestream/molecule/default/prepare.yml | 2 +- roles/litestream/molecule/latest/prepare.yml | 2 +- tests/integration/molecule.sh | 2 +- tests/sanity/ignore-2.10.txt | 1 - tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - tests/sanity/ignore-2.13.txt | 1 - tests/sanity/ignore-2.14.txt | 1 - tests/sanity/ignore-2.15.txt | 1 - tests/sanity/ignore-2.16.txt | 1 - tests/sanity/ignore-2.9.txt | 1 - 54 files changed, 255 insertions(+), 223 deletions(-) create mode 100644 roles/ceems_api_server/templates/web-config.yaml.j2 create mode 100644 roles/ceems_lb/templates/config.yaml.j2 delete mode 100644 tests/sanity/ignore-2.10.txt delete mode 100644 tests/sanity/ignore-2.11.txt delete mode 100644 tests/sanity/ignore-2.12.txt delete mode 100644 tests/sanity/ignore-2.13.txt delete mode 100644 tests/sanity/ignore-2.14.txt delete mode 100644 tests/sanity/ignore-2.15.txt delete mode 100644 tests/sanity/ignore-2.16.txt delete mode 100644 tests/sanity/ignore-2.9.txt diff --git a/.config/molecule/config-podman.yml b/.config/molecule/config-podman.yml index 758e1c9..6e474d7 100644 --- a/.config/molecule/config-podman.yml +++ b/.config/molecule/config-podman.yml @@ -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 diff --git a/.config/molecule/config.yml b/.config/molecule/config.yml index d8740d6..b7d8b86 100644 --- a/.config/molecule/config.yml +++ b/.config/molecule/config.yml @@ -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 @@ -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 diff --git a/.github/scripts/collection_version_parser.py b/.github/scripts/collection_version_parser.py index 6d9cdf5..ac4cb80 100755 --- a/.github/scripts/collection_version_parser.py +++ b/.github/scripts/collection_version_parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ This module provides functions for parsing PEP 440 compliant diff --git a/.github/version-drafter.yml b/.github/version-drafter.yml index a5415f6..3af7402 100644 --- a/.github/version-drafter.yml +++ b/.github/version-drafter.yml @@ -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] diff --git a/.github/workflows/ansible-ci.yml b/.github/workflows/ansible-ci.yml index 1aecd07..9a375df 100644 --- a/.github/workflows/ansible-ci.yml +++ b/.github/workflows/ansible-ci.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/conventional-label.yml b/.github/workflows/conventional-label.yml index 81377af..e86c058 100644 --- a/.github/workflows/conventional-label.yml +++ b/.github/workflows/conventional-label.yml @@ -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" diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 851acd9..f1ff33d 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 731f5b1..67cbb3d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39e1ff6..dcd6e7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -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 }} diff --git a/.github/workflows/version_bumper.yml b/.github/workflows/version_bumper.yml index 1b40c98..3ab3958 100644 --- a/.github/workflows/version_bumper.yml +++ b/.github/workflows/version_bumper.yml @@ -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 @@ -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 }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 59f9aec..3d0b11d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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)$ diff --git a/changelogs/config.yaml b/changelogs/config.yaml index c2110dc..d60f44f 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -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 diff --git a/galaxy.yml b/galaxy.yml index 82721fe..a59d601 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -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 (url) @@ -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 diff --git a/meta/runtime.yml b/meta/runtime.yml index 29f04b2..44dec05 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -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 diff --git a/roles/ceems_api_server/defaults/main.yml b/roles/ceems_api_server/defaults/main.yml index b24d095..eec3d41 100644 --- a/roles/ceems_api_server/defaults/main.yml +++ b/roles/ceems_api_server/defaults/main.yml @@ -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" @@ -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 }}" diff --git a/roles/ceems_api_server/meta/argument_specs.yml b/roles/ceems_api_server/meta/argument_specs.yml index 9cede9f..4938b5f 100644 --- a/roles/ceems_api_server/meta/argument_specs.yml +++ b/roles/ceems_api_server/meta/argument_specs.yml @@ -29,43 +29,24 @@ argument_specs: ceems_api_server_web_listen_address: description: Address on which ceems API server will listen default: "0.0.0.0:9020" - ceems_api_server_resource_manager: + ceems_api_server_config: description: - - Name of the backend resource manager. - - Currently only SLURM is supported. - default: slurm - choices: - - slurm - ceems_api_server_data_retention_period: - description: - - Compute unit data will be retained for this period in the DB. - - "Units Supported: y, w, d, h, m, s, ms" - default: 1y - ceems_api_server_data_path: - description: - - Directory where data files of ceems API server are created. + - CEEMS API server config. Configuration under key L(`ceems_api_server` docs,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-api-server) - These files include the SQLite database. - default: /var/lib/ceems - ceems_api_server_data_update_interval: - description: - - DB will be updated from backend batch scheduler at this interval. - - This must be not too small nor too large. Use based on your platform job churn. - - "Units Supported: y, w, d, h, m, s, ms" - default: 15m - ceems_api_server_data_backup_path: + type: dict + required: true + ceems_api_server_clusters_config: description: - - Directory where DB back ups are stored. - - To achieve fault tolerance this directory should be on a different physical disk than actual DB or on a network file system. - default: "" - ceems_api_server_data_backup_interval: + - List of clusters that are monitored by CEEMS. + - Each element in list be of L(`cluster_config`,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-api-server#cluster_config) + type: list + elements: dict + ceems_api_server_updaters_config: description: - - A DB backup will be created at this interval. - - "Units Supported: y, w, d, h, m, s, ms" - default: "" - ceems_api_server_admin_users: - description: List of admin users for ceems API server. + - List of updaters used by CEEMS. + - Each element in list be of L(`updater_config`,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-api-server#updater_config) type: list - elements: str + elements: dict ceems_api_server_tls_server_config: description: - Configuration for TLS authentication. @@ -110,8 +91,3 @@ argument_specs: - I(Advanced) - Environment variables will be passed to CEEMS API server type: dict - ceems_api_server_extra_configs: - description: - - I(Advanced) - - Extra configuration files for CEEMS API server. These files will be created in CEEMS API server config dir with the same name as key of the argument dict. - type: dict diff --git a/roles/ceems_api_server/molecule/alternative/molecule.yml b/roles/ceems_api_server/molecule/alternative/molecule.yml index abe77af..1aeeb8d 100644 --- a/roles/ceems_api_server/molecule/alternative/molecule.yml +++ b/roles/ceems_api_server/molecule/alternative/molecule.yml @@ -13,15 +13,21 @@ provisioner: ceems_api_server_basic_auth_users: randomuser: examplepassword go_arch: amd64 - ceems_api_server_data_backup_path: /tmp/ceems_api_server - ceems_api_server_admin_users: - - adm1 - - adm2 + ceems_api_server_config: + data: + path: /var/lib/ceems + backup_path: /tmp/ceems + admin: + users: + - adm1 + - adm2 + ceems_api_server_clusters_config: + - id: slurm-0 + manager: slurm + ceems_api_server_updaters_config: + - id: tsdb-0 + updater: tsdb ceems_api_server_cli_args: - - --web.max.query.period=30d + - --log.level=debug ceems_api_server_env_vars: foo: bar - ceems_api_server_extra_configs: - tsdb_config: - web_url: http://localhost:9090 - queries: {} diff --git a/roles/ceems_api_server/molecule/alternative/prepare.yml b/roles/ceems_api_server/molecule/alternative/prepare.yml index d0854c1..0499bdd 100644 --- a/roles/ceems_api_server/molecule/alternative/prepare.yml +++ b/roles/ceems_api_server/molecule/alternative/prepare.yml @@ -29,7 +29,7 @@ tasks: - name: Create sacct executable file ansible.builtin.copy: - src: "../default/files/sacct" + src: ../default/files/sacct dest: /usr/bin/sacct owner: root group: root diff --git a/roles/ceems_api_server/molecule/alternative/tests/test_alternative.py b/roles/ceems_api_server/molecule/alternative/tests/test_alternative.py index 6e96479..ce72ca0 100644 --- a/roles/ceems_api_server/molecule/alternative/tests/test_alternative.py +++ b/roles/ceems_api_server/molecule/alternative/tests/test_alternative.py @@ -2,6 +2,7 @@ __metaclass__ = type import os +import yaml import testinfra.utils.ansible_runner import pytest @@ -10,8 +11,8 @@ @pytest.mark.parametrize("dir", [ - "/var/lib/ceems_api_server", - "/tmp/ceems_api_server" + "/var/lib/ceems", + "/tmp/ceems" ]) def test_directories(host, dir): d = host.file(dir) @@ -23,13 +24,19 @@ def test_directories(host, dir): "/etc/systemd/system/ceems_api_server.service", "/usr/local/bin/ceems_api_server", "/etc/ceems_api_server/config.yaml", - "/etc/ceems_api_server/tsdb_config.yaml", ]) def test_files(host, file): f = host.file(file) assert f.exists assert f.is_file + if file == "/etc/ceems_api_server/config.yaml": + config_bytes = host.file(file).content + config = yaml.safe_load(config_bytes.decode('utf-8')) + assert len(config["clusters"]) == 1 + assert len(config["updaters"]) == 1 + assert config["ceems_api_server"]["data"]["backup_path"] == "/tmp/ceems" + @pytest.mark.parametrize("dir", [ "/etc", diff --git a/roles/ceems_api_server/molecule/default/molecule.yml b/roles/ceems_api_server/molecule/default/molecule.yml index e019629..a2e4d7b 100644 --- a/roles/ceems_api_server/molecule/default/molecule.yml +++ b/roles/ceems_api_server/molecule/default/molecule.yml @@ -4,3 +4,6 @@ provisioner: group_vars: all: ceems_api_server_web_listen_address: 127.0.0.1:9020 + ceems_api_server_config: + data: + path: /var/lib/ceems diff --git a/roles/ceems_api_server/molecule/default/prepare.yml b/roles/ceems_api_server/molecule/default/prepare.yml index cd2d8a0..c3d1def 100644 --- a/roles/ceems_api_server/molecule/default/prepare.yml +++ b/roles/ceems_api_server/molecule/default/prepare.yml @@ -5,7 +5,7 @@ tasks: - name: Create sacct executable file ansible.builtin.copy: - src: "files/sacct" + src: files/sacct dest: /usr/bin/sacct owner: root group: root diff --git a/roles/ceems_api_server/molecule/default/tests/test_default.py b/roles/ceems_api_server/molecule/default/tests/test_default.py index a635154..1c24568 100644 --- a/roles/ceems_api_server/molecule/default/tests/test_default.py +++ b/roles/ceems_api_server/molecule/default/tests/test_default.py @@ -10,7 +10,7 @@ @pytest.mark.parametrize("dir", [ - "/var/lib/ceems_api_server" + "/var/lib/ceems" ]) def test_directories(host, dir): d = host.file(dir) diff --git a/roles/ceems_api_server/molecule/latest/molecule.yml b/roles/ceems_api_server/molecule/latest/molecule.yml index 797c126..5d3cd1f 100644 --- a/roles/ceems_api_server/molecule/latest/molecule.yml +++ b/roles/ceems_api_server/molecule/latest/molecule.yml @@ -4,3 +4,6 @@ provisioner: group_vars: all: ceems_api_server_version: latest + ceems_api_server_config: + data: + path: /var/lib/ceems diff --git a/roles/ceems_api_server/molecule/latest/prepare.yml b/roles/ceems_api_server/molecule/latest/prepare.yml index 4a75dff..e3c9dab 100644 --- a/roles/ceems_api_server/molecule/latest/prepare.yml +++ b/roles/ceems_api_server/molecule/latest/prepare.yml @@ -5,7 +5,7 @@ tasks: - name: Create sacct executable file ansible.builtin.copy: - src: "../default/files/sacct" + src: ../default/files/sacct dest: /usr/bin/sacct owner: root group: root diff --git a/roles/ceems_api_server/molecule/latest/tests/test_latest.py b/roles/ceems_api_server/molecule/latest/tests/test_latest.py index a635154..1c24568 100644 --- a/roles/ceems_api_server/molecule/latest/tests/test_latest.py +++ b/roles/ceems_api_server/molecule/latest/tests/test_latest.py @@ -10,7 +10,7 @@ @pytest.mark.parametrize("dir", [ - "/var/lib/ceems_api_server" + "/var/lib/ceems" ]) def test_directories(host, dir): d = host.file(dir) diff --git a/roles/ceems_api_server/tasks/configure.yml b/roles/ceems_api_server/tasks/configure.yml index 6d1d936..24576b2 100644 --- a/roles/ceems_api_server/tasks/configure.yml +++ b/roles/ceems_api_server/tasks/configure.yml @@ -16,15 +16,6 @@ group: root mode: u+rwX,g+rwX,o+rX -- name: Make the ceems_api_server backup data directory - ansible.builtin.file: - path: "{{ ceems_api_server_data_backup_path }}" - state: directory - owner: "{{ ceems_api_server_system_user }}" - group: "{{ ceems_api_server_system_group }}" - mode: u+rwX,g+rwX,o-rwX - when: ceems_api_server_data_backup_path | length > 0 - - name: Copy the ceems_api_server config file ansible.builtin.template: src: config.yaml.j2 @@ -34,32 +25,33 @@ mode: u+rw,g+r,o-rwX notify: restart ceems_api_server -- name: Create extra config files - ansible.builtin.copy: - dest: "/etc/ceems_api_server/{{ item.key }}.yaml" +- name: Copy the ceems_api_server web config file + ansible.builtin.template: + src: web-config.yaml.j2 + dest: /etc/ceems_api_server/web-config.yaml owner: "{{ ceems_api_server_system_user }}" group: "{{ ceems_api_server_system_group }}" mode: u+rw,g+r,o-rwX - content: | - # - # Ansible managed: Do NOT edit this file manually! - # - --- - - {{ item.value | to_nice_yaml(indent=2, default_style='|') }} - when: ceems_api_server_extra_configs | length > 0 - loop: "{{ ceems_api_server_extra_configs | dict2items }}" notify: restart ceems_api_server - name: Make the ceems_api_server data directory ansible.builtin.file: - path: "{{ ceems_api_server_data_path }}" + path: "{{ _ceems_api_server_data_path }}" state: directory owner: "{{ ceems_api_server_system_user }}" group: "{{ ceems_api_server_system_group }}" mode: u+rwX,g+rwX,o-rwX notify: restart ceems_api_server +- name: Make the ceems_api_server backup data directory + ansible.builtin.file: + path: "{{ _ceems_api_server_data_backup_path }}" + state: directory + owner: "{{ ceems_api_server_system_user }}" + group: "{{ ceems_api_server_system_group }}" + mode: u+rwX,g+rwX,o-rwX + when: _ceems_api_server_data_backup_path | length > 0 + - name: Allow ceems_api_server port in SELinux on RedHat OS family community.general.seport: ports: "{{ ceems_api_server_web_listen_address.split(':')[-1] }}" diff --git a/roles/ceems_api_server/tasks/preflight.yml b/roles/ceems_api_server/tasks/preflight.yml index 69ded64..7389458 100644 --- a/roles/ceems_api_server/tasks/preflight.yml +++ b/roles/ceems_api_server/tasks/preflight.yml @@ -30,6 +30,15 @@ list | length == 0 +- name: Assert that config is set + ansible.builtin.fail: + msg: ceems_api_server_config is invalid + when: item is not defined + loop: + - ceems_api_server_config + - ceems_api_server_config.data + - ceems_api_server_config.data.path + - name: Assert that TLS config is correct when: ceems_api_server_tls_server_config | length > 0 block: @@ -74,9 +83,8 @@ - name: Discover latest version ansible.builtin.set_fact: - ceems_api_server_version: "{{ (lookup('url', 'https://api.github.com/repos/{{ _ceems_api_server_repo }}/releases/latest', - headers=_github_api_headers, split_lines=False) | from_json).get('tag_name') - | replace('v', '') }}" + ceems_api_server_version: "{{ (lookup('url', 'https://api.github.com/repos/{{ _ceems_api_server_repo }}/releases/latest', headers=_github_api_headers, split_lines=False) + | from_json).get('tag_name') | replace('v', '') }}" run_once: true until: ceems_api_server_version is version('0.0.0', '>=') retries: 10 @@ -85,6 +93,12 @@ - ceems_api_server_binary_local_dir | length == 0 - not ceems_api_server_skip_install +- name: Discover data path and backup path + ansible.builtin.set_fact: + _ceems_api_server_data_path: "{{ ceems_api_server_config['data']['path'] }}" + _ceems_api_server_data_backup_path: "{{ ceems_api_server_config['data']['backup_path'] if 'backup_path' in ceems_api_server_config['data'].keys() else '' }}" + run_once: true + - name: Get ceems_api_server binary checksum when: - ceems_api_server_binary_local_dir | length == 0 diff --git a/roles/ceems_api_server/templates/ceems_api_server.service.j2 b/roles/ceems_api_server/templates/ceems_api_server.service.j2 index 29d48b2..8e2a8b6 100644 --- a/roles/ceems_api_server/templates/ceems_api_server.service.j2 +++ b/roles/ceems_api_server/templates/ceems_api_server.service.j2 @@ -9,19 +9,9 @@ Type=simple User={{ ceems_api_server_system_user }} Group={{ ceems_api_server_system_group }} ExecStart={{ ceems_api_server_binary_install_dir }}/ceems_api_server \ - --resource.manager.{{ ceems_api_server_resource_manager }} \ - --storage.data.path={{ ceems_api_server_data_path }} \ - --storage.data.retention.period={{ ceems_api_server_data_retention_period }} \ - --storage.data.update.interval={{ ceems_api_server_data_update_interval }} \ -{% if ceems_api_server_data_backup_path and ceems_api_server_data_backup_interval %} - --storage.data.backup.path={{ ceems_api_server_data_backup_path }} \ - --storage.data.backup.interval={{ ceems_api_server_data_backup_interval }} \ -{% endif %} -{% if ceems_api_server_admin_users | length > 0 %} - --web.admin-users={{ ceems_api_server_admin_users | join(",") }} \ -{% endif %} + --config.file=/etc/ceems_api_server/config.yaml \ {% if ceems_api_server_tls_server_config | length > 0 or ceems_api_server_http_server_config | length > 0 or ceems_api_server_basic_auth_users | length > 0 %} - --web.config.file=/etc/ceems_api_server/config.yaml \ + --web.config.file=/etc/ceems_api_server/web-config.yaml \ {% endif %} {% for cli_arg in ceems_api_server_cli_args %} {{ cli_arg }} \ @@ -38,8 +28,8 @@ StartLimitInterval=0 {% set ns.protect_home = 'read-only' %} {% endfor %} ProtectHome={{ ns.protect_home }} -ReadWritePaths={{ ceems_api_server_data_path }} {{ ceems_api_server_data_backup_path }} -WorkingDirectory={{ ceems_api_server_data_path }} +ReadWritePaths={{ _ceems_api_server_data_path }} {{ _ceems_api_server_data_backup_path }} +WorkingDirectory={{ _ceems_api_server_data_path }} {% if ns.caps %} AmbientCapabilities={{ ns.caps | unique | join(' ') }} diff --git a/roles/ceems_api_server/templates/config.yaml.j2 b/roles/ceems_api_server/templates/config.yaml.j2 index fc37088..7749923 100644 --- a/roles/ceems_api_server/templates/config.yaml.j2 +++ b/roles/ceems_api_server/templates/config.yaml.j2 @@ -1,18 +1,16 @@ --- {{ ansible_managed | comment }} -{% if ceems_api_server_tls_server_config | length > 0 %} -tls_server_config: -{{ ceems_api_server_tls_server_config | to_nice_yaml | indent(2, true) }} +{% if ceems_api_server_config | length > 0 %} +ceems_api_server: +{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }} {% endif %} -{% if ceems_api_server_http_server_config | length > 0 %} -http_server_config: -{{ ceems_api_server_http_server_config | to_nice_yaml | indent(2, true) }} +{% if ceems_api_server_clusters_config | length > 0 %} +clusters: +{{ ceems_api_server_clusters_config | to_nice_yaml | indent(2, true) }} {% endif %} -{% if ceems_api_server_basic_auth_users | length > 0 %} -basic_auth_users: -{% for k, v in ceems_api_server_basic_auth_users.items() %} - {{ k }}: {{ v | string | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }} -{% endfor %} +{% if ceems_api_server_updaters_config | length > 0 %} +updaters: +{{ ceems_api_server_updaters_config | to_nice_yaml | indent(2, true) }} {% endif %} diff --git a/roles/ceems_api_server/templates/web-config.yaml.j2 b/roles/ceems_api_server/templates/web-config.yaml.j2 new file mode 100644 index 0000000..fc37088 --- /dev/null +++ b/roles/ceems_api_server/templates/web-config.yaml.j2 @@ -0,0 +1,18 @@ +--- +{{ ansible_managed | comment }} +{% if ceems_api_server_tls_server_config | length > 0 %} +tls_server_config: +{{ ceems_api_server_tls_server_config | to_nice_yaml | indent(2, true) }} +{% endif %} + +{% if ceems_api_server_http_server_config | length > 0 %} +http_server_config: +{{ ceems_api_server_http_server_config | to_nice_yaml | indent(2, true) }} +{% endif %} + +{% if ceems_api_server_basic_auth_users | length > 0 %} +basic_auth_users: +{% for k, v in ceems_api_server_basic_auth_users.items() %} + {{ k }}: {{ v | string | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }} +{% endfor %} +{% endif %} diff --git a/roles/ceems_exporter/defaults/main.yml b/roles/ceems_exporter/defaults/main.yml index 864ed07..735e43a 100644 --- a/roles/ceems_exporter/defaults/main.yml +++ b/roles/ceems_exporter/defaults/main.yml @@ -1,5 +1,5 @@ --- -ceems_exporter_version: 0.1.0-rc.5 +ceems_exporter_version: "0.1.0" ceems_exporter_binary_local_dir: "" ceems_exporter_binary_url: "https://github.com/{{ _ceems_exporter_repo }}/releases/download/v{{ ceems_exporter_version }}/\ ceems-{{ ceems_exporter_version }}.linux-{{ go_arch }}.tar.gz" @@ -18,7 +18,6 @@ ceems_exporter_create_unique_jobids: false ceems_exporter_slurm_job_props_dir: "" ceems_exporter_gpu_type: "" ceems_exporter_gpu_job_map_dir: "" -ceems_exporter_emissions_country_code: FR ceems_exporter_ipmi_dcmi_cmd: sudo /usr/sbin/ipmi-dcmi --get-system-power-statistics diff --git a/roles/ceems_exporter/meta/argument_specs.yml b/roles/ceems_exporter/meta/argument_specs.yml index ee181e3..9fb2708 100644 --- a/roles/ceems_exporter/meta/argument_specs.yml +++ b/roles/ceems_exporter/meta/argument_specs.yml @@ -64,9 +64,6 @@ argument_specs: - Directory where files containing mapping of SLURM job ID to GPU ordinals are created by Epilog scripts. - Check the L(example scripts,https://github.com/mahendrapaipuri/ceems_monitoring/tree/main/etc/slurm/epilog.d). default: "" - ceems_exporter_emissions_country_code: - description: ISO 3166-1 alpha-3 Country code to export emission data. - default: FR ceems_exporter_ipmi_dcmi_cmd: description: - Full command to get power statistics from IPMI. Use absolute path to IPMI command. diff --git a/roles/ceems_exporter/molecule/alternative/molecule.yml b/roles/ceems_exporter/molecule/alternative/molecule.yml index bd4aa02..0a39365 100644 --- a/roles/ceems_exporter/molecule/alternative/molecule.yml +++ b/roles/ceems_exporter/molecule/alternative/molecule.yml @@ -19,6 +19,6 @@ provisioner: - emissions ceems_exporter_disabled_collectors: - slurm - ceems_exporter_ipmi_dcmi_cmd: "sudo ipmi-dcmi" + ceems_exporter_ipmi_dcmi_cmd: sudo ipmi-dcmi ceems_exporter_env_vars: EMAPS_API_TOKEN: foo diff --git a/roles/ceems_exporter/tasks/configure.yml b/roles/ceems_exporter/tasks/configure.yml index f8c4f7b..f065eda 100644 --- a/roles/ceems_exporter/tasks/configure.yml +++ b/roles/ceems_exporter/tasks/configure.yml @@ -31,7 +31,7 @@ user: "{{ ceems_exporter_system_user }}" commands: /usr/sbin/ipmi-dcmi when: - - 'not "ipmi_dcmi" in ceems_exporter_disabled_collectors' + - not "ipmi_dcmi" in ceems_exporter_disabled_collectors - '"sudo" in ceems_exporter_ipmi_dcmi_cmd' - ceems_exporter_system_user != "root" diff --git a/roles/ceems_exporter/templates/ceems_exporter.service.j2 b/roles/ceems_exporter/templates/ceems_exporter.service.j2 index cd262ab..dc1f77a 100644 --- a/roles/ceems_exporter/templates/ceems_exporter.service.j2 +++ b/roles/ceems_exporter/templates/ceems_exporter.service.j2 @@ -31,10 +31,6 @@ ExecStart={{ ceems_exporter_binary_install_dir }}/ceems_exporter \ --collector.slurm.gpu.type={{ ceems_exporter_gpu_type }} \ --collector.slurm.gpu.job.map.path={{ ceems_exporter_gpu_job_map_dir }} \ {% endif %} -{% if ceems_exporter_emissions_country_code and - "emissions" in ceems_exporter_enabled_collectors %} - --collector.emissions.country.code={{ ceems_exporter_emissions_country_code }} \ -{% endif %} {% if ceems_exporter_tls_server_config | length > 0 or ceems_exporter_http_server_config | length > 0 or ceems_exporter_basic_auth_users | length > 0 %} --web.config.file=/etc/ceems_exporter/config.yaml \ {% endif %} diff --git a/roles/ceems_lb/defaults/main.yml b/roles/ceems_lb/defaults/main.yml index 5f79300..61aa0b2 100644 --- a/roles/ceems_lb/defaults/main.yml +++ b/roles/ceems_lb/defaults/main.yml @@ -1,5 +1,5 @@ --- -ceems_lb_version: "0.1.0-rc.6" +ceems_lb_version: "0.1.0" ceems_lb_binary_local_dir: "" ceems_lb_binary_url: https://github.com/{{ _ceems_lb_repo }}/releases/download/v{{ ceems_lb_version }}/ceems-{{ ceems_lb_version }}.linux-{{ go_arch }}.tar.gz ceems_lb_checksums_url: https://github.com/{{ _ceems_lb_repo }}/releases/download/v{{ ceems_lb_version }}/sha256sums.txt @@ -11,8 +11,13 @@ ceems_lb_tls_server_config: {} ceems_lb_http_server_config: {} ceems_lb_basic_auth_users: {} ceems_lb_config: - strategy: resource-based - + strategy: round-robin + backends: + - id: default + tsdb_urls: + - http://localhost:9090 +ceems_api_server_config: {} +ceems_api_server_clusters_config: [] ceems_lb_cli_args: [] ceems_lb_env_vars: {} ceems_lb_binary_install_dir: /usr/local/bin diff --git a/roles/ceems_lb/meta/argument_specs.yml b/roles/ceems_lb/meta/argument_specs.yml index 914e60b..aa11f1f 100644 --- a/roles/ceems_lb/meta/argument_specs.yml +++ b/roles/ceems_lb/meta/argument_specs.yml @@ -32,9 +32,20 @@ argument_specs: ceems_lb_config: description: - Configuration of CEEMS LB. - - Keys and values are the same as in L(ceems_lb docs,https://github.com/mahendrapaipuri/ceems/blob/main/build/package/ceems_lb/config.yml). + - Configuration under key `ceems_lb` in L(ceems_lb docs,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-lb). type: dict required: true + ceems_api_server_config: + description: + - Client configuration of CEEMS API server. + - Configuration under key `ceems_api_server` in L(ceems_lb docs,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-lb). + type: dict + ceems_api_server_clusters_config: + description: + - Configuration of CEEMS API server clusters. This is optional + - Keys and values are the same as in L(clusters docs,https://mahendrapaipuri.github.io/ceems/docs/configuration/ceems-api-server#cluster_config). + type: list + elements: dict ceems_lb_tls_server_config: description: - Configuration for TLS authentication. diff --git a/roles/ceems_lb/molecule/alternative/molecule.yml b/roles/ceems_lb/molecule/alternative/molecule.yml index e3ea3f7..f9e4fa6 100644 --- a/roles/ceems_lb/molecule/alternative/molecule.yml +++ b/roles/ceems_lb/molecule/alternative/molecule.yml @@ -5,9 +5,14 @@ provisioner: all: ceems_lb_web_listen_address: 127.0.0.1:8080 ceems_lb_config: - strategy: resource-based + strategy: round-robin backends: - - url: http://localhost:9090 + - id: default + tsdb_urls: + - http://localhost:9090 + ceems_api_server_config: + data: + path: /var/lib/ceems ceems_lb_tls_server_config: cert_file: /etc/ceems_lb/tls.cert key_file: /etc/ceems_lb/tls.key diff --git a/roles/ceems_lb/molecule/default/molecule.yml b/roles/ceems_lb/molecule/default/molecule.yml index d8c5484..0521ead 100644 --- a/roles/ceems_lb/molecule/default/molecule.yml +++ b/roles/ceems_lb/molecule/default/molecule.yml @@ -5,6 +5,8 @@ provisioner: all: ceems_lb_web_listen_address: 127.0.0.1:9030 ceems_lb_config: - strategy: resource-based + strategy: round-robin backends: - - url: http://localhost:9090 + - id: default + tsdb_urls: + - http://localhost:9090 diff --git a/roles/ceems_lb/molecule/latest/molecule.yml b/roles/ceems_lb/molecule/latest/molecule.yml index f2b9349..7d9e76c 100644 --- a/roles/ceems_lb/molecule/latest/molecule.yml +++ b/roles/ceems_lb/molecule/latest/molecule.yml @@ -5,6 +5,8 @@ provisioner: all: ceems_lb_version: latest ceems_lb_config: - strategy: resource-based + strategy: round-robin backends: - - url: http://localhost:9090 + - id: default + tsdb_urls: + - http://localhost:9090 diff --git a/roles/ceems_lb/tasks/configure.yml b/roles/ceems_lb/tasks/configure.yml index 7a9fed1..68e444d 100644 --- a/roles/ceems_lb/tasks/configure.yml +++ b/roles/ceems_lb/tasks/configure.yml @@ -26,13 +26,12 @@ notify: restart ceems_lb - name: Copy the ceems_lb config file - ansible.builtin.copy: + ansible.builtin.template: + src: config.yaml.j2 dest: /etc/ceems_lb/config.yaml owner: "{{ ceems_lb_system_user }}" group: "{{ ceems_lb_system_group }}" mode: "0640" - content: | - {{ ceems_lb_config | to_nice_yaml(indent=2) }} notify: restart ceems_lb - name: Allow ceems_lb port in SELinux on RedHat OS family diff --git a/roles/ceems_lb/templates/config.yaml.j2 b/roles/ceems_lb/templates/config.yaml.j2 new file mode 100644 index 0000000..f866871 --- /dev/null +++ b/roles/ceems_lb/templates/config.yaml.j2 @@ -0,0 +1,16 @@ +--- +{{ ansible_managed | comment }} +{% if ceems_lb_config | length > 0 %} +ceems_lb: +{{ ceems_lb_config | to_nice_yaml | indent(2, true) }} +{% endif %} + +{% if ceems_api_server_config | length > 0 %} +ceems_api_server: +{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }} +{% endif %} + +{% if ceems_api_server_clusters_config | length > 0 %} +clusters: +{{ ceems_api_server_clusters_config }} +{% endif %} diff --git a/roles/litestream/molecule/alternative/prepare.yml b/roles/litestream/molecule/alternative/prepare.yml index ed3df1e..4432ed2 100644 --- a/roles/litestream/molecule/alternative/prepare.yml +++ b/roles/litestream/molecule/alternative/prepare.yml @@ -5,7 +5,7 @@ any_errors_fatal: true tasks: - name: Install RedHat sqlite package - ansible.builtin.yum: + ansible.builtin.dnf: name: sqlite state: present when: ansible_os_family == 'RedHat' diff --git a/roles/litestream/molecule/default/prepare.yml b/roles/litestream/molecule/default/prepare.yml index cd73af4..9ff3ccd 100644 --- a/roles/litestream/molecule/default/prepare.yml +++ b/roles/litestream/molecule/default/prepare.yml @@ -5,7 +5,7 @@ any_errors_fatal: true tasks: - name: Install RedHat sqlite package - ansible.builtin.yum: + ansible.builtin.dnf: name: sqlite state: present when: ansible_os_family == 'RedHat' diff --git a/roles/litestream/molecule/latest/prepare.yml b/roles/litestream/molecule/latest/prepare.yml index 52c1883..d9e3fc0 100644 --- a/roles/litestream/molecule/latest/prepare.yml +++ b/roles/litestream/molecule/latest/prepare.yml @@ -5,7 +5,7 @@ any_errors_fatal: true tasks: - name: Install RedHat sqlite package - ansible.builtin.yum: + ansible.builtin.dnf: name: sqlite state: present when: ansible_os_family == 'RedHat' diff --git a/tests/integration/molecule.sh b/tests/integration/molecule.sh index 4a0cf52..b81abbb 100755 --- a/tests/integration/molecule.sh +++ b/tests/integration/molecule.sh @@ -51,5 +51,5 @@ unset _ANSIBLE_COVERAGE_CONFIG unset ANSIBLE_PYTHON_INTERPRETER # Run molecule test -cd "$role_root" +cd "$role_root" || exit molecule -c "$collection_root/.config/molecule/config.yml" test -s "$scenario" diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.10.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.11.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.12.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.13.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.14.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.15.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.16.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346 diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt deleted file mode 100644 index fd1541b..0000000 --- a/tests/sanity/ignore-2.9.txt +++ /dev/null @@ -1 +0,0 @@ -.github/scripts/collection_version_parser.py shebang # https://github.com/ansible/ansible/issues/78346