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.
Before integrating the Ansible Runner plugin make sure that you have properly configured Ansible playbooks.
Navigate to the Jobs section, click Create, and choose Job.
In the 'Create job' window, enter Job Name and choose a target project.
Click Create Job.
In the 'Configurations' tab, fill the required fields under the 'Source code' section and click Save.
In Workflow Editor, click + Job Pipeline.
Give a name to the workflow and click Create Workflow.
Click Add job pipeline to this workflow.
Fill the required fields in ‘Basic configuration’ tab.
Go to the ‘Tasks to be executed’ tab.
Under ‘Tasks’, click the + Add task button.
Select the Ansible Runner plugin.
Enter the following user inputs with appropriate values.
Enter the name of your task.
e.g., Ansible Runner
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.
e.g., The Ansible Runner plugin is integrated for updating network configuration before deployment of appliction.
ProjectDirectory
STRING
The project directory path containing Ansible playbooks
/ansible/playbooks
RunnerDirectory
STRING
The directory path where ansible-runner will store temporary data and artifacts
/tmp/ansible-runner
RunnerArgument
STRING
Additional command-line arguments to pass to ansible-runner
"-v --inventory /path/to/inventory"
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.
Ansible Runner plugin will not be generating an output variable.
Click Update Pipeline.