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
The creatorService URL is required for the Ansible plug-ins to provision new projects using the provided software templates.
Procedure
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
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
The Ansible plug-ins continue to function regardless of the Ansible Automation Platform subscription status.
Procedure
- 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
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
Configure role-based access control
Red Hat Developer Hub offers role-based access control (RBAC) functionality. RBAC can then be applied to the Ansible plug-ins content.
Procedure
- 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.