Skip to main content

Ansible execution environment component

Build an Ansible execution environment and authenticate collection downloads from Red Hat Automation Hub without storing its offline token in the image.

Use Automation Hub authentication​

  1. Add ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKEN as a masked GitLab CI/CD variable. Use your Red Hat Automation Hub offline token as its value. Mark the variable unprotected and available to all branches, tags and environments.

  2. Include the component in .gitlab-ci.yml:

    include:
    - component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
    - component: $CI_SERVER_FQDN/xrow-public/ci-tools/ansible-ee@stable
    inputs:
    path: ansible-ee
  3. Create a GitLab pipeline schedule for the default branch to refresh ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKEN automatically.

Inputs​

NameDescriptionDefaultType
------------
argsstring
imagestring
nameansible-eestring
needsThe jobs that this job depends on.[]array
pathPath to the directory containing Container sources / context..string
rulesThe jobs that this job depends on.[{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"if":"$CI_PIPELINE_SOURCE == \"merge_request_event\"","when":"on_success"},{"when":"on_success"}]array
scanning-allow-failurefalseboolean
scanning-enabledtrueboolean
scanning-severityCRITICALstring
stagebuildstring
versionmainstring