[ansible-devel] Ansible 2.1.5 and 2.2.2 RC1 are ready for testing

2017-02-21 Thread James Cammarata
Hi all, we're very happy to announce that RC1 for Ansible 2.1.5 and 2.2.2 are ready for testing! First and foremost, these release candidates address two security issues: * [SECURITY] (HIGH) handle some additional corner cases in the way conditionals are parsed and evaluated (both 2.1.5 and 2.2.2

Re: [ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread haad
Hi, I think you have some options but I'm not sure if they are usable for you 1) use validate option for each template this would need script/binary which can verify if generated document is correct or not. 2) Implement own filter which could be used to verify you input data - you need to

Re: [ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread vu001
Adam, thank you... I made ansible role for deploying specific configuration for application system which is developed by my company. Configuration consists of 20 configuration files per environment. For every of that configuration file I wrote jinja2 template. Variables are defined in inventory

Re: [ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread haad
Hi, Not able to raise an error would be one of reasons to not do it in template. Can you share more about your setup that could help. On Tue, Feb 21, 2017 at 3:14 PM, vu001 wrote: > How would you do that in playbook... > My playbook has only a few lines, all logic is done in templates. > I have

Re: [ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread vu001
How would you do that in playbook... My playbook has only a few lines, all logic is done in templates. I have maybe 300 variables per environment, if I all that do in playbook, then playbook would be pretty unreadable. This is done in the template, I check is var in some list (list contain poss

Re: [ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread haad
Hi, There is no such filter for that but you can do that with if. IMHO jinja template is not right place for validating variable values. Much better place would be playbook. On Tue, Feb 21, 2017 at 12:26 PM, vu001 wrote: > Hi, > > is it possible in Jinja2 template to define possible values for

[ansible-devel] Galaxy Outage Starting Friday, Feb 24 at 7:00 PM Eastern

2017-02-21 Thread Chris Houseknecht
Beginning Friday, Feb 24 at 7:00 PM Eastern we will be migrating Galaxy from its current hosting provider to EC2. As a result of the migration, Galaxy will be down for a short period of time. We do not anticipate the outage lasting for more than one hour. Please watch the mailing list for upda

[ansible-devel] [Question] Jinja2 template - check variable

2017-02-21 Thread vu001
Hi, is it possible in Jinja2 template to define possible values for some variable. Let say I have template config1.j2: parameter1={{var1 | default(1) }} parameter2={{var2 | default(2) }} parameter3={{var3 | default(3) }} So, I would like that to parameter1..3 must be assigned only values 1 or