On 09.09.19 13:13, 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
Your indentation is incorrect. The last three lines need 2 spaces less
indentation each.
Sebastian
>
> 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
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail:
me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg /
http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537