Categories: 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:

[1]

Akhmad Fakhoni Listiyan Dede

View Comments

Share
Published by
Akhmad Fakhoni Listiyan Dede

Recent Posts

Install kubernetes cluster using kubeadm

Hello everyone! 👋 Welcome to our step-by-step guide on using kubeadm to install Kubernetes. It's…

10 months ago

Meningkatkan Efisiensi Memory Proxmox Lebih dari 20%

Proxmox adalah hypervisor yang populer digunakan karena penggunaannya yang cukup simpel jika dibandingkan dengan hypervisor…

4 years ago

Longhorn Failed Upgrade from v0.8.1 to v1.0.0 caused by pv created before v0.6.2

This post is mirror of https://forums.rancher.com/t/failed-upgrade-from-v0-8-1-to-v1-0-0-caused-by-pv-created-before-v0-6-2/17586 I scale down all pods that has vpc to…

4 years ago

Cara Setup Network Ubuntu Server 18.04 pada Proxmox

Ubuntu Konfigurasi network pada Ubuntu Server 18.04 berbeda dengan ubuntu versi sebelumnya. Versi sebelumnya menggunakan…

4 years ago

VSCode Terminal Font Fix on MacOS

For detailed problems, see https://notulensiku.com/2019/02/fix-integrated-terminal-font-vscode/ To solve on mac, you need to install powerline fonts…

5 years ago

Enable Forward Secrecy pada Apache

Untuk mengaktifkan Forward Secrecy pada web browser Apache, versi minimum yang dibutuhkan adalah: OpenSSL 1.0.1c+Apache…

5 years ago