Skip to content

zport module is not part of a collection and results in a ansible-lint syntax-check error.  #215

Open
@ddimatos

Description

The IMS team is using an ansible module not part of a collection, its being created locally.
This module is zport

That results in "couldn't resolve module/action 'zport'." ,

Things I tried to fix this:

  • Add the module to ANSIBLE_COLLECTIONS_PATHS or ANSIBLE_COLLECTIONS_PATH here ansible.cfg.
  • Tried to add to requiements.yaml to inform ansible where to find the module. I don’t know what FQCN to use either given its not coming from a collection.
  • # noqa: syntax-check[specific] but I found it to be unskipable and also noted here
    - name: Allocate HTTP Port
      zport: # noqa: syntax-check[specific]
        name: '*'
        port: '{{ zcon_http_port if RESERVE_SPECIFIC_PORT else None | default(omit) }}'
        dsname: '{{ tcpip_profile }}'
        tmp_dsname: '{{ tcpip_profile_tmp }}'
        tcp: true
      register: command_result2

Work around:

  • What I consider a temporary work around was to disable the check in .ansible-lint-ignore here in this PR.
  • I could not find much doc or an example of .ansible-lint-ignore , best doc i found was this snippet , this is likely because its a newer capability.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions