romach
4/23/2017 - 9:30 AM

Change file permissions

Change file permissions

# in one line
- name: Set file mode for `/tmp/hosts` to 777
  file: path=/tmp/hosts mode=0777
  
# in several lines
- name: Set file mode for `/tmp/hosts` to 777
  file: 
    path: /tmp/hosts
    mode: 0777