Skip to content

How to Delete Files and Folders in a Directory using Ansible

If you need to delete files and folders in a directory using Ansible, then you can do the following:

- name: Delete content & entire directory file: state: absent path: /some/directory/path/
Code language: YAML (yaml)

See also  How to copy S3 objects between AWS accounts
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x