In our previous article, we learned how to Ansible to be configured on Jenkins Master to run Ansible job. In this article, we will learn how to run Ansible Playbook through Jenkins by Executing Shell Command.
(As an example, we are going use /home/ubuntu/ansible-playbook/ansible.yml as Playbook path because my Playbook is located at that directory)
Save the Job and click on Build Now
Verify the Console log
In our next tutorial we are going to learn Run Ansible Playbook from Jenkins With a Dedicated User and Jenkins Node
In this tutorial, we learned how to run Ansible Playbook using Jenkins. If you have any issue regarding this tutorial, mention your issue in comment section or reach me through my E-mail. You can obtain all the related script files for this tutorial from this GitHub repository.