ansible 실습

이름 성능 IP
control 4/2/2/20 172.16.8.140
managed1 2/1/1/10 172.16.8.141
managed2 2/1/1/10 172.16.8.142

그냥 vm환경 터미널은 불편하니 일단 ssh먼저 설치

control-node (172.16.8.140) 세팅

<aside> 💡

sudo apt update sudo apt install -y openssh-client openssh-server sudo systemctl enable --now ssh

</aside>

managed-node1 (172.16.8.141) 세팅

<aside> 💡

sudo apt update sudo apt install -y openssh-client openssh-server sudo systemctl enable --now ssh

</aside>

managed-node2 (172.16.8.142) 세팅

<aside> 💡

sudo apt update sudo apt install -y openssh-client openssh-server sudo systemctl enable --now ssh

</aside>

control-node 에서 인벤토리 작성

hosts라는 이름으로 작성하며 어느위치에 있어도 상관없지만 헷갈리지 않기위해 상위 폴더에 이름을 잘 지정한다

각 managed노드들이게 일을 시키기위해 주소록을 만드는개념