yum -y install epel-release
yum -y install ansible
ansible_quickstart 디렉토리에 inventory파일을 만든 후 아래 내용을 기입해 준다
192.168.56.10
[myhosts]
192.168.56.11
[dbserver]
192.168.56.12
[server:children]
webserver
dbserver
~
inventory 파일에 명시된 모든 호스트 검색
$ ansible all --list-hosts
개별 호스트 검색
$ ansible 192.168.56.10 --list-hosts
그룹 내 호스트 검색
$ ansible webserver --list-hosts
관리 호스트로 접속하기 위한 ssh 설정 파일등이 들어있는 ansible.cfg 파일은 아래 세 위치에 존재할 수 있다