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 does not obey --offline option #2402

Closed
alice-rc opened this issue Sep 9, 2022 · 1 comment · Fixed by #2643
Closed

ansible-lint does not obey --offline option #2402

alice-rc opened this issue Sep 9, 2022 · 1 comment · Fixed by #2643
Assignees
Labels
Milestone

Comments

@alice-rc
Copy link

alice-rc commented Sep 9, 2022

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 alice-rc added bug new Triage required labels Sep 9, 2022
@ssbarnea ssbarnea added this to the 6.8.0 milestone Oct 1, 2022
@ssbarnea
Copy link
Member

ssbarnea commented Oct 1, 2022

I can fix this by adding the newly added --offline argument to galaxy collection install when ansible is 2.13.0 or newer, it will not work for older versions. See https://github.com/ansible/ansible/blob/stable-2.13/changelogs/CHANGELOG-v2.13.rst#v2130

@ssbarnea ssbarnea removed the new Triage required label Oct 1, 2022
@ssbarnea ssbarnea self-assigned this Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-compat that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-compat that referenced this issue Oct 31, 2022
ssbarnea added a commit to ansible/ansible-compat that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants