Run Ansible Playbook from Jenkins by Executing Shell Command
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.
Prerequisites
Run Ansible Playbook
1 | ansible-playbook /home/ubuntu/ansible-playbook/ansible.yml |
(As an example, we are going use /home/ubuntu/ansible-playbook/ansible.yml as Playbook path because my Playbook is located at that directory)
What's next
In our next tutorial we are going to learn Run Ansible Playbook from Jenkins With a Dedicated User and Jenkins Node
Conclusion
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.
Happy Coding
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments
GitalkDisqus