I can't figure out what I am missing here, but I cannot get the linter to see modules from other collections.
name: Ansible Lint # feel free to pick your own name
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone Repo
uses: actions/checkout@v2
- name: Install required collections
run: ansible-galaxy collection install -p /usr/share/ansible/collections -f -r collections/requirements.yml
- name: Run ansible-lint
uses: ansible-community/ansible-lint-action@main
with:
path: "playbooks/"
Run ansible-galaxy collection install -p /usr/share/ansible/collections -f -r collections/requirements.yml
ansible-galaxy collection install -p /usr/share/ansible/collections -f -r collections/requirements.yml
shell: /usr/bin/bash -e {0}
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/download/ansible-posix-1.3.0.tar.gz to /home/runner/.ansible/tmp/ansible-local-1933_dvcsxt6/tmphx8hvx_k/ansible-posix-1.3.0-o[2]ux72p0
Installing 'ansible.posix:1.[3].0' to '/usr/share/ansible/collections/ansible_collections/ansible/posix'
ansible.posix:1.3.0 was installed successfully
Downloading https://galaxy.ansible.com/download/community-general-[4]8.0.tar.gz to /home/runner/.ansible/tmp/ansible-local-1933_dvcsxt6/tmphx8hvx_k/community-general-4.8.0-423behy2
Installing 'community.general:4.8.0' to '/usr/share/ansible/collections/ansible_collections/community/general'
community.general:4.8.0 was installed successfully
2s
Run ansible-community/ansible-lint-action@main
/usr/bin/docker run --name quayioansiblecreatoreev041_1aaab8 --label 084[5]0d --workdir /github/workspace --rm -e INPUT_PATH -e INPUT_ARGS -e GITHUB_ACTIONS -e GITHUB_WORKFLOW -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --entrypoint "/usr/local/bin/ansible-lint" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/ansible_challenges/ansible_challenges":"/github/workspace" quay.io/ansible/creator-ee:v0.4.1 "-vvv" "playbooks/"
WARNING: PATH altered to include /usr/bin
DEBUG Logging initialized to level 10
DEBUG Options: Namespace(cache_dir='/github/home/.cache/ansible-compat/21a323', colored=False, config_file=None, configured=True, cwd=PosixPath('/github/workspace'), display_relative_path=True, enable_list=[], exclude_paths=['.cache', '.git', '.hg', '.svn', '.tox'], extra_vars=None, format='rich', kinds=[{'jinja2': '**/*.j2'}, {'jinja2': '**/*.j2.*'}, {'text': '**/templates/**/*.*'}, {'inventory': '**/inventory/**.yml'}, {'requirements': '**/meta/requirements.yml'}, {'galaxy': '**/galaxy.yml'}, {'reno': '**/releasenotes/*/*.{yaml,yml}'}, {'playbook': '**/playbooks/*.{yml,yaml}'}, {'playbook': '**/*playbook*.{yml,yaml}'}, {'role': '**/roles/*/'}, {'tasks': '**/tasks/**/*.{yaml,yml}'}, {'handlers': '**/handlers/*.{yaml,yml}'}, {'vars': '**/{host_vars,group_vars,vars,defaults}/**/*.{yaml,yml}'}, {'meta': '**/meta/main.{yaml,yml}'}, {'yaml': '.config/molecule/config.{yaml,yml}'}, {'requirements': '**/molecule/*/{collections,requirements}.{yaml,yml}'}, {'yaml': '**/molecule/*/{base,molecule}.{yaml,yml}'}, {'requirements': '**/requirements.yml'}, {'playbook': '**/molecule/*/*.{yaml,yml}'}, {'yaml': '**/{.ansible-lint,.yamllint}'}, {'yaml': '**/*.{yaml,yml}'}, {'yaml': '**/.*.{yaml,yml}'}], lintables=['playbooks/'], listrules=False, listtags=False, loop_var_prefix=None, mock_modules=[], mock_roles=[], offline=None, parseable=False, progressive=False, project_dir='.', quiet=0, rules={}, rulesdir=[], rulesdirs=['/usr/local/lib/python3.8/site-packages/ansiblelint/rules'], skip_action_validation=True, skip_list=[], tags=[], use_default_rules=False, var_naming_pattern=None, verbosity=3, version=False, warn_list=['experimental', 'role-name'], write=False)
DEBUG /github/workspace
INFO Set ANSIBLE_LIBRARY=/github/home/.cache/ansible-compat/21a323/modules:/github/home/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/github/home/.cache/ansible-compat/21a323/collections:/github/home/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/github/home/.cache/ansible-compat/21a323/roles:roles:/github/home/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
DEBUG Loading rules from /usr/local/lib/python3.8/site-packages/ansiblelint/rules
DEBUG Effective yamllint rules used: {'braces': {'level': 'error', 'forbid': False, 'min-spaces-inside': 0, 'max-spaces-inside': 0, 'min-spaces-inside-empty': -1, 'max-spaces-inside-empty': -1}, 'brackets': {'level': 'error', 'forbid': False, 'min-spaces-inside': 0, 'max-spaces-inside': 0, 'min-spaces-inside-empty': -1, 'max-spaces-inside-empty': -1}, 'colons': {'level': 'error', 'max-spaces-before': 0, 'max-spaces-after': 1}, 'commas': {'level': 'error', 'max-spaces-before': 0, 'min-spaces-after': 1, 'max-spaces-after': 1}, 'comments': {'level': 'warning', 'require-starting-space': True, 'ignore-shebangs': True, 'min-spaces-from-content': 1}, 'comments-indentation': False, 'document-end': False, 'document-start': False, 'empty-lines': {'level': 'error', 'max': 2, 'max-start': 0, 'max-end': 0}, 'empty-values': False, 'hyphens': {'level': 'error', 'max-spaces-after': 1}, 'indentation': {'level': 'error', 'spaces': 'consistent', 'indent-sequences': True, 'check-multi-line-strings': False}, 'key-duplicates': {'level': 'error'}, 'key-ordering': False, 'line-length': {'level': 'error', 'max': 1[6]0, 'allow-non-breakable-words': True, 'allow-non-breakable-inline-mappings': False}, 'new-line-at-end-of-file': {'level': 'error'}, 'new-lines': {'level': 'error', 'type': 'unix'}, 'octal-values': False, 'quoted-strings': False, 'trailing-spaces': {'level': 'error'}, 'truthy': {'level': 'warning', 'allowed-values': ['true', 'false'], 'check-keys': True}}
INFO Discovered files to lint using: git ls-files --cached --others --exclude-standard -z
INFO Excluded removed files using: git ls-files --deleted -z
INFO Executing syntax check on playbooks/challenge1.yml (0.[7]
WARNING Listing 1 violation(s) that are fatal
syntax-check: couldn't resolve module/action 'community.general.seport'. This often indicates a misspelling, missing collection, or incorrect module path.
roles/challenge1/tasks/main.yml:35:3 ERROR! couldn't resolve module/action 'community.general.seport'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/github/workspace/roles/challenge1/tasks/main.yml': line 35, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Allow nginx to listen on tcp port 75[10]
^ here
Error: syntax-check couldn't resolve module/action 'community.general.seport'. This often indicates a misspelling, missing collection, or incorrect module path.
Finished with [1] failure(s), 0 warning(s) on 2 files.