ansible / ansible-lint-action

❗️Replaced by https://github.com/marketplace/actions/run-ansible-lint
https://github.com/marketplace/actions/run-ansible-lint
MIT License
254 stars 132 forks source link

couldn't resolve module/action 'community.general.terraform' #75

Closed bilalahmad99 closed 2 years ago

bilalahmad99 commented 2 years ago

syntax-check couldn't resolve module/action 'community.general.terraform'. This often indicates a misspelling, missing collection, or incorrect module path.

konstruktoid commented 2 years ago

Hi @bilalahmad99 can you include a link to the action run or any logs?

bilalahmad99 commented 2 years ago

error logs:


Run ansible/ansible-lint-action@main
/usr/bin/docker run --name a9[5](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:5)e1[6](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:6)040a113e1c46febf[7](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:7)5f1a7d5796a45_c[8](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:8)37a5 --label 2[9](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:9)a95e --workdir /github/workspace --rm -e INPUT_TARGETS -e INPUT_ARGS -e INPUT_OVERRIDE-DEPS -e TARGETS -e OVERRIDE -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_WORKFLOW -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 -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/infrastructure/infrastructure":"/github/workspace" 29a95e:16040a[11](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:11)3e1c46febf75f1a7d5796a45  "-x meta-no-info -x meta-no-tags"
+ args=("$@")
+ '[' /entrypoint.sh = /entrypoint.sh ']'
+ echo -E '\nRunning Ansible Lint...\n'
\nRunning Ansible Lint...\n
+ ansible::lint '-x meta-no-info -x meta-no-tags'
+ : './*.yml'
+ : /github/workspace
+ pushd /github/workspace
+ override_python_packages
+ [[ -n '' ]]
+ echo 'Completed installing override dependencies...'
Completed installing override dependencies...
+ local opts
++ parse_args -x meta-no-info -x meta-no-tags
++ local opts=
++ ((  4  ))
++ case "$1" in
++ opts=' -x meta-no-info'
++ shift 2
++ ((  2  ))
++ case "$1" in
++ opts=' -x meta-no-info -x meta-no-tags'
++ shift 2
++ ((  0  ))
++ eval set -- ' -x meta-no-info -x meta-no-tags'
+++ set -- -x meta-no-info -x meta-no-tags
++ echo '-x meta-no-info -x meta-no-tags'
++ return 0
+ opts='-x meta-no-info -x meta-no-tags'
/github/workspace /github/workspace
+ shopt -s globstar
+ ansible-lint -v --force-color -x meta-no-info -x meta-no-tags ./aws-provisioning.yml
WARNING: PATH altered to include /usr/bin
INFO     Set ANSIBLE_LIBRARY=/github/home/.cache/ansible-compat/[21](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:21)a3[23](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:23)/modules:/github/home/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO     Set ANSIBLE_COLLECTIONS_PATH=/github/home/.cache/ansible-compat/21a[32](https://github.com/Azzurri-Tech/infrastructure/runs/5626144387?check_suite_focus=true#step:5:32)3/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
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: ./aws-provisioning.yml
INFO     Executing syntax check on aws-provisioning.yml (0.70s)
WARNING  Listing 1 violation(s) that are fatal
syntax-check: couldn't resolve module/action 'community.general.terraform'. This often indicates a misspelling, missing collection, or incorrect module path.
Warning: s/aws_base_vpc/tasks/terraform.yml:2:3 [WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
ERROR! couldn't resolve module/action 'community.general.terraform'. This often indicates a misspelling, missing collection, or incorrect module path.
bilalahmad99 commented 2 years ago

yaml file


    - name: Lint Ansible Playbook
      uses: ansible/ansible-lint-action@main
      with:
        targets: "./*.yml"
        override-deps: |
          ansible-lint==5.3.2
        args: "-x meta-no-info -x meta-no-tags"
konstruktoid commented 2 years ago

is community.general.terraform present in requirements.yml?

ssbarnea commented 2 years ago

I bet it is not, also since v6 was released we no longer support the old versions, so I will close this one.