Skip to content

Commit

Permalink
Fix for improper logging of ansible-basic.py invoked messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tanwigeetika1618 committed Oct 4, 2024
1 parent 3b5bee1 commit c900411
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansiblelint/rules/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ class ValidationPassedError(Exception):
class CustomAnsibleModule(basic.AnsibleModule): # type: ignore[misc]
"""Mock AnsibleModule class."""

def __init__(self, *args: str, **kwargs: str) -> None:
def __init__(self, *args: str, **kwargs: Any) -> None:
"""Initialize AnsibleModule mock."""
kwargs["no_log"] = True
super().__init__(*args, **kwargs)
raise ValidationPassedError

Expand Down
7 changes: 7 additions & 0 deletions src/ansiblelint/schemas/execution-environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@
"workdir": {
"description": "Default working directory, also often the homedir for ephemeral UIDs",
"type": ["string", "null"]
},
"tags": {
"description": "A list of names to assign to the resulting image if build process completes successfully",
"type": "array",
"items": {
"type": "string"
}
}
},
"type": "object"
Expand Down
5 changes: 5 additions & 0 deletions test/schemas/test/execution-environment-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ additional_build_steps:
append_base:
- RUN echo This is a post-install command!
- RUN ls -la /etc

options:
package_manager_path: /usr/bin/dnf
tags:
- automation-hub.my.company.com/ee-supported-rhel9_foo:latest

0 comments on commit c900411

Please sign in to comment.