I am using ansible copy module to copy a file. The linter tells me "File permissions unset or incorrect" and I don't understand the problem.
Here is the ansible task
- name: Ensure some.txt is there
copy:
src: some.txt
dest: "{{ some_path }}/some.txt"
force: false
mode: '644'
Where some.txt is a file that exists in the ansible/files directory.
I have also tried with mode: 0644 but no luck.
My ansible version:
$ ansible-lint --version
ansible-lint 5.0.7 using ansible 2.10.8
Restarting the editor fixed it, but that's not really an answer. Any ideas?
You just need to specify mode: 0644 in your playbook and it will be all good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With