ansible-lint icon indicating copy to clipboard operation
ansible-lint copied to clipboard

ansible-lint does not obey --offline option

Open alice-rc opened this issue 1 year ago • 0 comments

Summary

Even when using the --offline option ansible-lint is still prompting for the collection credentials

Issue Type
  • Bug Report
Ansible and Ansible Lint details
$ ansible --version
ansible [core 2.13.3]
  config file = <REDACTED>/ansible.cfg
  configured module search path = ['<REDACTED>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = <REDACTED>/lib64/python3.9/site-packages/ansible
  ansible collection location = <REDACTED>/.ansible/collections:/usr/share/ansible/collections
  executable location = <REDACTED>/bin/ansible
  python version = 3.9.7 (default, Apr 11 2022, 06:30:15) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10.0.1)]
  jinja version = 3.1.2
  libyaml = True

$ ansible-lint --version
ansible-lint 6.5.2 using ansible 2.13.3

  • ansible installation method: pip
  • ansible-lint installation method: pip
OS / ENVIRONMENT
STEPS TO REPRODUCE
$ ansible-lint --offline
Username for 'https://<REDACTED>:
Password for 'https://<REDACTED>':
WARNING  Retrying execution failure 1 of: ansible-galaxy collection install -vr collections/requirements.yml -p <REDACTED>/.cache/ansible-compat/7f4435/collections
ERROR    Using <REDACTED>/ansible.cfg as config file
Starting galaxy collection install process
Process install dependency map

Got 1 exit code while running: ansible-galaxy collection install -vr collections/requirements.yml -p <REDACTED>/.cache/ansible-compat/7f4435/collections

Desired Behavior

--offline should do what it says => Disable installation of requirements.yml

Actual Behavior

--offline still tries to install collections/requirements.yml

alice-rc avatar Sep 09 '22 19:09 alice-rc