I'm getting the below error for my playbook.
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to be in '/app/test1.yml': line 12, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: "Logging the deployments"
^ hereBelow is my playbook which I thought should work.
>
---
-name:"Find the details here "
hosts:localhosttasks:
\-name:"Logging the deployments" localaction:copy content="HELOOOOO"dest="\{\{ playbook\_dir \}\}/vars/newfile\.yaml" with\_fileglob: \-"\{\{ playbook\_dir \}\}/tmpfiles/\*"
>
Is localaction along with copy not considered a module ?
How can I get this to work? Please help me understand.
The keyword is local_action instead of localaction (see
https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html). Also your indentation looks suspicious.
Regards
Racke