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 fails when using custom ee #1665

Open
Andyjb8 opened this issue Nov 19, 2024 · 2 comments
Open

ansible-lint fails when using custom ee #1665

Andyjb8 opened this issue Nov 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Andyjb8
Copy link

Andyjb8 commented Nov 19, 2024

Summary

I get the following error in VS Code when ansible-lint runs in VS Code with my custom EE.

Command failed: podman run --rm --workdir /home/user -v /home/user:/home/user -v /home/user/automation/playbooks/test/shared_tasks:/home/user/automation/playbooks/test/shared_tasks -e ANSIBLE_FORCE_COLOR=0 --group-add=root --ipc=host --quiet --name als_c17e252b-068d-4e35-a9be-cd52e411c96e al-svr-hub-01.automation.lab/netops_ee ansible-lint  --offline --nocolor -f codeclimate "/home/user/automation/playbooks/test/shared_tasks/provision_junos_snmpv3.yml"
Failed to determine a valid project_dir: .

I do not get the error when I configure the ansible extension in VS code use the ansible-automation-platform-24/ee-minimal-rhel9 EE, but when I use that EE it doesn't have my custom set of collections in order to provide collection validations.

Ansible-lint is included in my EE, I do get this message when I manually test ansible-lint in my EE.

podman run -it al-svr-hub-01.automation.lab/netops_ee /bin/bash
bash-5.1$ ansible-lint

Passed with production profile: 0 failure(s), 0 warning(s) on 0 files.
A new release of ansible-lint is available: 6.14.3 → 24.10.0

Extension version

v24.10.0

VS Code version

1.95.3

Ansible Version

bash-5.1$ ansible --version
ansible [core 2.15.12]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.18 (main, May 16 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

OS / Environment

cat /etc/redhat-release
Red Hat Enterprise Linux release 9.5 (Plow)

Relevant log output

No response

@alisonlhart
Copy link
Contributor

@Andyjb8 Can you post your EE files here - the execution-environment.yml and any requirements/bindep files used?

@alisonlhart alisonlhart removed the new label Nov 20, 2024
@Andyjb8
Copy link
Author

Andyjb8 commented Nov 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants