Posted in Linux
Tutorial Menggunakan Ansible II
Artikel ini adalah artikel kedua lanjutan dari https://notulensiku.com/2016/11/tutorial-menggunakan-ansible-i/.
Inventory pada ansible
Inventory adalah file hosts pada ansible yang berisi semua server yang dapat dikelola. Ada berbagai macam format yang dapat digunakan. Berikut contoh-contoh format tersebut.
mail.example.com [webservers] foo.example.com bar.example.com [dbservers] one.example.com:5505 two.example.com three.example.com
[webservers] www[01:50].example.com [databases] db-[a:f].example.com
[targets] localhost ansible_connection=local other1.example.com ansible_connection=ssh ansible_user=mpdehaan other2.example.com ansible_connection=ssh ansible_user=mdehaan
[atlanta] host1 http_port=80 maxRequestsPerChild=808 host2 http_port=303 maxRequestsPerChild=909
[atlanta] host1 host2 [atlanta:vars] ntp_server=ntp.atlanta.example.com proxy=proxy.atlanta.example.com
[atlanta] host1 host2 [raleigh] host2 host3 [southeast:children] atlanta raleigh [southeast:vars] some_server=foo.southeast.example.com halon_system_timeout=30 self_destruct_countdown=60 escape_pods=2 [usa:children] southeast northeast southwest northwest
Artikel bersangkutan:
Tutorial Menggunakan Ansible I – Notulensiku
[…] Bacaan berikutnya: https://notulensiku.com/2016/11/tutorial-menggunakan-ansible-ii/ […]