I’ve been fighting this for 3 days now. I’m a very rusty Ansible coder (been almost 6 years since I last did any) and I don’t know what’s wrong with this code:
- name: “Remove Expired Temp Sudo Files”
ansible.builtin.file:
path: “{{ etc/sudoers.d }}”
name: “{{ item }}”
state: absent
loop: “{{ expired }}”
The syntax checker only tells me this:
not find expected ‘:’
The error appears to be in ‘/home/METNET/mhaney/enforce_sudo.v4.yml’: line 29, column 13, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
ansible.builtin.file
path: /etc/sudoers.d/
^ here
Any ideas?
- Set at least one tag (the experts follow the tags, so the right people will find you if you tag)