반응형
파일 권한 변경 (file 모듈)
playbook 예제
| ---
- hosts: all
remote_user: root
become: true
tasks:
- name: file permission change
file:
path: "/temp/test.sh"
mode: 0744
|
playbook 실행
ansible-playbook -i host.ini ./testplaybook

Managed node에서 결과 확인
파일 권한이 변경된 것을 확인할 수 있음.

반응형
'클라우드 > Ansible' 카테고리의 다른 글
| Ansible 원격지 파일 가져오기 (fetch 모듈) (0) | 2022.01.27 |
|---|---|
| Ansible command(shell) 실행 (0) | 2022.01.27 |
| Ansible file 전달 (copy 모듈) (0) | 2022.01.27 |
| Ansible directory 생성 (file 모듈) (0) | 2022.01.27 |
| 06. Ansible lookup (0) | 2022.01.09 |