|
| 1 | +# Ansible Runner |
| 2 | + |
| 3 | +## Introduction |
| 4 | +The **Ansible Runner** plugin by Devtron enables seamless execution of Ansible Playbooks within your Devtron workflows using the Ansible Runner tool. For example, users can use this plugin to trigger the Ansible Playbooks which can automate tasks like configuring cluster add-ons managing node configurations, and network configurations. |
| 5 | + |
| 6 | +### Prerequisites |
| 7 | +Before integrating the **Ansible Runner** plugin make sure that you have properly configured Ansible playbooks. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Steps |
| 12 | +1. Navigate to the **Jobs** section, click **Create**, and choose **Job**. |
| 13 | +2. In the 'Create job' window, enter **Job Name** and choose a target project. |
| 14 | +3. Click **Create Job**. |
| 15 | +4. In the 'Configurations' tab, fill the required fields under the 'Source code' section and click **Save**. |
| 16 | +5. In Workflow Editor, click **+ Job Pipeline**. |
| 17 | +6. Give a name to the workflow and click **Create Workflow**. |
| 18 | +7. Click **Add job pipeline to this workflow**. |
| 19 | +8. Fill the required fields in ‘Basic configuration’ tab. |
| 20 | +9. Go to the ‘Tasks to be executed’ tab. |
| 21 | +10. Under ‘Tasks’, click the **+ Add task** button. |
| 22 | +11. Select the **Ansible Runner** plugin. |
| 23 | +12. Enter the following [user inputs](#user-inputs) with appropriate values. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## User Inputs |
| 28 | + |
| 29 | +### Task Name |
| 30 | +Enter the name of your task. |
| 31 | + |
| 32 | +e.g., `Ansible Runner` |
| 33 | + |
| 34 | +### Description |
| 35 | +Add a brief explanation of the task and the reason for choosing the plugin. Include information for someone else to understand the purpose of the task. |
| 36 | + |
| 37 | +e.g., `The Ansible Runner plugin is integrated for updating network configuration before deployment of appliction.` |
| 38 | + |
| 39 | +### Input Variables |
| 40 | + |
| 41 | +| Variable | Format | Description | Sample Value | |
| 42 | +| ------------------------ | ------------ | ----------- | ------------ | |
| 43 | +| ProjectDirectory | STRING | The project directory path containing Ansible playbooks |/ansible/playbooks | |
| 44 | +| RunnerDirectory | STRING | The directory path where ansible-runner will store temporary data and artifacts | /tmp/ansible-runner | |
| 45 | +| RunnerArgument | STRING | Additional command-line arguments to pass to ansible-runner | "-v --inventory /path/to/inventory" | |
| 46 | + |
| 47 | +### Trigger/Skip Condition |
| 48 | +Here you can set conditions to execute or skip the task. You can select `Set trigger conditions` for the execution of a task or `Set skip conditions` to skip the task. |
| 49 | + |
| 50 | +### Output Variables |
| 51 | +Ansible Runner plugin will not be generating an output variable. |
| 52 | + |
| 53 | +Click **Update Pipeline**. |
| 54 | + |
0 commit comments