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