Ansible to create repos in Github and Bitbucket.


Ansible is the simplest way to automate apps and IT infrastructure. Ansible is a radically simple IT automation engine that automates cloud provisioningconfiguration managementapplication deploymentintra-service orchestration, and many other IT needs.

It uses no agents and no additional custom security infrastructure, so it's easy to deploy - and most importantly, it uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way that approaches plain English.


In one of the project where we were planning to create an automation tool I had implemented Ansible to create/update/delete Github and Bitbucket repositories.

The script will ask for github url / username and password and the repository name you want to keep. Then it will the github API and will create a repository for you. And the same goes with bitbucket. 

The real time application usage can be in a scenario where we want to automate the complete CI and CD process for the developers. ( I was working on the same product that was being developed but for some reasons company shut down the product development) 

I have given here a basic example (Of course I can't disclose the complete source code). But this should be enough to get started for the complex recepie's. Though we are not using ched ;) 

Source code : 


https://github.com/swapnilpatil1682/Ansible_with_git_bitbucket/
Latest
Previous
Next Post »

Popular Posts