Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-lint: Fixing broken tests #769

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

djgalloway
Copy link
Contributor

Before:

2025-02-24T20:32:22.8480111Z WARNING: PATH altered to include /usr/bin
2025-02-24T20:32:22.9998767Z Unable to find a working copy of ansible executable. CompletedProcess(args=['ansible', '--version'], returncode=1, stdout='', stderr='Traceback (most recent call last):\n  File "/home/runner/.local/bin/ansible", line 62, in <module>\n    import ansible.constants as C\n  File "/home/runner/.local/lib/python3.12/site-packages/ansible/constants.py", line 15, in <module>\n    from ansible.config.manager import ConfigManager, ensure_type, get_ini_config_value\n  File "/home/runner/.local/lib/python3.12/site-packages/ansible/config/manager.py", line 29, in <module>\n    from ansible.module_utils.six.moves import configparser\nModuleNotFoundError: No module named \'ansible.module_utils.six.moves\'\n')
2025-02-24T20:32:23.0288372Z ##[error]Process completed with exit code 4.

Fixes:

  • Specify vault password file as /dev/null. Avoids modifying ansible.cfg
  • --break-system-packages because these are ephemeral containers we don't care about
  • Remove PATH since we're installing ansible globally via pip

falcocer-ibm
falcocer-ibm previously approved these changes Feb 25, 2025
Before:
```
2025-02-24T20:32:22.8480111Z WARNING: PATH altered to include /usr/bin
2025-02-24T20:32:22.9998767Z Unable to find a working copy of ansible executable. CompletedProcess(args=['ansible', '--version'], returncode=1, stdout='', stderr='Traceback (most recent call last):\n  File "/home/runner/.local/bin/ansible", line 62, in <module>\n    import ansible.constants as C\n  File "/home/runner/.local/lib/python3.12/site-packages/ansible/constants.py", line 15, in <module>\n    from ansible.config.manager import ConfigManager, ensure_type, get_ini_config_value\n  File "/home/runner/.local/lib/python3.12/site-packages/ansible/config/manager.py", line 29, in <module>\n    from ansible.module_utils.six.moves import configparser\nModuleNotFoundError: No module named \'ansible.module_utils.six.moves\'\n')
2025-02-24T20:32:23.0288372Z ##[error]Process completed with exit code 4.
```

Fixes:
  - Specify vault password file as /dev/null. Avoids modifying ansible.cfg
  - --break-system-packages because these are ephemeral containers we don't care about
  - Remove PATH since we're installing ansible globally via pip

Signed-off-by: David Galloway <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants