ansible
ansible 간단 명령어
fendys
2021. 8. 18. 21:07
반응형
ping
- 모든 hosts 그룹에 ping 테스트
ansible hosts -m ping
command
- 모든 hosts 그룹에 ls -al 명령어 수행
ansible hosts -m command -a "ls -al"
파일전송 put
- Ansible 서버의 example.txt 파일을 모든 hosts에 test.txt 파일명으로 업로드
ansible hosts -m copy -a "src=~/example.txt dest=~/test.txt"
파일전공get
- 모든 hosts의 test.txt 파일을 Ansible 서버의 example 디렉토리 하위에 다운로드
ansible hosts -m fetch -a "src=~/test.txt dest=~/example"
반응형