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 2026-12-03 13:59:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ansible-lint (Old) and /work/SRC/openSUSE:Factory/.ansible-lint.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ansible-lint" Thu Dec 3 13:59:07 2026 rev:89 rq:1402609 version:26.11.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ansible-lint/ansible-lint.changes 2026-11-08 19:23:24.360406095 +0100 +++ /work/SRC/openSUSE:Factory/.ansible-lint.new.1340718/ansible-lint.changes 2026-12-03 14:02:07.125464729 +0100 @@ -1,0 +2,6 @@ +Thu Nov 26 06:06:05 UTC 2026 - Johannes Kastl <[email protected]> + +- update to 26.11.1: + * fix: respect skip_list for yaml[comments] during --fix (#5177) + +------------------------------------------------------------------- Old: ---- ansible-lint-26.11.0.tar.gz New: ---- ansible-lint-26.11.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ansible-lint.spec ++++++ --- /var/tmp/diff_new_pack.TVaNiC/_old 2026-12-03 14:02:08.028502962 +0100 +++ /var/tmp/diff_new_pack.TVaNiC/_new 2026-12-03 14:02:08.029503005 +0100 @@ -56,7 +56,7 @@ %global lib_name ansiblelint Name: ansible-lint -Version: 26.11.0 +Version: 26.11.1 Release: 0%{?dist} Summary: Best practices checker for Ansible License: MIT ++++++ ansible-lint-26.11.0.tar.gz -> ansible-lint-26.11.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/.git_archival.txt new/ansible-lint-26.11.1/.git_archival.txt --- old/ansible-lint-26.11.0/.git_archival.txt 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/.git_archival.txt 2026-11-20 07:41:05.000000000 +0100 @@ -1,4 +1,4 @@ -node: b74fb6f73d234bf92672372cb1c10768e4018d16 -node-date: 2026-11-04T18:51:54+05:30 +node: b5609548ec49df35aabb89b6cb71de8f398cd195 +node-date: 2026-11-20T12:11:05+05:30 describe-name: v26 -ref-names: HEAD -> main, tag: v26.11.0, tag: v26 +ref-names: tag: v26.11.1, tag: v26 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/src/ansiblelint/__main__.py new/ansible-lint-26.11.1/src/ansiblelint/__main__.py --- old/ansible-lint-26.11.0/src/ansiblelint/__main__.py 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/src/ansiblelint/__main__.py 2026-11-20 07:41:05.000000000 +0100 @@ -553,6 +553,14 @@ raise SystemExit(exc) from exc +def _is_uv_tool_env(bin_path: str) -> bool: + """Return True when bin_path belongs to an environment made by uv tool.""" + # uv writes a receipt at the root of every environment it creates for a + # tool, wherever that environment lives: the default tools directory, + # UV_TOOL_DIR or an explicit --install-dir (how mise installs pypi tools). + return (Path(bin_path).parent / "uv-receipt.toml").is_file() + + def path_inject(own_location: str = "") -> None: """Add python interpreter path to top of PATH to fix outside venv calling.""" # This make it possible to call ansible-lint that was installed inside a @@ -601,20 +609,26 @@ inject_paths.append(py_path.as_posix()) # last option, if nothing else is found, just look next to ourselves... - if own_location: + # A uv tool launcher lives in UV_TOOL_BIN_DIR, outside the environment + # (on Windows it is a copy, not a symlink), so once the interpreter of a + # uv tool environment is injected the launcher directory adds nothing. + if own_location and not ( + py_path.as_posix() in inject_paths and _is_uv_tool_env(str(py_path)) + ): own_location = os.path.realpath(own_location) parent = Path(own_location).parent if ( (parent / "ansible").exists() and str(parent) not in paths and str(parent) not in resolved_paths + and str(parent) not in inject_paths ): inject_paths.append(str(parent)) if not os.environ.get("PYENV_VIRTUAL_ENV", None): if inject_paths and not any(( all("pipx" in p for p in inject_paths), - all("uv/tools" in p for p in inject_paths), + all(_is_uv_tool_env(p) for p in inject_paths), )): print( # ruff:ignore[print] f"WARNING: PATH altered to include {', '.join(inject_paths)} :: This is usually a sign of broken local setup, which can cause unexpected behaviors.", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/src/ansiblelint/rules/schema.md new/ansible-lint-26.11.1/src/ansiblelint/rules/schema.md --- old/ansible-lint-26.11.0/src/ansiblelint/rules/schema.md 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/src/ansiblelint/rules/schema.md 2026-11-20 07:41:05.000000000 +0100 @@ -58,19 +58,19 @@ ## schema[meta] -For `meta/main.yml` files, Ansible-lint requires a `galaxy_info.standalone` -property that clarifies if a role is an old standalone one or a new one, -collection based: +For `meta/main.yml` files, the `galaxy_info.standalone` property clarifies if a +role is an old standalone one or a new one, collection based: ```yaml galaxy_info: standalone: true # <-- this is a standalone role (not part of a collection) ``` -Ansible-lint requires the `standalone` key to avoid confusion and provide more -specific error messages. For example, the `meta` schema will require some -properties only for standalone roles or prevent the use of some properties that -are not supported by collections. +If `standalone` is omitted, the role is treated as a standalone role. Set it to +`false` for collection roles to avoid confusion and get more specific error +messages. For example, the `meta` schema will require some properties only for +standalone roles or prevent the use of some properties that are not supported +by collections. You cannot use an empty `meta/main.yml` file or use only comments in the `meta/main.yml` file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/src/ansiblelint/schemas/meta.json new/ansible-lint-26.11.1/src/ansiblelint/schemas/meta.json --- old/ansible-lint-26.11.0/src/ansiblelint/schemas/meta.json 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/src/ansiblelint/schemas/meta.json 2026-11-20 07:41:05.000000000 +0100 @@ -494,7 +494,8 @@ "standalone": { "const": false } - } + }, + "required": ["standalone"] }, "then": { "$comment": "Collection roles do not use most galaxy fields.", @@ -513,10 +514,6 @@ } } ], - "else": { - "$comment": "If standalone is false, then we have a collection role and only description is required", - "required": ["description"] - }, "properties": { "author": { "title": "Author", @@ -1579,10 +1576,10 @@ }, "$id": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/meta.json", "$schema": "http://json-schema.org/draft-07/schema", + "additionalProperties": false, "description": "https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_reuse_roles.html#using-role-dependencies", "examples": ["meta/main.yml"], "properties": { - "additionalProperties": false, "allow_duplicates": { "title": "Allow Duplicates", "type": "boolean" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/src/ansiblelint/yaml_utils.py new/ansible-lint-26.11.1/src/ansiblelint/yaml_utils.py --- old/ansible-lint-26.11.0/src/ansiblelint/yaml_utils.py 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/src/ansiblelint/yaml_utils.py 2026-11-20 07:41:05.000000000 +0100 @@ -756,7 +756,13 @@ # If our previous node was a sequence and we are still trying to indent, don't if self.indents.last_seq(): if self.event and getattr(self.event, "anchor", None): - self.indent = self.best_sequence_indent - self.sequence_dash_offset + # The anchor is already written, so self.column is not usable here. + # Nested sequences keep the indent that ruamel.yaml computed relative + # to the enclosing sequence. The root-level sequence cannot be + # detected through self.column anymore, so set its indent explicitly. + # len(self.indents) == 2 means a direct child of the document root. + if self._root_is_sequence and len(self.indents) == 2: + self.indent = self.best_sequence_indent - self.sequence_dash_offset else: self.indent = self.column + 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml new/ansible-lint-26.11.1/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml --- old/ansible-lint-26.11.0/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-26.11.1/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml 2026-11-20 07:41:05.000000000 +0100 @@ -0,0 +1,6 @@ +--- +# unknown top-level keys are not valid in role meta +galaxy_info: + standalone: false + description: foo +foo: bar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml.md new/ansible-lint-26.11.1/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml.md --- old/ansible-lint-26.11.0/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml.md 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-26.11.1/test/schemas/negative_test/roles/meta_unknown_key/meta/main.yml.md 2026-11-20 07:41:05.000000000 +0100 @@ -0,0 +1,35 @@ +# ajv errors + +```json +[ + { + "instancePath": "", + "keyword": "additionalProperties", + "message": "must NOT have additional properties", + "params": { + "additionalProperty": "foo" + }, + "schemaPath": "#/additionalProperties" + } +] +``` + +# check-jsonschema + +stdout: + +```json +{ + "status": "fail", + "successes": [], + "errors": [ + { + "filename": "negative_test/roles/meta_unknown_key/meta/main.yml", + "path": "$", + "message": "Additional properties are not allowed ('foo' was unexpected)", + "has_sub_errors": false + } + ], + "parse_errors": [] +} +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/test/schemas/test/roles/standalone-implicit/meta/main.yml new/ansible-lint-26.11.1/test/schemas/test/roles/standalone-implicit/meta/main.yml --- old/ansible-lint-26.11.0/test/schemas/test/roles/standalone-implicit/meta/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ansible-lint-26.11.1/test/schemas/test/roles/standalone-implicit/meta/main.yml 2026-11-20 07:41:05.000000000 +0100 @@ -0,0 +1,16 @@ +--- +# standalone is omitted, so it defaults to a standalone role and all galaxy fields are allowed +galaxy_info: + role_name: foo + namespace: bar + author: foo + description: foo + license: MIT + min_ansible_version: "2.9" + cloud_platforms: [] + galaxy_tags: [foo] + video_links: [] + platforms: + - name: Alpine + versions: + - all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/test/test_path_inject.py new/ansible-lint-26.11.1/test/test_path_inject.py --- old/ansible-lint-26.11.0/test/test_path_inject.py 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/test/test_path_inject.py 2026-11-20 07:41:05.000000000 +0100 @@ -1,4 +1,4 @@ -"""Tests for path_inject() handling of symlinked PATH entries.""" +"""Tests for path_inject() handling of PATH entries and tool environments.""" import os import sys @@ -55,3 +55,112 @@ assert "PATH altered to include" not in capsys.readouterr().err assert os.environ["PATH"].split(os.pathsep).count(str(real_bin)) == 0 + + [email protected](sys.platform == "win32", reason="symlinks") +def test_path_inject_own_location_not_duplicated( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """A venv bin that is both the interpreter and own location is added once.""" + real_bin, _ = _make_venv_with_symlink(tmp_path) + monkeypatch.setenv("PATH", "/usr/bin") + monkeypatch.delenv("PYENV_VIRTUAL_ENV", raising=False) + monkeypatch.setattr(sys, "executable", str(real_bin / "python")) + + path_inject(str(real_bin / "ansible-lint")) + + assert os.environ["PATH"].split(os.pathsep).count(str(real_bin)) == 1 + err = capsys.readouterr().err + assert f"PATH altered to include {real_bin} ::" in err + + [email protected](sys.platform == "win32", reason="symlinks") +def test_path_inject_own_location_only( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, +) -> None: + """The own location is added when the interpreter directory has no ansible.""" + real_bin, _ = _make_venv_with_symlink(tmp_path) + other_bin = tmp_path / "other" / "bin" + other_bin.mkdir(parents=True) + monkeypatch.setenv("PATH", "/usr/bin") + monkeypatch.delenv("PYENV_VIRTUAL_ENV", raising=False) + monkeypatch.setattr(sys, "executable", str(other_bin / "python")) + + path_inject(str(real_bin / "ansible-lint")) + + assert os.environ["PATH"].split(os.pathsep) == [str(real_bin), "/usr/bin"] + + +def _make_uv_tool_env(tmp_path: Path) -> Path: + """Lay out what uv tool install leaves behind, outside its default tools dir.""" + env = tmp_path / "installs" / "ansible-lint" + bin_dir = env / "bin" + bin_dir.mkdir(parents=True) + for name in ("python", "ansible"): + exe = bin_dir / name + exe.touch() + exe.chmod(0o755) + (env / "uv-receipt.toml").write_text( + '[tool]\nrequirements = [{ name = "ansible-lint" }]\n', + ) + return bin_dir + + +def test_path_inject_uv_tool_env_outside_tools_dir( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """A uv tool environment is recognized by its receipt, wherever it lives.""" + bin_dir = _make_uv_tool_env(tmp_path) + monkeypatch.setenv("PATH", "/usr/bin") + monkeypatch.delenv("PYENV_VIRTUAL_ENV", raising=False) + monkeypatch.setattr(sys, "executable", str(bin_dir / "python")) + + path_inject() + + assert "PATH altered to include" not in capsys.readouterr().err + assert os.environ["PATH"].split(os.pathsep)[0] == bin_dir.as_posix() + + +def test_path_inject_plain_venv_still_warns( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """Without the receipt, the same layout is a plain venv and still warns.""" + bin_dir = _make_uv_tool_env(tmp_path) + (bin_dir.parent / "uv-receipt.toml").unlink() + monkeypatch.setenv("PATH", "/usr/bin") + monkeypatch.delenv("PYENV_VIRTUAL_ENV", raising=False) + monkeypatch.setattr(sys, "executable", str(bin_dir / "python")) + + path_inject() + + assert "PATH altered to include" in capsys.readouterr().err + + +def test_path_inject_uv_tool_env_launcher_outside_env( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """A launcher copied to UV_TOOL_BIN_DIR must not be injected nor warn.""" + bin_dir = _make_uv_tool_env(tmp_path) + launcher_dir = tmp_path / "uv-bin" + launcher_dir.mkdir() + for name in ("ansible-lint", "ansible"): + exe = launcher_dir / name + exe.touch() + exe.chmod(0o755) + monkeypatch.setenv("PATH", "/usr/bin") + monkeypatch.delenv("PYENV_VIRTUAL_ENV", raising=False) + monkeypatch.setattr(sys, "executable", str(bin_dir / "python")) + + path_inject(str(launcher_dir / "ansible-lint")) + + assert "PATH altered to include" not in capsys.readouterr().err + assert os.environ["PATH"].split(os.pathsep) == [bin_dir.as_posix(), "/usr/bin"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-lint-26.11.0/test/test_yaml_utils.py new/ansible-lint-26.11.1/test/test_yaml_utils.py --- old/ansible-lint-26.11.0/test/test_yaml_utils.py 2026-11-04 14:21:54.000000000 +0100 +++ new/ansible-lint-26.11.1/test/test_yaml_utils.py 2026-11-20 07:41:05.000000000 +0100 @@ -1149,6 +1149,82 @@ assert " name: my_name" not in output_anchor [email protected]( + "yaml_text", + ( + pytest.param( + """--- +- &my_anchor + name: my_name +- <<: *my_anchor + name: other_name +""", + id="root-sequence", + ), + pytest.param( + """--- +- name: Play + tasks: + - &TASK + name: Record + ansible.builtin.debug: + msg: x + - *TASK +""", + id="sequence-in-mapping-in-root-sequence", + ), + pytest.param( + """--- +key: + - &anchor + x: 1 + y: 2 + - *anchor +""", + id="sequence-in-root-mapping", + ), + pytest.param( + """--- +key: + - &anchor + - 1 + - 2 + - *anchor +""", + id="anchored-sequence", + ), + pytest.param( + """--- +key: + - &anchor | + line1 + line2 + - *anchor +""", + id="anchored-block-scalar", + ), + pytest.param( + """--- +- name: Play + tasks: + - block: + - &TASK + name: Record + ansible.builtin.debug: + msg: x + - *TASK +""", + id="deeply-nested-sequence", + ), + ), +) +def test_formatted_yaml_anchor_in_nested_sequence_indentation(yaml_text: str) -> None: + """Verify that anchored mappings in nested sequences keep their indentation (#5254).""" + yaml = ansiblelint.yaml_utils.FormattedYAML() + + assert yaml.dumps(yaml.load(yaml_text)) == yaml_text + + def test_formatted_yaml_fix_comment_spaces_enabled() -> None: """Verify that comment spacing is fixed when fix_comment_spaces=True.""" yaml = ansiblelint.yaml_utils.FormattedYAML(fix_comment_spaces=True)
