Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Delete file from dir whthout xrw permission for user
- hosts: host_name
- tasks:
- - name: Delete file by mask with extra variable
- become: yes
- become_user: root
- become_method: sudo
- shell: rm /dir_name/another_dir_name/{{ numb }}*.txt
- # Example: ansible-playbook rm.yml --ask-become-pass --extra-vars "numb=4"
Add Comment
Please, Sign In to add comment