Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ansible-lint for openSUSE:Factory checked in at 2024-06-24 20:52:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ansible-lint (Old) and /work/SRC/openSUSE:Factory/.ansible-lint.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ansible-lint" Mon Jun 24 20:52:10 2024 rev:48 rq:1182531 version:24.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ansible-lint/ansible-lint.changes 2024-06-05 17:43:08.387721536 +0200 +++ /work/SRC/openSUSE:Factory/.ansible-lint.new.18349/ansible-lint.changes 2024-06-24 20:52:57.315567567 +0200 @@ -1,0 +2,14 @@ +Fri Jun 21 19:03:45 UTC 2024 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- update to 24.6.1: + * Bugfixes + - Fix working directory when used as an github action (#4213) + @bkaraoren + - Fix relative imports in args rule (#4216) @corubba + - Fix cmd args with no-free-form transformer (#4215) @Qalthos + - Accept changlog.yml as a valid changelog (#4218) @cavcrosby + - Avoid using warn for command/shell actions (#4207) @ssbarnea + - Update Contributing docs and add tox as test + optional-dependency (#4209) @hdub-tech + +------------------------------------------------------------------- Old: ---- ansible-lint-24.6.0.tar.gz New: ---- ansible-lint-24.6.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ansible-lint.spec ++++++ --- /var/tmp/diff_new_pack.NKhJIM/_old 2024-06-24 20:52:57.747583358 +0200 +++ /var/tmp/diff_new_pack.NKhJIM/_new 2024-06-24 20:52:57.747583358 +0200 @@ -40,7 +40,7 @@ %global lib_name ansiblelint %{?python_enable_dependency_generator} Name: ansible-lint -Version: 24.6.0 +Version: 24.6.1 Release: 0%{?dist} Summary: Best practices checker for Ansible License: MIT ++++++ ansible-lint-24.6.0.tar.gz -> ansible-lint-24.6.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.config/constraints.txt new/ansible-lint-24.6.1/.config/constraints.txt --- old/ansible-lint-24.6.0/.config/constraints.txt 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.config/constraints.txt 2024-06-21 17:26:15.000000000 +0200 @@ -4,7 +4,7 @@ # # pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib --unsafe-package=wcmatch pyproject.toml # -ansible-compat==24.6.0 +ansible-compat==24.6.1 ansible-core==2.17.0 astroid==3.2.2 attrs==23.2.0 @@ -13,26 +13,29 @@ black==24.4.2 boolean-py==4.0 bracex==2.4 +cachetools==5.3.3 cairocffi==1.7.0 cairosvg==2.7.1 certifi==2024.6.2 cffi==1.16.0 +chardet==5.2.0 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 coverage==7.5.3 coverage-enable-subprocess==1.0 -cryptography==42.0.7 +cryptography==42.0.8 csscompressor==0.9.5 cssselect2==0.7.0 defusedxml==0.7.1 dill==0.3.8 +distlib==0.3.8 dnspython==2.6.1 exceptiongroup==1.2.1 execnet==2.1.1 -filelock==3.14.0 +filelock==3.15.1 ghp-import==2.1.0 -griffe==0.45.2 +griffe==0.45.3 htmlmin2==0.1.13 idna==3.7 importlib-metadata==7.1.0 @@ -46,7 +49,7 @@ license-expression==30.3.0 linkchecker==10.4.0 markdown==3.6 -markdown-exec==1.8.3 +markdown-exec==1.9.1 markdown-include==0.8.1 markdown-it-py==3.0.0 markupsafe==2.1.5 @@ -60,7 +63,7 @@ mkdocs-get-deps==0.2.0 mkdocs-htmlproofer-plugin==1.2.1 mkdocs-macros-plugin==1.0.5 -mkdocs-material==9.5.25 +mkdocs-material==9.5.26 mkdocs-material-extensions==1.3.1 mkdocs-minify-plugin==0.8.0 mkdocs-monorepo-plugin==1.1.0 @@ -69,20 +72,21 @@ mypy==1.10.0 mypy-extensions==1.0.0 netaddr==1.3.0 -packaging==24.0 +packaging==24.1 paginate==0.5.6 pathspec==0.12.1 pillow==10.3.0 pip==24.0 -pipdeptree==2.21.0 +pipdeptree==2.22.0 platformdirs==4.2.2 pluggy==1.5.0 psutil==5.9.8 pycparser==2.22 pygments==2.18.0 -pylint==3.2.2 +pylint==3.2.3 pymdown-extensions==10.8.1 -pytest==8.2.1 +pyproject-api==1.6.1 +pytest==8.2.2 pytest-mock==3.14.0 pytest-plus==0.7.0 pytest-xdist==3.6.1 @@ -104,14 +108,16 @@ tinycss2==1.3.0 tomli==2.0.1 tomlkit==0.12.5 -types-jsonschema==4.22.0.20240501 +tox==4.15.1 +types-jsonschema==4.22.0.20240610 types-pyyaml==6.0.12.20240311 -typing-extensions==4.12.1 +typing-extensions==4.12.2 urllib3==2.2.1 +virtualenv==20.26.2 watchdog==4.0.1 webencodings==0.5.1 yamllint==1.35.1 -zipp==3.19.1 +zipp==3.19.2 # The following packages are considered to be unsafe in a requirements file: # resolvelib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.config/dictionary.txt new/ansible-lint-24.6.1/.config/dictionary.txt --- old/ansible-lint-24.6.0/.config/dictionary.txt 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.config/dictionary.txt 2024-06-21 17:26:15.000000000 +0200 @@ -366,6 +366,7 @@ taskshandlers templatevars templating +testcollection testinfra testmon testns diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.config/requirements-lock.txt new/ansible-lint-24.6.1/.config/requirements-lock.txt --- old/ansible-lint-24.6.0/.config/requirements-lock.txt 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.config/requirements-lock.txt 2024-06-21 17:26:15.000000000 +0200 @@ -4,15 +4,15 @@ # # pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml # -ansible-compat==24.6.0 +ansible-compat==24.6.1 ansible-core==2.17.0 attrs==23.2.0 black==24.4.2 bracex==2.4 cffi==1.16.0 click==8.1.7 -cryptography==42.0.7 -filelock==3.14.0 +cryptography==42.0.8 +filelock==3.15.1 importlib-metadata==7.1.0 jinja2==3.1.4 jsonschema==4.22.0 @@ -21,7 +21,7 @@ markupsafe==2.1.5 mdurl==0.1.2 mypy-extensions==1.0.0 -packaging==24.0 +packaging==24.1 pathspec==0.12.1 platformdirs==4.2.2 pycparser==2.22 @@ -33,10 +33,10 @@ ruamel-yaml==0.18.6 subprocess-tee==0.4.1 tomli==2.0.1 -typing-extensions==4.12.1 +typing-extensions==4.12.2 wcmatch==8.5.2 ; python_version < "3.12" yamllint==1.35.1 -zipp==3.19.1 +zipp==3.19.2 # The following packages are considered to be unsafe in a requirements file: # resolvelib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.config/requirements-test.in new/ansible-lint-24.6.1/.config/requirements-test.in --- old/ansible-lint-24.6.0/.config/requirements-test.in 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.config/requirements-test.in 2024-06-21 17:26:15.000000000 +0200 @@ -13,5 +13,6 @@ pytest-xdist >= 2.1.0 ruamel.yaml>=0.17.31 ruamel-yaml-clib # needed for mypy +tox >= 4.0.0 types-jsonschema # IDE support types-pyyaml # IDE support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.git_archival.txt new/ansible-lint-24.6.1/.git_archival.txt --- old/ansible-lint-24.6.0/.git_archival.txt 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.git_archival.txt 2024-06-21 17:26:15.000000000 +0200 @@ -1,4 +1,4 @@ -node: 2d9f1ed1e6d08e1f6a18e50f789ab1580220c7db -node-date: 2024-06-04T17:17:44+01:00 +node: b4018c22f8fe8371bd6845d0cd62cebea54ce012 +node-date: 2024-06-21T16:26:15+01:00 describe-name: v24 -ref-names: HEAD -> main, tag: v24.6.0, tag: v24 +ref-names: HEAD -> main, tag: v24.6.1, tag: v24 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.github/workflows/tox.yml new/ansible-lint-24.6.1/.github/workflows/tox.yml --- old/ansible-lint-24.6.0/.github/workflows/tox.yml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.github/workflows/tox.yml 2024-06-21 17:26:15.000000000 +0200 @@ -39,7 +39,7 @@ schemas eco pre - py310-devel + py311-devel py310-lower py312-lower platforms: linux,macos @@ -72,7 +72,7 @@ env: # Number of expected test passes, safety measure for accidental skip of # tests. Update value if you add/remove tests. - PYTEST_REQPASS: 882 + PYTEST_REQPASS: 884 steps: - uses: actions/checkout@v4 with: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.gitignore new/ansible-lint-24.6.1/.gitignore --- old/ansible-lint-24.6.0/.gitignore 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.gitignore 2024-06-21 17:26:15.000000000 +0200 @@ -8,7 +8,6 @@ # Packages .Python -env/ build/ develop-eggs/ dist/ @@ -20,7 +19,6 @@ pip-wheel-metadata sdist/ var/ -venv/ *.egg-info/ .installed.cfg *.egg @@ -37,6 +35,12 @@ # pyenv .python-version +# Environments +.env +.venv +env/ +venv/ + # Coverage artifacts .coverage* coverage*.xml @@ -68,8 +72,10 @@ test/eco/CODENOTIFY.html test/eco test/schemas/node_modules +test/local-content .envrc -collections +# collections +# !/collections site _readthedocs *.tmp.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/.pre-commit-config.yaml new/ansible-lint-24.6.1/.pre-commit-config.yaml --- old/ansible-lint-24.6.0/.pre-commit-config.yaml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/.pre-commit-config.yaml 2024-06-21 17:26:15.000000000 +0200 @@ -173,6 +173,7 @@ - wcmatch exclude: > (?x)^( + collections/.*| test/local-content/.*| plugins/.* )$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/action.yml new/ansible-lint-24.6.1/action.yml --- old/ansible-lint-24.6.0/action.yml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/action.yml 2024-06-21 17:26:15.000000000 +0200 @@ -42,14 +42,14 @@ GH_ACTION_REF: ${{ github.action_ref || 'main' }} working-directory: ${{ steps.inputs.outputs.working_directory }} run: | - wget --output-document=${{ github.workspace}}/.git/ansible-lint-requirements.txt https://raw.githubusercontent.com/ansible/ansible-lint/$GH_ACTION_REF/.config/requirements-lock.txt + wget --output-document=${{ steps.inputs.outputs.working_directory }}/.git/ansible-lint-requirements.txt https://raw.githubusercontent.com/ansible/ansible-lint/$GH_ACTION_REF/.config/requirements-lock.txt - name: Set up Python if: inputs.setup_python == 'true' uses: actions/setup-python@v5 with: cache: pip - cache-dependency-path: ${{ github.workspace }}/.git/ansible-lint-requirements.txt + cache-dependency-path: ${{ steps.inputs.outputs.working_directory }}/.git/ansible-lint-requirements.txt python-version: "3.11" - name: Install ansible-lint diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/ansible.cfg new/ansible-lint-24.6.1/ansible.cfg --- old/ansible-lint-24.6.0/ansible.cfg 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/ansible.cfg 2024-06-21 17:26:15.000000000 +0200 @@ -1,2 +1,2 @@ [defaults] -collections_path = examples/playbooks/collections +collections_path = collections:examples/playbooks/collections diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/README.md new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/README.md --- old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/README.md 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,3 @@ +# Ansible Collection - local.testcollection + +Documentation for the collection. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/galaxy.yml new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/galaxy.yml --- old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/galaxy.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/galaxy.yml 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,7 @@ +--- +namespace: local +name: testcollection +version: 1.0.0 +readme: README.md +authors: + - your name <exam...@domain.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/module_utils/__init__.py new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/module_utils/__init__.py --- old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/module_utils/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/module_utils/__init__.py 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,4 @@ +"""module_utils package.""" + +# Some value that can be imported from a module +MY_STRING: str = "foo" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/modules/__init__.py new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/modules/__init__.py --- old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/modules/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/modules/__init__.py 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1 @@ +"""modules package.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py --- old/ansible-lint-24.6.0/collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,25 @@ +"""module_with_relative_import module.""" + +from ansible.module_utils.basic import AnsibleModule + +# pylint: disable=E0402 +from ..module_utils import MY_STRING # noqa: TID252 # type: ignore[import-untyped] + +DOCUMENTATION = r""" +options: + name: + required: True +""" + + +def main() -> AnsibleModule: + """The main function.""" + return AnsibleModule( + argument_spec={ + "name": {"required": True, "aliases": [MY_STRING]}, + }, + ) + + +if __name__ == "__main__": + main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/docs/contributing.md new/ansible-lint-24.6.1/docs/contributing.md --- old/ansible-lint-24.6.0/docs/contributing.md 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/docs/contributing.md 2024-06-21 17:26:15.000000000 +0200 @@ -8,8 +8,13 @@ ```shell-session $ git clone --recursive g...@github.com:your-name/ansible-lint $ cd ansible-lint +$ # Recommended: Initialize and activate a Python virtual environment +$ pip install --upgrade pip +$ pip install -e .[test] # Install testing dependencies +$ tox run -e lint,pkg,docs,py # Ensure subset of tox tests work in clean checkout $ git checkout -b your-branch-name # DO SOME CODING HERE +$ tox run -e lint,pkg,docs,py # Ensure subset of tox tests work with your changes $ git add your new files $ git commit -v $ git push origin your-branch-name @@ -31,8 +36,6 @@ Automated tests will be run against all PRs, to run checks locally before pushing commits, just use [tox](https://tox.wiki/en/latest/). -% DO-NOT-REMOVE-deps-snippet-PLACEHOLDER - ## Talk to us Use Github [discussions] forum or for a live chat experience try diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/docs/usage.md new/ansible-lint-24.6.1/docs/usage.md --- old/ansible-lint-24.6.0/docs/usage.md 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/docs/usage.md 2024-06-21 17:26:15.000000000 +0200 @@ -43,11 +43,11 @@ ## Gradual adoption For an easier gradual adoption, adopters should consider [ignore -file][ignoring-rules-for-entire-files] feature. This allows the -quick introduction of a linter pipeline for preventing the addition of new -violations, while known violations are ignored. Some people can work on -addressing these historical violations while others may continue to work on -other maintenance tasks. +file][ignoring-rules-for-entire-files] feature. This allows the quick +introduction of a linter pipeline for preventing the addition of new violations, +while known violations are ignored. Some people can work on addressing these +historical violations while others may continue to work on other maintenance +tasks. The deprecated `--progressive` mode was removed in v6.16.0 as it added code complexity and performance overhead. It also presented several corner cases @@ -222,18 +222,12 @@ The least preferred method of skipping rules is to skip all task-based rules for a task, which does not skip line-based rules. You can use the -`skip_ansible_lint` tag with all tasks or the `warn` parameter with the -_command_ or _shell_ modules, for example: +`skip_ansible_lint` tag with all tasks, for example: ```yaml - name: This would typically fire no-free-form command: warn=no chmod 644 X -- name: This would typically fire command-instead-of-module - command: git pull --rebase - args: - warn: false - - name: This would typically fire git-latest git: src=/path/to/git/repo dest=checkout tags: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/examples/playbooks/module_relative_import.yml new/ansible-lint-24.6.1/examples/playbooks/module_relative_import.yml --- old/ansible-lint-24.6.0/examples/playbooks/module_relative_import.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/examples/playbooks/module_relative_import.yml 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,6 @@ +--- +- name: Module relative import + hosts: localhost + tasks: + - name: Module with relative import + local.testcollection.module_with_relative_import: {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/examples/playbooks/skiptasks.yml new/ansible-lint-24.6.1/examples/playbooks/skiptasks.yml --- old/ansible-lint-24.6.0/examples/playbooks/skiptasks.yml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/examples/playbooks/skiptasks.yml 2024-06-21 17:26:15.000000000 +0200 @@ -37,20 +37,16 @@ - name: Test latest[git] (don't warn) ansible.builtin.command: git log - args: - warn: false changed_when: false - name: Test latest[hg] (don't warn) ansible.builtin.command: chmod 644 A args: - warn: false creates: B - name: Test latest[hg] (warn) ansible.builtin.command: chmod 644 A args: - warn: true creates: B - name: Test latest[git] (don't warn single line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/examples/playbooks/transform-no-free-form.transformed.yml new/ansible-lint-24.6.1/examples/playbooks/transform-no-free-form.transformed.yml --- old/ansible-lint-24.6.0/examples/playbooks/transform-no-free-form.transformed.yml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/examples/playbooks/transform-no-free-form.transformed.yml 2024-06-21 17:26:15.000000000 +0200 @@ -8,6 +8,12 @@ cmd: touch foo changed_when: false + - name: Create a placefolder file + ansible.builtin.command: # <-- command can also go first + chdir: /tmp + cmd: touch bar + changed_when: false + - name: Use raw to echo ansible.builtin.raw: echo foo # <-- don't use executable= args: @@ -17,3 +23,8 @@ - name: Example task with usage for '=' as module params ansible.builtin.debug: msg: "'Hello there world'" + changed_when: false + + - name: Task that has a non-debug string with spaces + ansible.builtin.set_fact: + foo: '"String with spaces"' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/examples/playbooks/transform-no-free-form.yml new/ansible-lint-24.6.1/examples/playbooks/transform-no-free-form.yml --- old/ansible-lint-24.6.0/examples/playbooks/transform-no-free-form.yml 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/examples/playbooks/transform-no-free-form.yml 2024-06-21 17:26:15.000000000 +0200 @@ -6,9 +6,17 @@ ansible.builtin.command: chdir=/tmp touch foo # <-- don't use shorthand changed_when: false + - name: Create a placefolder file + ansible.builtin.command: touch bar chdir=/tmp # <-- command can also go first + changed_when: false + - name: Use raw to echo ansible.builtin.raw: executable=/bin/bash echo foo # <-- don't use executable= changed_when: false - name: Example task with usage for '=' as module params ansible.builtin.debug: msg='Hello there world' + changed_when: false + + - name: Task that has a non-debug string with spaces + ansible.builtin.set_fact: foo="String with spaces" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/config.py new/ansible-lint-24.6.1/src/ansiblelint/config.py --- old/ansible-lint-24.6.0/src/ansiblelint/config.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/config.py 2024-06-21 17:26:15.000000000 +0200 @@ -68,7 +68,7 @@ {"requirements": "**/requirements.{yaml,yml}"}, # v2 and v1 {"playbook": "**/molecule/*/*.{yaml,yml}"}, # molecule playbooks {"yaml": "**/{.ansible-lint,.yamllint}"}, - {"changelog": "**/changelogs/changelog.yaml"}, + {"changelog": "**/changelogs/changelog.{yaml,yml}"}, {"yaml": "**/*.{yaml,yml}"}, {"yaml": "**/.*.{yaml,yml}"}, {"sanity-ignore-file": "**/tests/sanity/ignore-*.txt"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/args.py new/ansible-lint-24.6.1/src/ansiblelint/rules/args.py --- old/ansible-lint-24.6.0/src/ansiblelint/rules/args.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/args.py 2024-06-21 17:26:15.000000000 +0200 @@ -144,7 +144,7 @@ CustomAnsibleModule, ): spec = importlib.util.spec_from_file_location( - name=loaded_module.resolved_fqcn, + name=loaded_module.plugin_resolved_name, location=loaded_module.plugin_resolved_path, ) if not spec: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/command_instead_of_module.py new/ansible-lint-24.6.1/src/ansiblelint/rules/command_instead_of_module.py --- old/ansible-lint-24.6.0/src/ansiblelint/rules/command_instead_of_module.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/command_instead_of_module.py 2024-06-21 17:26:15.000000000 +0200 @@ -26,7 +26,7 @@ from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule -from ansiblelint.utils import convert_to_boolean, get_first_cmd_arg, get_second_cmd_arg +from ansiblelint.utils import get_first_cmd_arg, get_second_cmd_arg if TYPE_CHECKING: from ansiblelint.file_utils import Lintable @@ -106,9 +106,7 @@ ): return False - if executable in self._modules and convert_to_boolean( - task["action"].get("warn", True), - ): + if executable in self._modules: message = "{0} used in place of {1} module" return message.format(executable, self._modules[executable]) return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/galaxy.md new/ansible-lint-24.6.1/src/ansiblelint/rules/galaxy.md --- old/ansible-lint-24.6.0/src/ansiblelint/rules/galaxy.md 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/galaxy.md 2024-06-21 17:26:15.000000000 +0200 @@ -62,12 +62,14 @@ # Changelog Details -This rule expects a `CHANGELOG.md` or `.rst` file in the collection root or a -`changelogs/changelog.yaml` file. +This rule expects a `CHANGELOG.md`, `CHANGELOG.rst`, +`changelogs/changelog.yaml`, or `changelogs/changelog.yml` file in the +collection root. -If a `changelogs/changelog.yaml` file exists, the schema will be checked. +If a `changelogs/changelog.yaml` or `changelogs/changelog.yml` file exists, the +schema will be checked. -## Minimum required changelog.yaml file +## Minimum required changelog.yaml/changelog.yml file ```yaml # changelog.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/galaxy.py new/ansible-lint-24.6.1/src/ansiblelint/rules/galaxy.py --- old/ansible-lint-24.6.0/src/ansiblelint/rules/galaxy.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/galaxy.py 2024-06-21 17:26:15.000000000 +0200 @@ -58,6 +58,7 @@ changelog_found = 0 changelog_paths = [ base_path / "changelogs" / "changelog.yaml", + base_path / "changelogs" / "changelog.yml", base_path / "CHANGELOG.rst", base_path / "CHANGELOG.md", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/inline_env_var.py new/ansible-lint-24.6.1/src/ansiblelint/rules/inline_env_var.py --- old/ansible-lint-24.6.0/src/ansiblelint/rules/inline_env_var.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/inline_env_var.py 2024-06-21 17:26:15.000000000 +0200 @@ -49,7 +49,6 @@ "executable", "removes", "stdin", - "warn", "stdin_add_newline", "strip_empty_ends", "cmd", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/rules/no_free_form.py new/ansible-lint-24.6.1/src/ansiblelint/rules/no_free_form.py --- old/ansible-lint-24.6.0/src/ansiblelint/rules/no_free_form.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/rules/no_free_form.py 2024-06-21 17:26:15.000000000 +0200 @@ -80,7 +80,7 @@ "win_command", "win_shell", ): - if self.cmd_shell_re.match(action_value): + if self.cmd_shell_re.search(action_value): fail = True else: fail = True @@ -107,14 +107,36 @@ val: str, filter_key: str, filter_dict: dict[str, Any], - ) -> bool: - """Return True if module option is not present in the string.""" + ) -> str: + """Pull out key=value pairs from a string and set them in filter_dict. + + Returns unmatched strings. + """ if filter_key not in val: - return True + return val + + extra = "" + [k, v] = val.split(filter_key, 1) + if " " in k: + extra, k = k.rsplit(" ", 1) + + if v[0] in "\"'": + # Keep quoted strings together + quote = v[0] + _, v, remainder = v.split(quote, 2) + v = f"{quote}{v}{quote}" + else: + try: + v, remainder = v.split(" ", 1) + except ValueError: + remainder = "" - [k, v] = val.split(filter_key) filter_dict[k] = v - return False + + extra = " ".join( + (extra, filter_values(remainder, filter_key, filter_dict)), + ) + return extra.strip() if match.tag == "no-free-form": module_opts: dict[str, Any] = {} @@ -122,18 +144,9 @@ k, v = task.popitem(False) # identify module as key and process its value if len(k.split(".")) == 3 and isinstance(v, str): - # if it is a message - if "msg" in v: - filter_values(v, "=", module_opts) - else: - # Filter the module options and command - module_opts["cmd"] = " ".join( - [ - item - for item in v.split(" ") - if filter_values(item, "=", module_opts) - ], - ) + cmd = filter_values(v, "=", module_opts) + if cmd: + module_opts["cmd"] = cmd sorted_module_opts = {} for key in sorted( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/schemas/__store__.json new/ansible-lint-24.6.1/src/ansiblelint/schemas/__store__.json --- old/ansible-lint-24.6.0/src/ansiblelint/schemas/__store__.json 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/schemas/__store__.json 2024-06-21 17:26:15.000000000 +0200 @@ -1,6 +1,6 @@ { "ansible-lint-config": { - "etag": "616457d973f4b221d85910086ce1fab520d8a363b1e1e62a62e4d8b57a824976", + "etag": "a0bb8004fad70bab34fad94a45b2698125127142ec6b2c8900976aa2bd96a86c", "url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json" }, "ansible-navigator-config": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/src/ansiblelint/yaml_utils.py new/ansible-lint-24.6.1/src/ansiblelint/yaml_utils.py --- old/ansible-lint-24.6.0/src/ansiblelint/yaml_utils.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/src/ansiblelint/yaml_utils.py 2024-06-21 17:26:15.000000000 +0200 @@ -644,7 +644,7 @@ ): # We have an as-yet unquoted token that starts with "0" (but is not itself the digit 0). # It could be: - # - hexadecimal like "0xF1" or ; comes tagged as int. Should continue unquoted to continue as an int. + # - hexadecimal like "0xF1"; comes tagged as int. Should continue unquoted to continue as an int. # - octal like "0666" or "0o755"; comes tagged as str. **Should** be quoted to be cross-YAML compatible. # - string like "0.0.0.0" and "00-header". Should not be quoted, unless it has a quote in it. if ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/test/rules/test_args.py new/ansible-lint-24.6.1/test/rules/test_args.py --- old/ansible-lint-24.6.0/test/rules/test_args.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-24.6.1/test/rules/test_args.py 2024-06-21 17:26:15.000000000 +0200 @@ -0,0 +1,19 @@ +"""Tests for args rule.""" + +from ansiblelint.file_utils import Lintable +from ansiblelint.rules import RulesCollection +from ansiblelint.runner import Runner + + +def test_args_module_relative_import(default_rules_collection: RulesCollection) -> None: + """Validate args check of a module with a relative import.""" + lintable = Lintable( + "examples/playbooks/module_relative_import.yml", + kind="playbook", + ) + result = Runner(lintable, rules=default_rules_collection).run() + assert len(result) == 1, result + assert result[0].lineno == 5 + assert result[0].filename == "examples/playbooks/module_relative_import.yml" + assert result[0].tag == "args[module]" + assert result[0].message == "missing required arguments: name" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/test/rules/test_inline_env_var.py new/ansible-lint-24.6.1/test/rules/test_inline_env_var.py --- old/ansible-lint-24.6.0/test/rules/test_inline_env_var.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/test/rules/test_inline_env_var.py 2024-06-21 17:26:15.000000000 +0200 @@ -14,7 +14,7 @@ HELLO: hello - name: Use some key-value pairs - command: chdir=/tmp creates=/tmp/bobbins warn=no touch bobbins + command: chdir=/tmp creates=/tmp/bobbins touch bobbins - name: Commands can have flags command: abc --xyz=def blah @@ -69,7 +69,7 @@ command: HELLO=hello echo $HELLO - name: Typo some stuff - command: crates=/tmp/blah warn=no touch /tmp/blah + command: crates=/tmp/blah touch /tmp/blah """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/test/schemas/package-lock.json new/ansible-lint-24.6.1/test/schemas/package-lock.json --- old/ansible-lint-24.6.0/test/schemas/package-lock.json 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/test/schemas/package-lock.json 2024-06-21 17:26:15.000000000 +0200 @@ -253,12 +253,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -482,9 +482,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -1456,12 +1456,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -1622,9 +1622,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/test/test_file_utils.py new/ansible-lint-24.6.1/test/test_file_utils.py --- old/ansible-lint-24.6.0/test/test_file_utils.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/test/test_file_utils.py 2024-06-21 17:26:15.000000000 +0200 @@ -264,6 +264,7 @@ "plugin", id="44", ), + pytest.param("examples/meta/changelogs/changelog.yml", "changelog", id="45"), ), ) def test_kinds(path: str, kind: FileType) -> None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/test/test_transformer.py new/ansible-lint-24.6.1/test/test_transformer.py --- old/ansible-lint-24.6.0/test/test_transformer.py 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/test/test_transformer.py 2024-06-21 17:26:15.000000000 +0200 @@ -143,7 +143,7 @@ ), pytest.param( "examples/playbooks/transform-no-free-form.yml", - 3, + 5, True, True, id="no_free_form_transform", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/tools/test-hook.sh new/ansible-lint-24.6.1/tools/test-hook.sh --- old/ansible-lint-24.6.0/tools/test-hook.sh 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/tools/test-hook.sh 2024-06-21 17:26:15.000000000 +0200 @@ -12,7 +12,7 @@ rm -rf .tox/x mkdir -p .tox/x cd .tox/x -git init +git init --initial-branch=main # we add a file to the repo to avoid error due to no file to to lint touch foo.yml git add foo.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-24.6.0/tox.ini new/ansible-lint-24.6.1/tox.ini --- old/ansible-lint-24.6.0/tox.ini 2024-06-04 18:17:44.000000000 +0200 +++ new/ansible-lint-24.6.1/tox.ini 2024-06-21 17:26:15.000000000 +0200 @@ -20,9 +20,9 @@ [testenv] description = - Run the tests under {basepython} and - devel: ansible devel branch - pre: Enables --pre when installing dependencies, testing prereleases + Run the tests under {basepython} + devel: and ansible devel branch + pre: and enable --pre when installing dependencies, testing prereleases deps = devel: ansible-core @ git+https://github.com/ansible/ansible.git # GPLv3+ devel: ansible-compat @ git+https://github.com/ansible/ansible-compat.git # GPLv3+ @@ -172,7 +172,7 @@ deps = check-jsonschema>=0.26.3 setenv = - # without his upgrade would likely not do anything + # without this upgrade would likely not do anything PIP_CONSTRAINT = /dev/null skip_install = true changedir = test/schemas