[ansible-project] Re: Extends template with ansible

2015-12-17 Thread Christophe Biguereau
Does anybody already use extends with variable in ansible ? Le mardi 15 décembre 2015 17:04:09 UTC+1, Christophe Biguereau a écrit : > > Hi all, > > I try to simplify my Nginx template by using extends template. To do that, > I follow the Jinja2 doc >

[ansible-project] Passing variables into files for syncing

2015-12-17 Thread Colin Byrne
Hey, so I have a number of essentially identical development servers which have a set of mostly-identical config files. In the config files are small configuration differences for each server, usually a differing API key or a differing host name, which will need to persist for the life of the

Re: [ansible-project] Passing variables into files for syncing

2015-12-17 Thread David Karban
Hi Colin, look at group_vars and host_vars directories: http://docs.ansible.com/ansible/intro_inventory.html Most of the settings will be in group_vars and whenever you will need different api key, or anything, you can add it to host_vars/ directory for that one host. Regards David Linux server

[ansible-project] Ansible gce module just hangs

2015-12-17 Thread shubhendu singh
ansible-playbook - --private-key=~/.ssh/google_compute_engine -i ansible_hosts site.yml PLAY [Create Compute Engine instances] TASK: [Bring up the instances in the first zone] ** <127.0.0.1> ESTABLISH CONNECTION FOR

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-17 Thread Brian Coca
since there is nothing apparent from the keys or values i'm going to guess you have a tab somewhere. -- Brian Coca -- 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

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-17 Thread Stavros
Even the syntax without any tabs, empty spaces,... brings the same error: - os_server_facts: server: W1 - debug: var: openstack_servers The offending line appears to be: - os_server_facts: server: W1 ^ here Regards Stavros -- You received this message because you are subscribed to the

[ansible-project] Re: Evaluate double-templated variable: "{{ versions_{{ choosen_app }} }}"

2015-12-17 Thread sirkubax
There was suggestion on irc channel to define it as: choosen_app_version: "{{ 'versions_' + choosen_app }}" still evaluates to choosen_app_version: versions_appA W dniu czwartek, 17 grudnia 2015 15:57:30 UTC+1 użytkownik sirkubax napisał: > > Is it possible to double template the vars?

[ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-17 Thread Stavros
Hi, I am trying to use the os_server_facts module, but I get a syntax error: The inventory file "oshost" contains only the following line: localhost ansible_connection=local The playbook "os_server_facts.yml" is a simple as the example given in the documentation: - os_server_facts:

[ansible-project] Evaluate double-templated variable: "{{ versions_{{ choosen_app }} }}"

2015-12-17 Thread sirkubax
Is it possible to double template the vars? vars: versions_appA: '1.2.3.4' versions_appB: '4.3.2.1' in tasks (for jinja template): the ideal would be (this is fake): - set_fact: choosen_app: 'appA' choosen_app_version: "{{ versions_{{ choosen_app }} }}" Expected result

Re: [ansible-project] Deploy Subnets into Different availability zones using Ansible.

2015-12-17 Thread Josh Smift
B> Hi I can only find all the subnets in the same availability zones which B> is us-east-1a only. I want each of my subnets into different B> availability zones in AWS. Hmm, I don't have any other great ideas, then -- setting the 'az' parameter in the elements of the 'subnets' list does the right

Re: [ansible-project] --skip-tags equivalent inside playbooks

2015-12-17 Thread Marc Patermann
Hi, Am 11.07.2014 um 21:30 Uhr schrieb Dmitry Makovey: On Wednesday, July 9, 2014 4:50:55 PM UTC-6, Michael DeHaan wrote: I'm asking is something more like: { role: roleA, use-tags: tagY } which would be similar to the CLI "--tags" except localized down to a roleA only and exectuting *only*

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-17 Thread Brian Coca
seems to be incorrectly indented, no sure if its just email formatting: - os_server_facts: server: W1 server should be indented farther in than os_server_facts, but only using spaces, no tabs. -- Brian Coca -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: Evaluate double-templated variable: "{{ versions_{{ choosen_app }} }}"

2015-12-17 Thread Josh Smift
There's no such thing as "double mustaches" -- once you're inside a {{ }} block, you're parsing Jinja. When I want to do something like this, I use a more complicated struct, like versions: appA: "1.2.3.4" appB: "4.3.2.1" and then you can say - set_fact: choosen_app: 'appA'

[ansible-project] ansible-galaxy github-token calling non-existant API endpoint

2015-12-17 Thread Bryan Hunt
Hi there, it seems an API endpoint may have vanished. >From - http://docs.ansible.com/ansible/galaxy.html Authenticate with Galaxy "If you do not wish to use your GitHub password, or if you have two-factor authentication enabled with GitHub,

Re: [ansible-project] Re: Evaluate double-templated variable: "{{ versions_{{ choosen_app }} }}"

2015-12-17 Thread sirkubax
Thanks Josh. I'm using that in other part of my inventory. I was looking for 'non_dict' variable since I had some issue passing json as extra-args in rundeck yaml job deffiniton. Well I gave it another try, and I did succede ;) Great just to show the example - id: xx

[ansible-project] SG access different per environment

2015-12-17 Thread Nicolas G
Hi, I have the bellow security groups that is working : name: modify sg_default rules local_action: module: ec2_group region: "us-east-1" vpc_id: "{{ vpcid }}" name: "test" rules: - proto: all cidr_ip: "{{ office_ip }}"

Re: [ansible-project] --skip-tags equivalent inside playbooks

2015-12-17 Thread Mike Biancaniello
I agree that I'd like to be able to have roll contain a number of tasks and then have then selective run. A use-tags or play-tags option would be nice to use in that case. While you can certainly implement that with vars (see #2 below), it seems that a tags solution would be more elegant.

[ansible-project] Re: Pass vault variables into large config vault file.

2015-12-17 Thread Alexey Vazhnov
May be you need to use big template with some vars stored in vault storage? On Friday, December 18, 2015 at 5:36:00 AM UTC+5, Colin Byrne wrote: > > > Hey, > > > So I have a large config file that needs to be encrypted when pushed to a > private repository. There are multiple server groups

[ansible-project] Re: Complex args + with_items ansible 2.0

2015-12-17 Thread Luca Berruti
Now I get a "DEPRECATION WARNING": [DEPRECATION WARNING]: Using variables for task params is unsafe, especially if the variables come from an external source like facts. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False

[ansible-project] Pass vault variables into large config vault file.

2015-12-17 Thread Colin Byrne
Hey, So I have a large config file that needs to be encrypted when pushed to a private repository. There are multiple server groups which it would be pushed too, so ideally I would be able to pass vars in to it, depending on the group. These vars would have to be encrypted as well. I