2

最近ansible、Linux サーバーの構成管理に使い始めました。

私の習慣は、1 つのツールを習得したら、できるだけそれを使用しようとすることです。

当初、私のphp Webアプリでは、Makefileパッケージのダウンロード、インストール、php.iniファイルの変更、zipファイルの抽出、フォルダー間でのファイルのコピーなどを行って、アプリケーションを自動化された方法でデプロイするのに長い時間がかかりました。

Makefile現在、その展開をに変換することを考えています。プロジェクト全体で 1 つの大きなファイルではなく、領域Ansibleごとに個別のファイルを配置できるからです。ymlmakefile

そのために ansible を使用するのが良い考えなのか、それともそれが良いのか知りたいですMakefile

4

1 に答える 1

4

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.

于 2014-03-18T02:48:56.460 に答える