· 7 years ago · May 14, 2018, 08:12 PM
1---
2- name: "Create AWS VPC for {{ vpc.name }}"
3 ec2_vpc_net:
4 name: "{{ vpc.name }}"
5 cidr_block: "{{ vpc.cidr }}"
6 region: "{{ aws.region }}"
7 aws_access_key: "{{ access_key }}"
8 aws_secret_key: "{{ secret_key }}"
9 state: present
10 tags: '{{ tags | combine( { "Name": "blah" } ) }}'
11 register: vpc_output
12
13ERROR! Syntax Error while loading YAML.
14 did not find expected key
15
16The error appears to have been in '/media/shared/projects/preservible/epcp/roles/subnet/tasks/main.yml': line 12, column 34, but may
17be elsewhere in the file depending on the exact syntax problem.
18
19The offending line appears to be:
20
21 wait: yes
22 tags: "{{ tags | combine( { "Name": "blah" } ) }}"
23 ^ here
24We could be wrong, but this one looks like it might be an issue with
25missing quotes. Always quote template expression brackets when they
26start a value. For instance:
27
28 with_items:
29 - {{ foo }}
30
31Should be written as:
32
33 with_items:
34 - "{{ foo }}"