Ansible inventory 작성하기
softPine
Inventory Ansible을 사용하기 앞서 Ansible로 관리하려는 노드들 즉 Managed node들에 대해서 관리하려면 Inventory 파일을 먼저 작성을 해야한다. 이 Inventory 파일을 hostfile 이라고도 불리며, ansible 실행 시 기본적으로 /etc/ansible/hosts 파일을 불러온다. 이 파일의 양식은 INI 또는 yaml 파일 형식이다. 이 기본 hosts 파일 말고 다른 hosts 파일을 불러오려면 -i 옵션을 사용하여 다른 파일을 불러오면 된다. 다음은 기본적인 inventory 파일의 형식이다. all: hosts: mail.example.com: children: webservers: hosts: foo.example.com: bar.example.com..