티스토리 뷰
Samples
- name: Find files to delete
find:
paths: /home/mcpaint/backup
patterns: *.tar.gz
register: out
- name: Delete files to delete
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ out.files }}"
loop_control:
label: "{{ item.path }}"
Documents
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/find_module.html
참고 자료: http://www.freekb.net/Article?id=573
Remove files and directories using the file module
Add a Comment Comments
www.freekb.net
'DevOps > Ansible' 카테고리의 다른 글
| Ansible: When Variable Is – Defined | Exists | Empty | True (0) | 2021.06.22 |
|---|---|
| Ansible Vault 사용법 (0) | 2019.09.11 |
| How to use Ansible Vault (0) | 2019.09.11 |
| 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 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- rsync
- rundeck
- 엔서블
- openssl
- Password manager
- groovy
- Ansible
- DevOps
- 젠킨스
- Thread Dump
- vagrant
- Nexus
- Docker
- iTerm2
- nginx
- URL Encoding
- 쓰레드덤프
- Config History
- 파이프라인
- Linux
- 엔시블
- Jenkins
- Playbook
- 리눅스
- 플레이북
- JVM
- ssl
- 데브옵스
- PostgreSQL
- Shell Script
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 |
| 30 |
글 보관함