Ansible Automation Platform Resource Operator
The Ansible Automation Platform Resource Operator is a custom resource that allows you to manage and define automation controller objects, such as projects and job templates, through YAML files.
Resource Operator overview
Resource Operator is a custom resource (CR) that you can deploy after you have created your platform gateway deployment.
With Resource Operator you can define resources such as projects, job templates, and inventories in YAML files.
Ansible Automation Platform then uses the YAML files to create these resources. You can create the YAML through the Form view that prompts you for keys and values for your YAML code. Alternatively, to work with YAML directly, you can select YAML view.
The Resource Operator provides the following CRs:
- AnsibleJob
- JobTemplate
- Automation controller project
- Automation controller schedule
- Automation controller workflow
- Automation controller workflow template:
- Automation controller inventory
- Automation controller credential
Use Resource Operator
The Resource Operator itself does not do anything until the user creates an object. As soon as the user creates an AutomationControllerProject or AnsibleJob resource, the Resource Operator starts processing that object.
Before you begin
- Install the Kubernetes-based cluster of your choice.
- Deploy automation controller using the
automation-controller-operator.
About this task
Procedure
- After installing the
automation-controller-resource-operatorin your cluster, you must create a Kubernetes (k8s) secret with the connection information for your Ansible Automation Platform instance. - Then you can use Resource Operator to create a k8s resource to manage your Ansible Automation Platform instance.
Connect Resource Operator to Ansible Automation Platform
To connect Resource Operator with platform gateway you must create a Kubernetes secret with the connection information for your Ansible Automation Platform instance.
About this task
Use the following procedure to create an OAuth2 token for your user in the platform gateway UI.
You can only create OAuth 2 Tokens for your own user through the API or UI, which means you can only configure or view tokens from your own user profile.
Procedure
Create an Ansible Automation Platform connection secret for Resource Operator
To make your connection information available to the Resource Operator, create a k8s secret with the token and host value.