Got it! The two hyphens below the file module statement. Fixed it. Thanks 
again!

On Wednesday, 17 January 2018 11:08:25 UTC+5:30, Pranay Nanda wrote:
>
> Thanks!
>
> But this is what I was doing. I don't know how this is any different.
>
>
> <https://lh3.googleusercontent.com/-d4PdzHdvdWM/Wl7hPlGs3lI/AAAAAAAABYc/PWp5HBkFOqAc4Vys_2A08h-Sg_2ArjPlACLcBGAs/s1600/2018-01-17%2B11_07_26-Best%2BYAML%2BValidator%2BOnline%2B.png>
>
>
> On Tuesday, 16 January 2018 23:03:33 UTC+5:30, jhawkesworth wrote:
>>
>> You have syntax errors.  I recommend using a site like yamllint.com to 
>> make sure your playbooks are valid yaml when you are first getting used to 
>> ansible syntax.
>>
>> Try this instead
>>
>> ---
>>
>> - name: database playbook
>>   hosts: db
>>
>>   tasks:
>>     - name: ensure cloning directory exists
>>       file:
>>          path: /home/ansible/cloning
>>          state: directory 
>>       
>>
>>
>>
>>
>> On Tuesday, January 16, 2018 at 1:06:49 PM UTC, Pranay Nanda wrote:
>>>
>>> what's wrong with this?
>>>
>>> ---- hosts: db tasks: - file: - path: /home/ansible/cloning - state: 
>>> directory name: "create directory"
>>> It gives an error:ERROR! unexpected parameter type in action: <class 
>>> 'ansible.parsing.yaml.objects.AnsibleSequence'>The error appears to 
>>> have been in '/home/ansible/playbooks/clone.yml': line 4, column 7, but 
>>> maybe 
>>> elsewhere in the file depending on the exact syntax problem.The 
>>> offending line appears to be: tasks: - file: ^ hereThe error appears to 
>>> have been in '/home/ansible/playbooks/clone.yml': line 4, column 7, but 
>>> maybe 
>>> elsewhere in the file depending on the exact syntax problem.The 
>>> offending line appears to be: tasks: - file: ^ hereexception type: 
>>> <class 'ansible.errors.AnsibleParserError'>exception: unexpected 
>>> parameter type in action: <class 
>>> 'ansible.parsing.yaml.objects.AnsibleSequence'>The error appears to 
>>> have been in '/home/ansible/playbooks/clone.yml': line 4, column 7, but 
>>> maybe 
>>> elsewhere in the file depending on the exact syntax problem.The 
>>> offending line appears to be: tasks: - file: ^ here
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to