ansible-linter fails with Galaxy attempting name resolution
PierreR opened this issue · comments
I have the following error when I try to use the ansible-lint
module:
ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [Errno -3] Temporary failure in name resolution>. <urlopen error [Errno -3] Temporary failure in name resolution>
Here is my configuration:
checks.${system} =
{
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = (pkgs.lib.cleanSource ./.);
hooks = {
editorconfig-checker.enable = true;
nixpkgs-fmt.enable = true;
yamllint.enable = true;
ansible-lint.enable = true;
};
settings = {
yamllint.relaxed = true;
ansible-lint.configPath = ".ansible-lint";
};
};
};
It generates the following hooks in pre-commit-config
:
"hooks": [
{
"always_run": false,
"entry": "/nix/store/mqqzdasbhl1kqrbaf8g4qhmdip69i0bx-ansible-lint-6.17.1/bin/ansible-lint -c .ansible-lint",
"exclude": "^$",
"files": "",
"id": "ansible-lint",
"language": "system",
"name": "ansible-lint",
"pass_filenames": true,
"stages": [
"commit"
],
"types": [
"file"
],
"types_or": [],
"verbose": false
},
If I take the entry and run it in the terminal, it does work.
I also use offline: true
in the .ansible-lint config file.
Any help would be welcomed ;-)
Thanks
I have just realized that the culprit is the galaxy.yml file ... If I remove it, it works.
Is there a way to make it work while keeping the galaxy.yml file ?
This is probably relevant :
ansible/ansible-lint#2042
what's the resolution here?
The only possible resolution would be outside this repo -> closing