728x90
vim 편집기 설정
[vagrant@control-node ~]$ vi ~/.vimrc
syntax on
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et ai
플레이북 실행
인벤토리 파일에 호스트 등록 (/etc/ansible/hosts)
[vagrant@control-node ~]$ sudo vi /etc/ansible/hosts
## [webservers]
## alpha.example.org
## beta.example.org
192.168.56.110
192.168.56.120
192.168.56.130
192.168.56.140
플레이북 생성 (.yaml 파일)
[vagrant@control-node ~]$ cat playbook.yaml
---
- name: first playbook
hosts: all
tasks:
- name: use command module
command: id
...
플레이북 실행 (ansible-playbook)
728x90
'쿠버네티스 교육 > 강의 내용 정리' 카테고리의 다른 글
220613_2_도커_이미지 관리 명령어 (0) | 2022.06.13 |
---|---|
220613_1_도커_docker 설치 (0) | 2022.06.13 |
220607_3_앤서블_인벤토리 파일과 구성 파일 (0) | 2022.06.07 |
220607_2_앤서블_개념, 아키텍처, 실습 환경 구성 (0) | 2022.06.07 |
220607_1_앤서블_IaC 개요 (0) | 2022.06.07 |