On 9/9/19 1:13 PM, Manish Kumar wrote:
> Hi,
> 
> Please help me with this error which I am getting below :
> 
> play-book:
> 
> ---
> - name: Directory creation with current date
>   hosts: local
>   user: manish
>   sudo: yes
> 
>   tasks:
> 
>   - name: Ansible fact - ansible_date_time
>      shell: date.sh
>      args:
>        chdir: /home/manish/mk/ansible/linux/
> 
> Error: 
> 
> ERROR! Syntax Error while loading YAML.
>   mapping values are not allowed in this context
> 
> The error appears to be in '/home/manish/mk/ansible/linux/main.yml': line 10, 
> column 11, but may
> be elsewhere in the file depending on the exact syntax problem.
> 
> The offending line appears to be:
> 
>   - name: Ansible fact - ansible_date_time
>      shell: date.sh
>           ^ here

Fix your indentation, it should look like that:

- name: Ansible fact - ansible_date_time
  shell: date.sh
  args:
    chdir: /home/manish/mk/ansible/linux/

It really doesn't hurt to thoroughly read the error message and look at the 
documentation basics.

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
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4cfc2c01-862f-4768-97fd-331c4c5cce97%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4cfc2c01-862f-4768-97fd-331c4c5cce97%40googlegroups.com?utm_medium=email&utm_source=footer>.


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

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7edcbd6a-9783-8009-52bd-91e594d017d5%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to