It appears to be because you are setting a variable to itself:

aws_region={{ aws_region }}

Without trying it, you may just be able to omit providing that, because the
variable is already defined as you want it.

Otherwise, you will have to change the name of one of those variables.

On Sunday, November 15, 2015, Rob Wilkerson <[email protected]> wrote:

> I have a playbook that runs 2 plays and then includes a playbook from
> another project. When calling the external playbook, it attempts to pass
> along a couple of variables so that the external playbook has the proper
> context. The playbook looks like this:
>
> - name: Launch any new EC2 instances
>   hosts: local
>   gather_facts: false
>   roles:
>     - { role: ec2, server_type: web, server_type_abbrev: web, when: "'web'
> in server_types" }
>
> - name: Configure new EC2 instances
>   hosts: ec2_instances
>   become: yes
>   become_method: sudo
>   gather_facts: true
>   roles:
>     - common/server-config/essentials
>     - common/server-config/github
>
> - name: Deploy the Project
>   include: "../../project/ansible/aws.yml target_env={{ env }}
> aws_region={{ aws_region }}"
>
> If I remove the `aws_region` variable from the playbook include, all is
> well. With it in, though:
>
>  [WARNING]: non fatal error while trying to template play variables:
> Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: Failed to template {{ aws_region }}: Failed to
> template {{ aws_region }}: recursive loop detected in template string: {{
> aws_region }}
>
> What am I doing wrong here?
>
> Thanks.
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f71f69f9-70e9-4709-bb9d-3e9bbc75e1fe%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f71f69f9-70e9-4709-bb9d-3e9bbc75e1fe%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v-JfZ10efFeWxh3Wx1wv09DObT%3D7s1%2BHQNDZK61frpGPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to