Error while setting lamp infrastrcture.

10 views
Skip to first unread message

Milind Sisodiya

unread,
Feb 6, 2017, 6:07:27 PM2/6/17
to Ansible Project
Hello All,
>
>  Actually I am new to ansible and trying to learn ansible from book ansible for Devops (By jeff Geerling ) .While setting Lamp Infrastructure in aws,i am facing some issue.If any one have idea to resolve these error.Please let me know.

>
> I have created following structure:
>
>  lamp-infrastructure
> configure.yml
> provision.yml
> requirements.yml
> inventories -->aws-->ec2.ini  ec2.py  inventory
> playbooks/
> db-->
> memcached-->
> varnish-->
> www --->
>
> provisioners--> aws.yml
>
> Can please help me to resolve these bugs.I am getting below error while running playbook.
>
> [root@ip-172-31-55-102 lamp-infrastructure]# ansible-playbook provision.yml
> ERROR! Syntax Error while loading YAML.
>
>
> The error appears to have been in '/etc/ansible/lamp-infrastructure/provisioners/aws.yml': line 97, column 8, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>           name: "{{ item.1.tagged_instances.0.public_ip }}"
>           groups: "aws,{{ item.1.item.group }},{{ item.1.item.name }}"
>        ^ here
> We could be wrong, but this one looks like it might be an issue with
> missing quotes.  Always quote template expression brackets when they
> start a value. For instance:
>
>     with_items:
>       - {{ foo }}
>
> Should be written as:
>
>     with_items:
>       - "{{ foo }}"
>


Johannes Kastl

unread,
Feb 7, 2017, 6:59:47 AM2/7/17
to ansible...@googlegroups.com
On 06.02.17 17:01 Milind Sisodiya wrote:

>> ERROR! Syntax Error while loading YAML.
>>
>>
>> The error appears to have been in '/etc/ansible/lamp-
> infrastructure/provisioners/aws.yml': line 97, column 8, but may

What is in this yml-file? The error can be in line 97, but not
necessarily.

If possible, include the whole file, maybe its indentation is wrong.

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