Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. file: dest=/foo/bar/somedir owner=root group=apache mode=0775 recurse=yes
  2.  
  3. - name: Ensure directories are 0755
  4. command: find {{ path }} -type d -exec chmod 0755 {} ;
  5.  
  6. - name: Ensure files are 0644
  7. command: find {{ path }} -type f -exec chmod 0644 {} ;
  8.  
  9. chmod -c -R ug=rw,o=r,a-x+X "{{top_dir}}"
  10.  
  11. - name: recursive chmod example
  12. command: |
  13. chmod -c -R ug=rw,o=r,a-x+X "{{item}}"
  14. register: chmod_status
  15. changed_when: chmod_status.stdout != ""
  16. with_items:
  17. - "/home/user/sample/dir"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement