Configure the Ansible plug-ins
After installing the Ansible plug-ins, configure them to connect to your Ansible Automation Platform instance and enable software templates.
Add the following configuration to your Red Hat Developer Hub custom ConfigMap (for example, app-config-rhdh).
- For Operator deployments, edit the ConfigMap directly.
- For Helm deployments, edit the ConfigMap referenced in
upstream.backstage.extraAppConfig.
Configure the Ansible Dev Tools Server Copy linkLink copied!
The creatorService URL is required for the Ansible plug-ins to provision new projects using the provided software templates.
Procedure Copy linkLink copied!
app-config-rhdh.yaml file.
kind: ConfigMap
apiVersion: v1
metadata:
name: app-config-rhdh
...
data:
app-config-rhdh.yaml: |-
ansible:
creatorService:
baseUrl: 127.0.0.1
port: '8000'
...
Configure Ansible Automation Platform details Copy linkLink copied!
Connect Red Hat Developer Hub to your automation controller by configuring the Ansible Automation Platform details. This configuration uses a Personal Access Token (PAT) to authenticate the plug-ins, which allows them to interact with your automation environment.
About this task Copy linkLink copied!
The Ansible plug-ins continue to function regardless of the Ansible Automation Platform subscription status.
Procedure Copy linkLink copied!
- Create a Personal Access Token (PAT) with "read and write” scope in automation controller, following the Applications section of Access management and authentication.
- Edit your custom Red Hat Developer Hub config map, for example
app-config-rhdh. - Add your Ansible Automation Platform details to
app-config-rhdh.yaml.
Add Ansible plug-ins software templates Copy linkLink copied!
Add Ansible Automation Platform software templates to your Red Hat Developer Hub instance so users can create new Ansible playbooks and collection projects based on Ansible best practices.
Procedure Copy linkLink copied!
Configure Role Based Access Control Copy linkLink copied!
Red Hat Developer Hub offers Role-based Access Control (RBAC) functionality. RBAC can then be applied to the Ansible plug-ins content.
Procedure Copy linkLink copied!
- Members of the
admin:superUsersgroup can select templates in the Create tab of the Ansible plug-ins to create playbook and collection projects. - Members of the
admin:usersgroup can view templates in the Create tab of the Ansible plug-ins.The following example adds RBAC to Red Hat Developer Hub.
data: app-config-rhdh.yaml: | plugins: ... permission: enabled: true rbac: admin: users: - name: user:default/<user-scm-ida> superUsers: - name: user:default/<user-admin-idb>For more information about permission policies and managing RBAC, refer to the Authorization in Red Hat Developer Hub guide.