Question

I have recently started using ansible for configuration management of linux servers.

My habbit is that if I learn one tool then I try to use it as much as possible.

Initially for my php web apps I had a long Makefile which used to download, install packages , make php.ini file chnages , extract zip files , copy files between folders etc to deploy my application in as automated way.

Now, I am thinking of converting that Makefile deployment to Ansible because then I can arrange the separate yml file for separate areas rather than one big makefile for the whole project.

I want to know that is it good idea to use ansible for that or Makefile will be good for that.

Était-ce utile?

La solution

Sure, Ansible is great for that. You can separate all your different steps into different playbooks that are identified by yaml files.

You can define common tasks and then include them in your specific playbooks.

You can also make use of Ansible roles to create complete set of playbooks depending on the role of the server. For example, one set servers' role could be webservers and another set of servers' role could be databases.

You can find more info on roles here: http://docs.ansible.com/playbooks_roles.html

There are's also a few modules on the web out there that you can also use to get you started and you can also use Ansible Galaxy to import roles.

Of course, you can accomplish the same by breaking down your Makefile but maybe you want to learn a new tool.

Hope it helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top