Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Deploy None File
- become: true
- hosts: all
- remote_user: root
- tasks:
- - name: Find Directories without None file
- shell: find /root/recursive/repos/* -type d \! -exec test -e '{}/None' \; \( ! -name "lights" \) \( ! -name "house" \) \( ! -name "sectors" \) \( ! -name "towers" \) \( ! -name "gas" \) \( ! -name "cars" \) \( ! -name "command" \) \( ! -name "space" \) \( ! -name "dark" \) \( ! -name "corner" \) \( ! -name "info" \) \( ! -name "permission" \) -print
- register: directories
- - name: Copy Blank Image
- copy: src=blank.jpg dest={{ item }}
- with_items:
- - "{{ directories.stdout_lines }}"
- when: directories.changed
- - name: Remove None File
- shell: find /root/recursive/repos/ -maxdepth 3 -iname 'blank*' -type f -exec rm {} \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement