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
-
Add
ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKENas 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. -
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@stableinputs:path: ansible-ee -
Create a GitLab pipeline schedule for the default branch to refresh
ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKENautomatically.
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| args | string | ||
| image | string | ||
| name | ansible-ee | string | |
| needs | The jobs that this job depends on. | [] | array |
| path | Path to the directory containing Container sources / context. | . | string |
| rules | The 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-failure | false | boolean | |
| scanning-enabled | true | boolean | |
| scanning-severity | CRITICAL | string | |
| stage | build | string | |
| version | main | string |