Re: [ansible-project] No action Detected Error for localaction module

8 views
Skip to first unread message

Dick Visser

unread,
Aug 29, 2019, 4:17:26 AM8/29/19
to ansible...@googlegroups.com
The module is called local_action - you forgot the underscore.

On Thu, 29 Aug 2019 at 08:36, Mohtashim S <mohta...@gmail.com> wrote:
>
> 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"
>> ^ here
>
>
> Below is my playbook which I thought should work.
>
> ---
> - name: "Find the details here "
> hosts: localhost
>
> tasks:
>
> - 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.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5463fc9a-395f-4362-bf02-27815aeac076%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Stefan Hornburg (Racke)

unread,
Aug 29, 2019, 4:19:24 AM8/29/19
to ansible...@googlegroups.com
On 8/29/19 8:35 AM, Mohtashim S wrote:
> 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"
>       ^ here
>
>
> Below is my playbook which I thought should work.
>
> |
> ---
> -name:"Find the details here "
>   hosts:localhost
>
>   tasks:
>
>     -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

>
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> <https://groups.google.com/d/msgid/ansible-project/5463fc9a-395f-4362-bf02-27815aeac076%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc
Reply all
Reply to author
Forward
0 new messages