On Friday, 26 December 2014 05:05:33 UTC-5, Catalin Costache wrote:
>
> Yaml has a notation for multiline string. I set user data like so:
>
> user_data: |
> #!/bin/bash
> echo "Defaults:{{admin_user}} !requiretty" > /etc/sudoers.d/
> disable_requiretty
>
I'm having trouble using this notation.
- ec2_lc:
name: "{{env}}-render-premium-{{gitsha}}"
...
user_data: |
{
"services": ["worker-render-premium@4100"],
"autoScalingGroupName": "{{env}}-render-premium"
}
but when I do a `curl http://169.254.169.254/latest/user-data` to read it
back I get:
{'services': ['worker-render-premium@4100'], 'autoScalingGroupName':
'staging-render-premium'}
The loss of whitespace I can deal with, but translating double quotes into
single quotes makes this invalid JSON and breaks things.
I'm using ansible 1.9.4. Even with -vvvv user_data isn't printed.
--
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/6efef246-c6d5-4c3b-aef0-fb0baaf19c55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.