From f782d6bcc35c325867010e020503b639db76710e Mon Sep 17 00:00:00 2001 From: federico jaureguialzo Date: Fri, 10 Nov 2023 22:40:45 +0100 Subject: [PATCH 1/3] Fix supported version --- meta/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/runtime.yml b/meta/runtime.yml index edf4ad77..884c3d86 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,2 +1,2 @@ --- -requires_ansible: ">=2.12.2" +requires_ansible: ">=2.13.2" From 7b340870b5331f5b1f9e5eb04487cd9647ed0987 Mon Sep 17 00:00:00 2001 From: federico jaureguialzo Date: Sat, 11 Nov 2023 13:20:37 +0100 Subject: [PATCH 2/3] Update ansible-lint (6.18.0 -> 6.22.0) --- poetry.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- tasks.py | 3 ++- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/poetry.lock b/poetry.lock index e93c8dda..775db7a3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. [[package]] name = "ansible" @@ -16,13 +16,13 @@ ansible-core = ">=2.15.1,<2.16.0" [[package]] name = "ansible-compat" -version = "4.1.8" +version = "4.1.10" description = "Ansible compatibility goodies" optional = false python-versions = ">=3.9" files = [ - {file = "ansible-compat-4.1.8.tar.gz", hash = "sha256:f58135f5d123e08fdb7e11849b82945e1900f8c899ba0859d4b41b25c76ca955"}, - {file = "ansible_compat-4.1.8-py3-none-any.whl", hash = "sha256:7560e511a660e286c4e8777d82e25990526e45601c37b872c1b64a62126239a5"}, + {file = "ansible-compat-4.1.10.tar.gz", hash = "sha256:2be8c7b510d2e15eed1e9ef443209d67d9aec8f427026b88936d4535ff59863d"}, + {file = "ansible_compat-4.1.10-py3-none-any.whl", hash = "sha256:f09c3137c9f5f65d38caed44f1a1565c0e7170df720d461e76839beda6018edb"}, ] [package.dependencies] @@ -56,17 +56,17 @@ resolvelib = ">=0.5.3,<1.1.0" [[package]] name = "ansible-lint" -version = "6.18.0" +version = "6.22.0" description = "Checks playbooks for practices and behavior that could potentially be improved" optional = false python-versions = ">=3.9" files = [ - {file = "ansible-lint-6.18.0.tar.gz", hash = "sha256:54744ee7f8fd0ec38051f0b6df2153523939a391ee4bb48f0885b5fcdd82f9b9"}, - {file = "ansible_lint-6.18.0-py3-none-any.whl", hash = "sha256:2c5dc2553604503cf46af91226f92394849833bf20bd4d3a170866e1c3a02779"}, + {file = "ansible-lint-6.22.0.tar.gz", hash = "sha256:0d17dd4a58c3c825b7729c1067f151787529a5b183713c9e4d13a62f9d1ad26a"}, + {file = "ansible_lint-6.22.0-py3-none-any.whl", hash = "sha256:06f2850a0bed30ca90a802bb5c82717c7d8cd0492addfdb319e5cefc3db9e500"}, ] [package.dependencies] -ansible-compat = ">=4.0.5" +ansible-compat = ">=4.1.10" ansible-core = ">=2.12.0" black = ">=22.8.0" filelock = ">=3.3.0" @@ -76,15 +76,15 @@ pathspec = ">=0.10.3" pyyaml = ">=5.4.1" requests = ">=2.31.0" rich = ">=12.0.0" -"ruamel.yaml" = ">=0.17.0,<0.17.29 || >0.17.29,<0.17.30 || >0.17.30,<0.18" +"ruamel.yaml" = ">=0.18.5" subprocess-tee = ">=0.4.1" wcmatch = ">=8.1.2" yamllint = ">=1.30.0" [package.extras] -docs = ["mkdocs-ansible[lock] (>=0.1.6)", "pipdeptree (>=2.7.1)"] -lock = ["ansible-compat (==4.1.7)", "ansible-core (==2.15.3)", "attrs (==23.1.0)", "black (==23.7.0)", "bracex (==2.3.post1)", "certifi (==2023.7.22)", "cffi (==1.15.1)", "charset-normalizer (==3.2.0)", "click (==8.1.7)", "cryptography (==41.0.3)", "filelock (==3.12.2)", "idna (==3.4)", "importlib-resources (==5.0.7)", "jinja2 (==3.1.2)", "jsonschema (==4.19.0)", "jsonschema-specifications (==2023.7.1)", "markdown-it-py (==3.0.0)", "markupsafe (==2.1.3)", "mdurl (==0.1.2)", "mypy-extensions (==1.0.0)", "packaging (==23.1)", "pathspec (==0.11.2)", "platformdirs (==3.10.0)", "pycparser (==2.21)", "pygments (==2.16.1)", "pyyaml (==6.0.1)", "referencing (==0.30.2)", "requests (==2.31.0)", "rich (==13.5.2)", "rpds-py (==0.9.2)", "ruamel-yaml (==0.17.32)", "subprocess-tee (==0.4.1)", "tomli (==2.0.1)", "typing-extensions (==4.7.1)", "urllib3 (==2.0.4)", "wcmatch (==8.4.1)", "yamllint (==1.32.0)"] -test = ["black", "coverage-enable-subprocess", "coverage[toml] (>=6.4.4)", "jmespath", "mypy", "netaddr", "psutil", "pylint", "pytest (>=7.2.2)", "pytest-mock", "pytest-plus (>=0.2)", "pytest-xdist (>=2.1.0)", "ruamel-yaml-clib", "ruamel.yaml (>=0.17.31,<0.18)", "spdx-tools (>=0.7.1,<0.8.0)", "types-jsonschema", "types-pyyaml"] +docs = ["mkdocs-ansible[lock] (>=0.2.0)", "pipdeptree (>=2.7.1)"] +lock = ["ansible-compat (==4.1.10)", "ansible-core (==2.15.5)", "attrs (==23.1.0)", "black (==23.10.1)", "bracex (==2.4)", "certifi (==2023.7.22)", "cffi (==1.16.0)", "charset-normalizer (==3.3.2)", "click (==8.1.7)", "cryptography (==41.0.5)", "filelock (==3.13.1)", "idna (==3.4)", "importlib-resources (==5.0.7)", "jinja2 (==3.1.2)", "jsonschema (==4.19.2)", "jsonschema-specifications (==2023.7.1)", "markdown-it-py (==3.0.0)", "markupsafe (==2.1.3)", "mdurl (==0.1.2)", "mypy-extensions (==1.0.0)", "packaging (==23.2)", "pathspec (==0.11.2)", "platformdirs (==3.11.0)", "pycparser (==2.21)", "pygments (==2.16.1)", "pyyaml (==6.0.1)", "referencing (==0.30.2)", "requests (==2.31.0)", "rich (==13.6.0)", "rpds-py (==0.10.6)", "ruamel-yaml (==0.18.5)", "subprocess-tee (==0.4.1)", "tomli (==2.0.1)", "typing-extensions (==4.8.0)", "urllib3 (==2.0.7)", "wcmatch (==8.5)", "yamllint (==1.32.0)"] +test = ["black", "coverage-enable-subprocess", "coverage[toml] (>=6.4.4)", "jmespath", "license-expression (>=30.1.1)", "mypy", "netaddr", "psutil", "pylint", "pytest (>=7.2.2)", "pytest-mock", "pytest-plus (>=0.6)", "pytest-xdist (>=2.1.0)", "ruamel-yaml-clib", "ruamel.yaml (>=0.17.31)", "types-jsonschema", "types-pyyaml"] [[package]] name = "arrow" @@ -1585,20 +1585,20 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruamel-yaml" -version = "0.17.21" +version = "0.18.5" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" optional = false -python-versions = ">=3" +python-versions = ">=3.7" files = [ - {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, - {file = "ruamel.yaml-0.17.21.tar.gz", hash = "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af"}, + {file = "ruamel.yaml-0.18.5-py3-none-any.whl", hash = "sha256:a013ac02f99a69cdd6277d9664689eb1acba07069f912823177c5eced21a6ada"}, + {file = "ruamel.yaml-0.18.5.tar.gz", hash = "sha256:61917e3a35a569c1133a8f772e1226961bf5a1198bea7e23f06a0841dea1ab0e"}, ] [package.dependencies] -"ruamel.yaml.clib" = {version = ">=0.2.6", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.11\""} +"ruamel.yaml.clib" = {version = ">=0.2.7", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.13\""} [package.extras] -docs = ["ryd"] +docs = ["mercurial (>5.7)", "ryd"] jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] [[package]] @@ -1907,4 +1907,4 @@ dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"] [metadata] lock-version = "2.0" python-versions = "<3.11,>=3.10" -content-hash = "f1096e901ae4f25b89e867e9e0710e394d940a0cb536009f8a4bfdc4a0d7f587" +content-hash = "61f7dd986dd177b100a1c4f0b7b24d96840a71503808350970f54707b5dd71e6" diff --git a/pyproject.toml b/pyproject.toml index 25c9b487..790430b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ safety = "^2.4.0b1" mypy = "^1.7" bump2version = "^1.0.1" yamllint = "^1.33.0" -ansible-lint = {version = "^6.18.0", markers = "platform_system != 'Windows'"} +ansible-lint = {version = "^6.22.0", markers = "platform_system != 'Windows'"} molecule = "^5.1.0" molecule-plugins = {extras = ["docker"], version = "^23.5.0"} diff --git a/tasks.py b/tasks.py index d8cc6ba9..403993fa 100644 --- a/tasks.py +++ b/tasks.py @@ -19,7 +19,8 @@ MOLECULE_DIR = ROOT_DIR / "molecule" ROLES_DIR = ROOT_DIR / "roles" PLAYBOOKS_DIR = ROOT_DIR / "playbooks" -ANSIBLE_TARGETS = [MOLECULE_DIR, PLAYBOOKS_DIR] +META_DIR = ROOT_DIR / "meta" +ANSIBLE_TARGETS = [MOLECULE_DIR, PLAYBOOKS_DIR, META_DIR] ANSIBLE_TARGETS_STR = " ".join([str(t) for t in ANSIBLE_TARGETS]) SAFETY_IGNORE = [42923, 54229, 54230] From e93449bddc9343edac5993b9196219053e076b76 Mon Sep 17 00:00:00 2001 From: federico jaureguialzo Date: Sat, 11 Nov 2023 13:21:24 +0100 Subject: [PATCH 3/3] Fix missing docs --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a0c548fd..5ac642c8 100644 --- a/README.md +++ b/README.md @@ -186,11 +186,18 @@ To display available tasks run: Available tasks: ansible-lint Run ansible linter. + clean Run all clean sub-tasks. + clean-python Clean up python file artifacts. + flake8 Run flake8. + format Format code. galaxy-install Install ansible-galaxy requirements. hooks Run pre-commit hooks. install-hooks Install pre-commit hooks. lint Run all linting. - playbook Runs Ansible playbooks, executing the defined tasks on the targeted hosts. + mypy Run mypy. + playbook Run Ansible playbooks, executing the defined tasks on the targeted hosts. + safety Run safety. + tests Run ansible molecule test. version Bump version. yamllint Run yamllint, a linter for YAML files. ```