I am pretty new to Ansible and the Dev-Ops world.
I am working on an automated deployment project and I nearly have all the pieces together.
This is what I have done so far:
Installed Ansible on an Ubuntu server
Have Ansible pinging my Windows Server
Created a .yml playbook that connects to Windows Server and run a powershell script on that server
The main goal is:
-The Developer merges his/her changes from master branch to Pre-Production branch on GitHub
-When the merge is complete, this will trigger Ansible to run the playbook that connects to Windows server and executes the powershell script (ansible command = Ansible-playbook -i hosts run-powershell.yml)
Would anyone be able to point me in the right direction and provide some knowledge as to how I’d be able to achieve this?
Any help would be extremely apricated!!!
Zuul CI is another option, especially if you want to run your actually
playbooks directly from it. It is a CI tool that used ansible for task
execution.
As an example, here is a working example of how to CD a set of playbooks
/ roles to a production services:
Thanks very much for your replies and insights!
So would you say that Jenkins would be the better tool to trigger an event based on what happens on GitHub?
Can you not add a WebHook to your GitHub Repo to trigger Ansible to run a playbook - is it possible?
Thanks very much for your replies and insights!
So would you say that Jenkins would be the better tool to trigger an event
based on what happens on GitHub?
Can you not add a WebHook to your GitHub Repo to trigger Ansible to run a
playbook - is it possible?
Yes, jenkins / zuul / github actions will all be able to do this. Each
do it differently, but in the end will run a playbook on commit.