diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 4d693bb..0e1a71e 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -32,7 +32,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.1" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.2" - name: Convert role to collection format run: | diff --git a/.github/workflows/ansible-managed-var-comment.yml b/.github/workflows/ansible-managed-var-comment.yml index 0014762..b2b8460 100644 --- a/.github/workflows/ansible-managed-var-comment.yml +++ b/.github/workflows/ansible-managed-var-comment.yml @@ -30,7 +30,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.1" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.2" - name: Run ansible-plugin-scan run: | diff --git a/.github/workflows/ansible-plugin-scan.yml b/.github/workflows/ansible-plugin-scan.yml index ae7c74c..8085384 100644 --- a/.github/workflows/ansible-plugin-scan.yml +++ b/.github/workflows/ansible-plugin-scan.yml @@ -30,7 +30,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.1" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.2" - name: Run ansible-plugin-scan run: | diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index e63d92a..26fe33c 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -33,7 +33,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.1" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.2.2" - name: Convert role to collection format run: | diff --git a/.github/workflows/python-unit-test.yml b/.github/workflows/python-unit-test.yml index c69a9a1..bcb21e6 100644 --- a/.github/workflows/python-unit-test.yml +++ b/.github/workflows/python-unit-test.yml @@ -58,7 +58,7 @@ jobs: run: | set -euxo pipefail python -m pip install --upgrade pip - pip install "git+https://github.com/linux-system-roles/tox-lsr@3.2.1" + pip install "git+https://github.com/linux-system-roles/tox-lsr@3.2.2" # If you have additional OS dependency packages e.g. libcairo2-dev # then put them in .github/config/ubuntu-requirements.txt, one # package per line. diff --git a/.github/workflows/weekly_ci.yml b/.github/workflows/weekly_ci.yml index aff7f38..225dbdd 100644 --- a/.github/workflows/weekly_ci.yml +++ b/.github/workflows/weekly_ci.yml @@ -4,7 +4,7 @@ name: Weekly CI trigger on: # yamllint disable-line rule:truthy workflow_dispatch: schedule: - - cron: 0 0 * * 6 + - cron: 0 22 * * 6 env: BRANCH_NAME: weekly-ci COMMIT_MESSAGE: "ci: This PR is to trigger periodic CI testing" diff --git a/README.md b/README.md index b183a1d..88d3803 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # snapshot -[![ansible-lint.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/codeql.yml) [![integration.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/integration.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/integration.yml) [![markdownlint.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/shellcheck.yml) [![woke.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/woke.yml) [![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/snapshot/badge.svg)](https://coveralls.io/github/linux-system-roles/snapshot) [![Code Style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/linux-system-roles/snapshot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/linux-system-roles/snapshot/context:python) +[![ansible-lint.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/codeql.yml) [![markdownlint.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/shellcheck.yml) [![woke.yml](https://github.com/linux-system-roles/snapshot/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/snapshot/actions/workflows/woke.yml) ![template](https://github.com/linux-system-roles/snapshot/workflows/tox/badge.svg) diff --git a/contributing.md b/contributing.md index de6be96..6ed68ae 100644 --- a/contributing.md +++ b/contributing.md @@ -19,3 +19,34 @@ are likely to be suitable for new contributors! **Code** is managed on [Github](https://github.com/linux-system-roles/snapshot), using [Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests). + +## Python Code + +The Python code needs to be **compatible with the Python versions supported by +the role platform**. + +For example, see [meta](https://github.com/linux-system-roles/snapshot/blob/main/meta/main.yml) +for the platforms supported by the role. + +If the role provides Ansible modules (code in `library/` or `module_utils/`) - +these run on the *managed* node, and typically[1] use the default system python: + +* EL6 - python 2.6 +* EL7 - python 2.7 or python 3.6 in some cases +* EL8 - python 3.6 +* EL9 - python 3.9 + +If the role provides some other sort of Ansible plugin such as a filter, test, +etc. - these run on the *control* node and typically use whatever version of +python that Ansible uses, which in many cases is *not* the system python, and +may be a modularity release such as python311. + +In general, it is a good idea to ensure the role python code works on all +versions of python supported by `tox-lsr` from py36 on, and on py27 if the role +supports EL7, and on py26 if the role supports EL6.[1] + +[1] Advanced users may set +[ansible_python_interpreter](https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html#term-ansible_python_interpreter) +to use a non-system python on the managed node, so it is a good idea to ensure +your code has broad python version compatibility, and do not assume your code +will only ever be run with the default system python.