This quick post will illustrate how to:
- Enable the Embedded Ansible role in CloudForms 4.5
- Create a GitHub personal access token for private repo access
- Configure an Ansible repository in CloudForms 4.5 to point to a private GitHub repository
Enable the Embedded Ansible Role
Once the CloudForms 4.5 appliance is up and running (documentation here), navigate to the appliance configuration page to enable the role:
It will take 10-15 minutes for the Ansible role to be fully up and running once enabled. The notification tray will advise when this task is complete.
GitHub Credentials for Private Repo Access
The next step is to create a GitHub personal access token and add it as a credential inside of CloudForms. This is the credential that will be used to access your private GitHub repository.
On the final screen copy the token (as this is the only time the token is displayed). Next, create the credential inside of CloudForms.
Configure the Private GitHub Repository in CloudForms
Now that the role has been enabled and a credential created, configure CloudForms to point to the private repository. It is assumed that the private repository already exists and has some Ansible playbooks within in. If desired, this repo can be cloned for testing.
Once the repository has been created, all playbooks will be visible in CloudForms:
And there it is, a GitHub private repository that can host Ansible playbooks to be used with CloudForms automation capabilities.