柿途中

Ansible playbook の構成

Vagrant と Ansible について

Ansible Playbook の設定ファイル

https://github.com/kagyuu/ansible_gis/blob/master/ansible.cfg

[defaults]
inventory = hosts
host_key_checking = False
pipelining = True


https://github.com/kagyuu/ansible_gis/blob/master/hosts

[vagrant]
gis
インストールするホストとグループを定義する。ansible.cfg に定義されている hostsファイル
本番環境では、ある程度設定内容が共通なものをグループ化して

[web]
web1
web2
web3

[db]
db1
db2

というようにする。


https://github.com/kagyuu/ansible_gis/blob/master/group_vars/all.yml

---
COLON: ':'
MINUS: '-'
共通設定。エスケープ文字を定義する


https://github.com/kagyuu/ansible_gis/blob/master/group_vars/vagrant.yml

---
ansible_ssh_user: vagrant
Vagrantグループ共通の設定


https://github.com/kagyuu/ansible_gis/blob/master/host_vars/gis.yml

---
ansible_ssh_host: 127.0.0.1
ansible_ssh_port: 2222
ansible_ssh_private_key_file: .vagrant/machines/gis/virtualbox/private_key
gisサーバ固有の設定。
gisサーバの設定は all + Vagrantグループの設定内容 + gisサーバ固有の設定

今宵はここまで

Ansible Playbook の処理の流れ

メイン部 (gis.yml)

サブルーチン部 (roles/)

共通サブルーチンについて (ansible_common/roles/)

最初から最後まで流しで見てみる


Ansible


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2017-03-10 (金) 01:47:26 (2603d)
Short-URL: https://at-sushi.com:443/pukiwiki/pukiwiki.php?cmd=s&k=643c9abbc1
ISBN10
ISBN13
9784061426061