티스토리 뷰
개요
shell 이나 command 모듈을 사용하게 되면 아래와 같은 메시지가 나올 때가 있다.
뭐 요약하자면 file module 있으니 그거 사용하라는 말.
[WARNING]: Consider using the file module with state=absent rather than running rm. If you need to use command
because file is insufficient you can add warn=False to this command task or set command_warnings=False in
ansible.cfg to get rid of this message.
그럼 어떻게 설정하나?
두가지 방식
1. ansible.cfg 에서 전역 설정
2. task에서 설정
ansible.cfg
[defaults]
command_warnings = False
task
- name: test
shell: rm -f /home/paint/test.txt
args:
warn: false
'DevOps > Ansible' 카테고리의 다른 글
Ansible: UNREACHABLE!: Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive) (0) | 2019.04.26 |
---|---|
Ansible: Yaml 데이터 출력 시 앞에 u 붙을 경우 제거하는 방법 (0) | 2019.01.25 |
Include Playbook (Playbook 에서 Playbook 인클루드) (0) | 2018.08.27 |
[Ansible/엔시블/엔서블] Ansible 교육 자료 - 02. Playbooks (1) | 2018.08.23 |
[Ansible/엔시블/엔서블] Ansible 교육 자료 - 01. Introduction (2) | 2018.08.23 |
[Ansible/엔시블/엔서블] 스크립트 예제 모음 (0) | 2018.02.19 |
[Ansible/엔시블/엔서블] Ignoring invalid attribute: sudo 오류 (0) | 2017.12.07 |
Ansible (엔시블/엔서블) 교육 자료 (0) | 2017.08.08 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Docker
- 데브옵스
- groovy
- Ansible
- rsync
- Password manager
- rundeck
- Thread Dump
- 쓰레드덤프
- DevOps
- 리눅스
- 파이프라인
- 엔서블
- nginx
- Shell Script
- 엔시블
- 젠킨스
- openssl
- 플레이북
- iTerm2
- Playbook
- vagrant
- PostgreSQL
- Linux
- ssl
- Nexus
- Config History
- Jenkins
- URL Encoding
- JVM
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함