[ansible-project] using a "when" for setting environment ?

2017-05-08 Thread Stephen Tan
Will this work? environment: http_proxy: "{{ apt_mirror }}" when: use_apt_mirror So, I only want to set the environment variable when the var "use_apt_mirror" is true. There is no obvious documentation to suggest that this won't work. -- You received this message because you are

[ansible-project] ansible-pull, and upgrading ansible

2017-02-28 Thread Stephen Tan
Hi all I have an interesting situation which I think the very clever people here could probably help me with. Our use case for ansible: - We use ansible pull which runs a local connection. It allows us to scale nicely without the need for a master host. - ansible pull is set in a cron job

[ansible-project] How to get ec2 instance id tag when it's in an autoscaling group - a Jinja2 escaping problem?

2015-03-17 Thread Stephen Tan
Sounds simple, but it isn't. I want to create a variable called instance_role which is set to the aws:autoscaling:groupName on the instance. However, there is a formatting problem as the colons are used by Jinja and I can't figure out how to escape them. The role: --- - name: Get our

[ansible-project] Re: How to get ec2 instance id tag when it's in an autoscaling group - a Jinja2 escaping problem?

2015-03-17 Thread Stephen Tan
2015 09:16:48 UTC, Stephen Tan wrote: Sounds simple, but it isn't. I want to create a variable called instance_role which is set to the aws:autoscaling:groupName on the instance. However, there is a formatting problem as the colons are used by Jinja and I can't figure out how to escape

[ansible-project] Re: ec2_lc - launch configuration user data - uploads to aws OK but disappears!!

2015-03-16 Thread Stephen Tan
}}] instance_type: {{ item.instance_type }} instance_profile_name: standard-instance user_data: {{ item.user_data }} with_items: lc_list On Monday, 16 March 2015 09:57:08 UTC, Stephen Tan wrote: Hi all Got a weird issue where I'm trying upload a bash script as user-data - via

[ansible-project] Re: ec2_lc - launch configuration user data - uploads to aws OK but disappears!!

2015-03-16 Thread Stephen Tan
2015 09:57:08 UTC, Stephen Tan wrote: Hi all Got a weird issue where I'm trying upload a bash script as user-data - via the launch config module. Any help regarding this is appreciated - even if it's a method of debugging this - there are no errors which is why I'm confused. I'm sucking

[ansible-project] ec2_lc - launch configuration user data - uploads to aws OK but disappears!!

2015-03-16 Thread Stephen Tan
Hi all Got a weird issue where I'm trying upload a bash script as user-data - via the launch config module. Any help regarding this is appreciated - even if it's a method of debugging this - there are no errors which is why I'm confused. I'm sucking in the user-data as a file which seems

[ansible-project] Seemingly simple template driving me mad

2014-11-24 Thread Stephen Tan
Hi - I'm doing something which seems very simple - trying to create a file from a jinja template. Here are my vars: export_root: host: 81.187.209.128/27 options: rw,fsid=0,insecure,no_subtree_check,async exports: video: host: 81.187.209.128/27 options:

[ansible-project] Re: Seemingly simple template driving me mad

2014-11-24 Thread Stephen Tan
Thank you for the response - I see - I'll test later - I am sure you are correct. thanks again On Monday, 24 November 2014 14:47:18 UTC, Quentin Stafford-Fraser wrote: Hi Stephen - There may be some clever Jinja magic going on here, but if this were just Python... * exports, as you've

[ansible-project] Re: Seemingly simple template driving me mad

2014-11-24 Thread Stephen Tan
Thank you for the response - I see - I'll test later - I am sure you are correct. thanks again On Monday, 24 November 2014 14:47:18 UTC, Quentin Stafford-Fraser wrote: Hi Stephen - There may be some clever Jinja magic going on here, but if this were just Python... * exports, as you've