Bug 2218776 - ansible-lint ends in ERROR No module named 'ansible' [NEEDINFO]
Summary: ansible-lint ends in ERROR No module named 'ansible'
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.13.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 6.14.0
Assignee: Odilon Sousa
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-30 06:39 UTC by Stefan Nemeth
Modified: 2023-08-17 09:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:
ehelms: needinfo? (snemeth)
rlavi: needinfo? (mdolezel)
rlavi: needinfo? (ehelms)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-18753 0 None None None 2023-07-03 12:25:19 UTC

Description Stefan Nemeth 2023-06-30 06:39:19 UTC
Description of problem

# ansible-lint ends in  
ERROR    No module named 'ansible'
FATAL: ansible-lint requires a version of Ansible package >= 2.9, but none was found. Please install a compatible version using the same python interpreter. See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip

I am not sure that installing anything with pip on satellite6 is a good idea

Version-Release number of selected component (if applicable):

Satellite 6.13.1
rhel 8.8

How reproducible:

100%

Steps to Reproduce:
1.run ansible-lint satellite6 6.13.1/rhel8
2.
3.

Actual results:

[root@snemeth-satellite6 ~]# ansible-lint 
ERROR    No module named 'ansible'
FATAL: ansible-lint requires a version of Ansible package >= 2.9, but none was found. Please install a compatible version using the same python interpreter. See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip



Expected results:
ansible-lint works and runs

Additional info:

installed packages

[root@snemeth-satellite6 ~]# dnf list installed | grep ansible
ansible-collection-redhat-satellite.noarch            3.9.0-2.el8sat                                              @satellite-6.13-for-rhel-8-x86_64-rpms            
ansible-collection-redhat-satellite_operations.noarch 1.3.0-2.el8sat                                              @satellite-6.13-for-rhel-8-x86_64-rpms            
ansible-core.x86_64                                   2.14.2-4.el8_8                                              @rhel-8-for-x86_64-appstream-rpms                 
ansible-lint.noarch                                   5.0.8-4.el8pc                                               @satellite-6.12-for-rhel-8-x86_64-rpms            
ansible-runner.noarch                                 2.2.1-3.el8sat                                              @satellite-6.12-for-rhel-8-x86_64-rpms            
ansible-test.x86_64                                   2.14.2-4.el8_8                                              @rhel-8-for-x86_64-appstream-rpms                 
ansiblerole-foreman_scap_client.noarch                0.2.0-2.el8sat                                              @satellite-6.12-for-rhel-8-x86_64-rpms            
ansiblerole-insights-client.noarch                    1.7.1-2.el8sat                                              @satellite-6.12-for-rhel-8-x86_64-rpms            
python39-ansible-builder.noarch                       1.0.1-4.el8pc                                               @satellite-6.12-for-rhel-8-x86_64-rpms            
python39-ansible-runner.noarch                        2.2.1-3.el8sat                                              @satellite-6.12-for-rhel-8-x86_64-rpms            
python39-pulp-ansible.noarch                          1:0.15.0-1.el8pc                                            @satellite-6.13-for-rhel-8-x86_64-rpms            
rubygem-foreman_ansible.noarch                        10.4.0-1.el8sat                                             @satellite-6.13-for-rhel-8-x86_64-rpms            
rubygem-hammer_cli_foreman_ansible.noarch             0.4.0-2.el8sat                                              @satellite-6.13-for-rhel-8-x86_64-rpms            
rubygem-pulp_ansible_client.noarch                    0.15.0-1.el8sat                                             @satellite-6.13-for-rhel-8-x86_64-rpms            
rubygem-smart_proxy_ansible.noarch                    3.5.4-1.el8sat                                              @satellite-6.12-for-rhel-8-x86_64-rpms

Comment 6 Eric Helms 2023-07-06 20:02:20 UTC
The ansible-lint that is shipped in Satellite is there as a requirement of the Ansible content type in Pulp and is not intended to be used directly.

Can you describe your use case for wanting to use ansible-lint on the Satellite?


Note You need to log in before you can comment on or make changes to this bug.