Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-154

Install collection dependencies when importing a collection

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • Unspecified
    • None
    • False
    • False
    • Undefined

      When I imported the community.okd (as redhat.openshift for the supported namespace.name) collection into Automation Hub yesterday, I got the following notice:

      Error running ansible-doc: cmd="/usr/bin/env ANSIBLE_COLLECTIONS_PATHS=/tmp/tmp58gaersy ansible-doc --type module --json redhat.openshift.openshift_route redhat.openshift.openshift_auth redhat.openshift.k8s redhat.openshift.k8s_auth redhat.openshift.openshift_process" returncode="1" b"[WARNING]: Failed to create the directory '/.ansible': [Errno 13] Permission
      denied: b'/.ansible'
      ERROR! module redhat.openshift.openshift_route missing documentation (or could not parse documentation): unknown doc_fragment(s) in file /tmp/tmp58gaersy/ansible_collections/redhat/openshift/plugins/modules/openshift_route.py: kubernetes.core.k8s_auth_options, kubernetes.core.k8s_wait_options, kubernetes.core.k8s_state_options"

      The problem seems to stem from the fact that all those modules pull in documentation fragments from another collection that is defined in this collection's depdencies.

      For example, the redhat.openshift.k8s module relies on documentation fragments that are referenced like community.kubernetes.k8s_auth_options

      It would seem that the importer that runs when I upload a new collection to Automation Hub doesn't install dependent collections in the environment where it runs ansible-doc and the rest of the import / test process. (Unless I'm missing something in my survey of the import log data.)

              Unassigned Unassigned
              rhs_246463 Jeff Geerling (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: