Chapter 4. Getting started as an automation operator
As an automation operator, Ansible Automation Platform helps you monitor and execute automation projects with Red Hat certified collections or custom content for your organization.
To get started as a platform operator, see the following sections:
4.1. Automation execution projects Copy linkLink copied to clipboard!
A project is a logical collection of Ansible playbooks that you can manage in Ansible Automation Platform.
Platform administrators and automation developers have the permissions to create projects. As an automation operator you can view and sync projects. The following procedure desribes how to view available projects.
Procedure
-
From the navigation panel, select
. The Projects page displays a list of projects that are currently available. - Click a project to view its details.
Next steps
For each project listed, you can sync the latest revision, edit the project, or copy the project’s attributes using the icons next to each project.
4.2. Work with job templates Copy linkLink copied to clipboard!
A job template is a definition and set of parameters for running an Ansible job.
A job template combines an Ansible Playbook from a project with the settings required to launch the job. Job templates are useful for running the same job many times. Job templates also encourage the reuse of Ansible Playbook content and collaboration between teams. For more information, see Job Templates in the Using automation execution guide.
Platform administrators and automation developers have the permissions to create job templates. As an automation operator you can launch job templates and view their details.
4.2.1. Launching a job template Copy linkLink copied to clipboard!
Ansible Automation Platform offers push-button deployment of Ansible playbooks. You can configure a template to store all the parameters that you would normally pass to the Ansible playbook on the command line. In addition to the playbooks, the template passes the inventory, credentials, extra variables, and all options and settings that you can specify on the command line.
Procedure
-
From the navigation panel, select
. - Select a template to view its details. A default job template is created during your initial setup to help you get started, but you can also create your own.
- From the Templates page, click the launch icon to run your job template.
Verification
The Templates list view shows job templates that are currently available. The default view is collapsed (Compact), showing the template name, template type, and the timestamp of the last job that ran using that template. You can click the arrow icon next to each entry to expand and view more information. This list is sorted alphabetically by name, but you can sort by other criteria, or search by various template fields and attributes.
From this screen you can launch, edit, and copy a job template.
4.2.2. Surveys in job templates Copy linkLink copied to clipboard!
Job types of Run or Check provide a way to set up surveys in the Job Template creation or editing screens. Surveys set extra variables for the playbook similar to Prompt for Extra Variables does, but in a user-friendly question and answer way. Surveys also permit for validation of user input. Select the Survey tab to create a survey.
Example
You can use surveys for several situations. For example, operations want to give developers a "push to stage" button that they can run without advance knowledge of Ansible. When launched, this task could prompt for answers to questions such as "What tag should we release?".
You can ask many types of questions, including multiple-choice questions.
4.2.3. Creating a survey Copy linkLink copied to clipboard!
Procedure
-
From the navigation panel, select
. - Select the job template you want to create a survey for.
- From the Survey tab, click .
A survey can consist of any number of questions. For each question, enter the following information:
- Question: The question to ask the user.
- Optional: Description: A description of what is being asked of the user.
- Answer variable name: The Ansible variable name to store the user’s response in. This is the variable to be used by the playbook. Variable names cannot contain spaces.
Answer type: Choose from the following question types:
- Text: A single line of text. You can set the minimum and maximum length (in characters) for this answer.
- Textarea: A multi-line text field. You can set the minimum and maximum length (in characters) for this answer.
- Password: Responses are treated as sensitive information, much like an actual password is treated. You can set the minimum and maximum length (in characters) for this answer.
- Multiple Choice (single select): A list of options, of which only one can be selected at a time. Enter the options, one per line, in the Multiple Choice Options field.
- Multiple Choice (multiple select): A list of options, any number of which can be selected at a time. Enter the options, one per line, in the Multiple Choice Options field.
- Integer: An integer number. You can set the minimum and maximum length (in characters) for this answer.
- Float: A decimal number. You can set the minimum and maximum length (in characters) for this answer.
- Required: Whether or not an answer to this question is required from the user.
- Minimum length and Maximum length: Specify if a certain length in the answer is required.
- Default answer: The default answer to the question. This value is pre-filled in the interface and is used if the answer is not provided by the user.
Once you have entered the question information, click to add the question.
The survey question displays in the Survey list. For any question, you can click
to edit it.
Check the box next to each question and click to delete the question, or use the toggle option in the menu bar to enable or disable the survey prompts.
If you have more than one survey question, click to rearrange the order of the questions by clicking and dragging on the grid icon.
- To add more questions, click .
4.3. About inventories Copy linkLink copied to clipboard!
An inventory is a file listing the collection of hosts managed by Ansible Automation Platform. Organizations are assigned to inventories, while permissions to launch playbooks against inventories are controlled at the user or team level.
Platform administrators and automation developers have the permissions to create inventories. As an automation operator you can view inventories and their details.
4.3.1. Executing an inventory Copy linkLink copied to clipboard!
The following steps describe how to execute an inventory.
Procedure
From the navigation panel, select
. The Inventories window displays a list of inventories that are currently available, along with the following information: - Name: The inventory name.
Status: The statuses are:
- Success: The inventory sync completed successfully.
- Disabled: No inventory source added to the inventory.
- Error: The inventory source completed with error.
- Type: Identifies whether the inventory is a standard inventory, a smart inventory, or a constructed inventory.
- Organization: The organization to which the inventory belongs.
- Select an inventory name to display the Details page for the inventory, including the inventory’s groups and hosts.
4.4. Automation execution jobs Copy linkLink copied to clipboard!
A job is an instance of Ansible Automation Platform launching an Ansible Playbook against an inventory of hosts.
4.4.1. Reviewing a job status Copy linkLink copied to clipboard!
The Jobs list view displays a list of jobs and their statuses, shown as completed successfully, failed, or as an active (running) job.
Procedure
From the navigation panel, select
. The default view is collapsed (Compact) with the job name, status, job type, start, and finish times. You can click the arrow icon to expand and see more information. You can sort this list by various criteria, and perform a search to filter the jobs of interest.
From this screen, you can complete the following tasks:
- View a job’s details and standard output.
- Relaunch jobs.
Remove selected jobs.
The relaunch operation only applies to relaunches of playbook runs and does not apply to project or inventory updates, system jobs, or workflow jobs.
4.4.2. Reviewing job output Copy linkLink copied to clipboard!
When you relaunch a job, the jobs Output view is displayed.
Procedure
-
From the navigation panel, select
. Select a job. This takes you to the Output view for that job, where you can filter job output by these criteria:
- The Search output option allows you to search by keyword.
- The Event option enables you to filter by the events of interest, such as errors, host failures, host retries, and items skipped. You can include as many events in the filter as necessary.