[ansible-project] Examples of diverse large and inventories

2018-03-16 Thread Serge van Ginderachter
, managing group_vars files becomes very cumbersome, and impossible to keep a good overview. What are the problems you get, when doing inventory at a larger scale? Thanks! Serge -- Forwarded message -- From: Serge van Ginderachter <se...@vanginderachter.be> Date: 10 March 2018 at

[ansible-project] Re: [ansible-devel] Ansible 2.0.0 beta2 update

2015-10-28 Thread Serge van Ginderachter
FWIW, it might be interesting to document and publish the release procedure. On 28 October 2015 at 19:27, James Cammarata wrote: > Hey all, we noticed a small packaging mistake with the beta2 tar.gz on our > release site, in which the modules were not the latest

Re: [ansible-project] Forcing a stop on failure

2015-10-21 Thread Serge van Ginderachter
On 21 October 2015 at 20:44, Guy Matz wrote: > At specific points within the roles foo and bar I would like to stop the > run if there are failures, most importantly, I do not want set_c to get > updated. Any thoughts are greatly appreciated! ​There's the fail module for

Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread Serge van Ginderachter
In my experience, OOM's happen when the inventory is large, especially when having lots of variables in the inventory, combined with lots (several hundreds) of hosts. Not very scientific, but to get a rough idea on the size of your inventory, could you show the output of $ time (ansible all -m

Re: [ansible-project] Looping over a hash Subelement

2015-09-25 Thread Serge van Ginderachter
Can you show the task how you try that? On 25 September 2015 at 18:50, Luis Óscar Ramos Carreón < luissqu...@gmail.com> wrote: > Hi, > > I would like to do something like the example in Looping over Subelements > >

Re: [ansible-project] Looping over Subelements

2015-09-06 Thread Serge van Ginderachter
On 5 September 2015 at 16:35, Sacha Vukovic wrote: > I try to understand how works looping overs subelements, after reading > this loops_subelements > > I > had copy & past the example and

Re: [ansible-project] ansible - sub groups in ansible hosts file or conceptual equivalent

2015-09-01 Thread Serge van Ginderachter
You can define children groups like this: ​ [biggroup > ​:children​ > ] > subgroup1 > subgroup2 > > [subgroup1] > 1.1.1.1 > > [subgroup2] > 2.2.2.2 > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Is there something like puppet librarian or R10K for Ansible?

2015-09-01 Thread Serge van Ginderachter
​This could all be possible within ini files, in theory, but as I said that would scale badly for a larger environments. Thoughts? Serge van Ginderachter (svg on irc, srvg on github) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To u

Re: [ansible-project] Is it possible to use variable in inventory

2015-08-30 Thread Serge van Ginderachter
On 30 August 2015 at 12:23, Chenxiong Qi qcxh...@gmail.com wrote: a file inventory/myhost, it contains following line myhost ansible_ssh_host={{ myhost_ip_address }} ​the variable ​ ansible_ssh_hos ​t​ will just be available for that host you can also access it from another host as

Re: [ansible-project] Re: Is there something like puppet librarian or R10K for Ansible?

2015-08-30 Thread Serge van Ginderachter
On 30 August 2015 at 17:31, Jeffrey Lee le...@g.harvard.edu wrote: Perhaps I'm missing it but when you say inventory data do yo meant he hosts in the inventory file? how do you specify specific versions of roles in the inventory file. I am in the midst of Googling it but figured I would see

Re: [ansible-project] Re: Is there something like puppet librarian or R10K for Ansible?

2015-08-29 Thread Serge van Ginderachter
On 29 August 2015 at 22:38, James Martin jmar...@ansible.com wrote: Check this out: http://docs.ansible.com/ansible/galaxy.html#advanced-control-over-role-requirements-files ​This sets one time requirements on which role to install​ when starting up a project, this by no means manages

Re: [ansible-project] Manage Inventory in Ansible

2015-08-19 Thread Serge van Ginderachter
# Inventories/inv1 [atlanta] xyz.com [europe] abc.com I need to have group variables for production in a way like Inventories/group_vars/production which is specific to Prod. #Inventories/group_vars/production --- url: 'jnp://mqendpoint.company.com:1099' env: 'Production' How can

Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread Serge van Ginderachter
On 19 August 2015 at 19:02, senorsmile senorsm...@gmail.com wrote: the when: of the include: gets run AFTER the with_xxx of the child file? This doesn't make any sense to me. If you are conditionally including a file, NOTHING in that file should be processed. I am not being combative, but

Re: [ansible-project] Re: Manage Inventory in Ansible

2015-08-19 Thread Serge van Ginderachter
On 19 August 2015 at 19:43, satheesh kumar infosatheesh2...@gmail.com wrote: Can you help me how to refer the group inside Inventories/Inventory1 ? ​​ - ​i Inventories don't do -i Inventories/production - at least not how your example is laid out.​ -- You received this message

Re: [ansible-project] Group of groups

2015-08-12 Thread Serge van Ginderachter
Right now, your only option is to run that playbook separately, setting --limit to db1 and db2 respectively. I have a similiar use case, where i deploy clusters, and want to serially run the deploy on each node of the cluster, whilst running all clusters in parallel. So that would be: -

Re: [ansible-project] Group of groups

2015-08-12 Thread Serge van Ginderachter
On 12 August 2015 at 15:26, trupti mali truptikm...@gmail.com wrote: Thanks. I read about limit as well. But does it work with groups of hosts? I saw examples of ips and some conditions. ​yes, it basically accepts the same constructs as hosts: etc​ -- You received this message because you

Re: [ansible-project] idea: allow group_vars/ and host_vars/ files to be organised in sub folders

2015-08-08 Thread Serge van Ginderachter
On 7 August 2015 at 20:17, r.bettri...@vehikl.com wrote: I just tried this on 1.9.1 I have /group_vars/staging/staging.yml and /group_vars/staging/secrets.yml and it seems to me that it is not merging the files properly. I have an api variable in the staging file which doesnt exist in the

Re: [ansible-project] how to abort execution upon a single fail on any host

2015-07-29 Thread Serge van Ginderachter
On 29 July 2015 at 14:49, Leon Xie qdxiaoli...@gmail.com wrote: max_fail_percentage: ​Perhaps ​any_errors_fatal: true might help? (btw Seems undocumented) -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and

Re: [ansible-project] empty ansible.cfg in current directory changes the action of ansible-playbook ?

2015-07-13 Thread Serge van Ginderachter
Ansible needs a well configured ansible.cfg to work reliably. I don't think it will fallback on defaults for everything it needs. At least the inventory needs to be set properly. If there is one in the current directory, it will use that, so if you make that empty, it will just miss a lot of

Re: [ansible-project] group_vars on many groups ?

2015-07-05 Thread Serge van Ginderachter
On 2 July 2015 at 17:05, Charly Koza c...@f4-group.com wrote: Hello ! I somehow need to - assign applications to groups of hosts - have a host in several groups in the platform - get the list of deployed applications in the platform - be able to get the list of hosts with the application.

Re: [ansible-project] Grouping of serial tasks

2015-05-13 Thread Serge van Ginderachter
There is no way to do such a thing properly, I'm afraid, but I have been wanting this feature myself. My use case is similar: I have lots of clusters, that are managed by the same setup type (the same roles), but deploy a different application (different inventory vars), and I'd like to deploy

[ansible-project] Re: [ansible-devel] New policies for Extras Modules

2015-05-11 Thread Serge van Ginderachter
​This sounds good.​ On 11 May 2015 at 21:18, Greg DeKoenigsberg g...@ansible.com wrote: This leaves some open questions that we'll need to sort out: * How will we know who the module owner is? One option: we ask owners to put their names and github IDs into the module itself. Another

Re: [ansible-project] NEWB howto modify /etc/apt/sources.list

2015-04-22 Thread Serge van Ginderachter
On 22 April 2015 at 19:03, Tim Jabaut tjab...@gmail.com wrote: I am trying apt_repositoy but getting errors. ​it might help to paste those exact errors ​ -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and

Re: [ansible-project] NEWB howto modify /etc/apt/sources.list

2015-04-22 Thread Serge van Ginderachter
On 22 April 2015 at 19:42, Tim Jabaut tjab...@gmail.com wrote: Any suggestions? ​a link to a screen​shot? -- 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

Re: [ansible-project] NEWB howto modify /etc/apt/sources.list

2015-04-22 Thread Serge van Ginderachter
On 22 April 2015 at 20:00, Tim Jabaut tjab...@gmail.com wrote: ​​ ansible mediaserver -m apt_repository -a 'repo=deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free state=present' ​your quoting is bad here ​​ansible mediaserver -m apt_repository -a 'repo=deb

Re: [ansible-project] Dynamic inventory script (--host flooding)

2015-04-21 Thread Serge van Ginderachter
On 21 April 2015 at 16:28, spezam spe...@gmail.com wrote: I do really want to avoid to iterate through each host (instead of using arrays) and produce duplicate data... ​I don't understand this.​ Using the meta key allow you to return all host variables in respins to the --list call to the

Re: [ansible-project] Dynamic inventory script (--host flooding)

2015-04-21 Thread Serge van Ginderachter
use the '_meta' key http://docs.ansible.com/developing_inventory.html#tuning-the-external-inventory-script On 21 April 2015 at 13:14, spezam spe...@gmail.com wrote: Hello, I'm trying to develop a script for dynamic inventory, following this (poor) documentation

Re: [ansible-project] Emulating host_vars and group_vars for files

2015-04-18 Thread Serge van Ginderachter
On 18 April 2015 at 17:19, Anand Buddhdev arh...@gmail.com wrote: On Saturday, 18 April 2015 17:01:16 UTC+2, Serge van Ginderachter wrote: Hi Serge, On 18 April 2015 at 15:51, Anand Buddhdev arh...@gmail.com wrote: 1. the order of the names in group_names does not match the inventory

Re: [ansible-project] Variable precedence in a group hierarchy

2015-04-17 Thread Serge van Ginderachter
On 17 April 2015 at 17:31, Sandra Parsick sandra.kosma...@googlemail.com wrote: So my question, why my expectation is wrong? ​yes, it's a feature, not a bug :) Io just answered the same question on https://github.com/ansible/ansible/issues/10755, so copy pasting my answer: This is a feature

Re: [ansible-project] My Favorite Module

2015-04-07 Thread Serge van Ginderachter
Well, it's nice you ask. I have a specific module in use, that might interest some people. I am using a custom module I wrote about two years ago, and which has evolved to something pretty stable, at least for my use case:

Re: [ansible-project] Patching through playbook!!!

2015-03-25 Thread Serge van Ginderachter
On 24 March 2015 at 11:55, aditya patnaik aditya@gmail.com wrote: *- hosts: all* *- name: Add update to patch list* * command: xe patch-upload file-name=/root/PATCH/{{ update_filename }}* * register: uuid* *- name: Install update to all servers in the pool* * command: xe

Re: [ansible-project] Patching through playbook!!!

2015-03-25 Thread Serge van Ginderachter
:facepalm: You need to fix your indentation. Please read docs on how yaml is structured, then come back :) On 25 March 2015 at 07:51, aditya patnaik aditya@gmail.com wrote: Thank you Serge van Ginderachter for replying :-) But is still get the error after adding tasks

Re: [ansible-project] playbook pause and tag madness!

2015-03-24 Thread Serge van Ginderachter
On 24 March 2015 at 11:20, Martin mar...@marcher.name wrote: Maybe a solution would be to put this information somewhere in the documentation where it is more visible? ​Agreed, it might help to explain that the order in which you write the different tasks​ blocks, don't affect the execution

Re: [ansible-project] playbook pause and tag madness!

2015-03-24 Thread Serge van Ginderachter
Steve, 1. First roles with tags not work as expected (yes saw some post and people saying you need to agg at the command line ​Well, if you tread those posts, why are you still expecting tags to work in another way than people explained you already?​ My play book like this - name: ctn

Re: [ansible-project] Global HTTP proxy setting for all roles/tasks?

2015-03-19 Thread Serge van Ginderachter
AFAIK, that is not possible, but it would be an important feature. Proxy support is too often forgotten in a lot of applications. On 19 March 2015 at 10:08, Timo Ahokas timo.aho...@gmail.com wrote: Hi, We're working in an environment where all access outside needs to go through HTTP/HTTPS

Re: [ansible-project] register: variable as {{item}}?

2015-03-15 Thread Serge van Ginderachter
On 15 March 2015 at 05:55, Rick Kasten rickkas...@gmail.com wrote: Nothing's stopping me. I don't know what you're referring to. ​I meant, don;t use the jinja variable construct on register, just a plain variable. A registered variable on with_items will have a list of registered results.

Re: [ansible-project] register: variable as {{item}}?

2015-03-14 Thread Serge van Ginderachter
What's stopping you from registering this loop task with one variable? The iterated results get registered in a .results list . On 14 March 2015 at 20:19, Rick Kasten rickkas...@gmail.com wrote: - shell: alternatives --display {{ item }} | grep best | grep jre1.7.0_75 sudo: yes register:

[ansible-project] Re: [ansible-devel] Ansible 1.9.0 rc1 is now available

2015-03-11 Thread Serge van Ginderachter
On 11 March 2015 at 00:08, James Cammarata jcammar...@ansible.com wrote: $ git checkout v1.9.0-0.1.rc1 $ . hacking/env-setup After which time you can run ansible and ansible-playbook like normal. If you're not familiar with the hacking/env-setup script, please refer to the documentation

Re: [ansible-project] group name or inventory file name in tasks or jinja

2015-03-09 Thread Serge van Ginderachter
On 9 March 2015 at 18:18, Marc Patermann hans.mo...@ofd-z.niedersachsen.de wrote: # test: [*webserver-tes*t] foo1 server2 # production [webservers-prod] foo2 server1 How can I check in the task and in jinja templates, if the host is in test or production? I asked something related

Re: [ansible-project] script module

2015-03-06 Thread Serge van Ginderachter
On 6 March 2015 at 10:46, Dag Wieers d...@wieers.com wrote: (Or we could decide to always template when script is used ?) ​Given the extra processing and slow down that kicks in with templat​es, I'd rather not. -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Problem grouping inventory directory files

2015-03-06 Thread Serge van Ginderachter
On 6 March 2015 at 12:15, John McNulty johnm...@gmail.com wrote: # inventory/poc [poc:children] poc-app poc-db - And repeat my test $ ansible-playbook poc.yml --list-hosts ERROR: child group is not defined: (poc-app) ​Just add to that last file these two empty entries: [poc-app]

Re: [ansible-project] script module

2015-03-06 Thread Serge van Ginderachter
On 6 March 2015 at 18:47, Craig White white.n...@gmail.com wrote: given that I am a newbie, my opinions lack perspective. I think the 'script' command should be able to be gathered from a template because ansible is just a glorified shell script manager anyway and why keep it emasculated?

Re: [ansible-project] script module

2015-03-06 Thread Serge van Ginderachter
On 6 March 2015 at 19:00, Matt Martz m...@sivel.net wrote: In my non-humble opinion, I think templating a shell script or any script for that matter is pretty terrible. ​That could do terrible things yes :)​ ​But I could see use cases. Instead of templating a separate config file, just

Re: [ansible-project] Best client platform to run Ansible from?

2015-03-04 Thread Serge van Ginderachter
On 4 March 2015 at 16:55, Adam Miller maxamill...@fedoraproject.org wrote: I think a distro with python 2.7.x and the latest version of OpenSSH client would be good candidates ​+1 Especially avoid older OpenSSH that don't support ControlMaster​ -- You received this message because you

Re: [ansible-project] Trying to create ansible playbook to reboot servers and getting an error

2015-03-04 Thread Serge van Ginderachter
On 4 March 2015 at 12:33, codfather swcodfat...@gmail.com wrote: ERROR: command is not a legal parameter at this level in an Ansible Playbook ​You are writing only *tasks* here and you put them on playbook level.​ You need to wrap them in a playbook declaration. -- You received this

Re: [ansible-project] Properly wait for apache to run before inserting into load balancer

2015-03-04 Thread Serge van Ginderachter
On 4 March 2015 at 21:11, Samnang Sen samnang@gmail.com wrote: What's a good way to make sure Apache is running prior to running the post task section? ​perhaps doing the uri module in a loop, until some standard healthcheck page is returned​ -- You received this message because you

Re: [ansible-project] List in inventory file variables ?

2015-02-26 Thread Serge van Ginderachter
On 26 February 2015 at 13:08, Florent B flor...@coppint.com wrote: How can I do ? ​Don't define complex vars in the ini hosts file, use group/host_vars file​ or playbook vars for that. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To

Re: [ansible-project] Error when combining variables

2015-02-24 Thread Serge van Ginderachter
On 24 February 2015 at 14:21, Jiri jiri@gmail.com wrote: The question is why it's even trying to merge the two variables? I would expect the variable to be replaced and not merged as per default setting hash_behaviour=replace in ansible.cfg. ​That reason seems to be, merging happens on

Re: [ansible-project] skip-tags doesn't work for handlers

2015-02-23 Thread Serge van Ginderachter
On 23 February 2015 at 13:15, Ivaylo Bratoev ivaylo.brat...@gmail.com wrote: Both are the same... Just a different ways to write YAML. ​Not exactly, both are equivalen notations that ansible parses​, the former being pure yaml :) -- You received this message because you are subscribed to the

Re: [ansible-project] working with multiple lists.. one defining the other?

2015-02-23 Thread Serge van Ginderachter
Given your example, pretty simple: with_flattened: user_groups But that only works to feed a task. The new feature I referred to, is brand new, I didn't use it yet, but that would roughly translate to {{ lookup('flattened', user_groups, want_list=True) }} On 22 February 2015 at 20:49,

Re: [ansible-project] F5 disable pool/node

2015-02-22 Thread Serge van Ginderachter
On 21 February 2015 at 20:42, Greg Andrews hvar...@gmail.com wrote: Unfortunately, company policy won't let me share an example. I wanted to indicate the general idea that we set up keys for ssh access to our F5 devices and use the Ansible shell module to run tmsh commands in them. It's not

Re: [ansible-project] backreference to 'all hosts in scope of current task'?

2015-02-22 Thread Serge van Ginderachter
On 22 February 2015 at 14:37, Nusenu nus...@openmailbox.org wrote: Is there a way to say loop over all hosts in scope of current task? ​The special variable​ 'play_hosts' is what you are looking for.

Re: [ansible-project] String to vars not working anymore in Ansible v1.8.x

2015-02-22 Thread Serge van Ginderachter
On 22 February 2015 at 14:35, Khuong Dinh Pham khuon...@gmail.com wrote: ​​ {{ vars['prefix_' + {{ item.env }} + '_postfix' ] | get_something }} ​I'm not sure this would have worked in older versions.​ Either way, don't nest those braces, just use plain variables: ​{{ vars['prefix_' +

Re: [ansible-project] String to vars not working anymore in Ansible v1.8.x

2015-02-22 Thread Serge van Ginderachter
On 22 February 2015 at 19:30, Khuong Dinh Pham khuon...@gmail.com wrote: ​{{ vars['prefix_' + item.env + '_postfix' ] | get_something }} This is not working anymore in v1.8.4 If I switch back to v.1.7.2 it's working fine. However if I type ​{{ prefix_main_postfix | get_something }} in

Re: [ansible-project] F5 disable pool/node

2015-02-21 Thread Serge van Ginderachter
​Greg,​ On 21 February 2015 at 02:11, Greg Andrews hvar...@gmail.com wrote: This is just a data point from a site that uses Ansible and has F5 load balancers. Our network admin has written playbooks that use ssh and invoke the F5 tmsh command-line utility to do things like

Re: [ansible-project] F5 disable pool/node

2015-02-21 Thread Serge van Ginderachter
On 20 February 2015 at 22:36, Michael Perzel michaelper...@gmail.com wrote: Yes my apologies. Is it possible to move it over or should it just be closed and a new one opened? ​You'll need to do that manually.​ -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] working with multiple lists.. one defining the other?

2015-02-21 Thread Serge van Ginderachter
I'm actually using this very way of defining users and groups myself. What you want to do is possible if you flatten the lists in user_groups using the flattened lookup. Until now, you could only do that in a with_flattened lookup construct, but thanks to Brian's recent patch, you can now also

Re: [ansible-project] F5 disable pool/node

2015-02-20 Thread Serge van Ginderachter
On 20 February 2015 at 20:42, Michael Perzel michaelper...@gmail.com wrote: Thanks for the response. I filled out issue https://github.com/ansible/ansible/issues/10307. ​Doesn't this needs to be filed in https://github.com/ansible/ansible-modules-extras ?​ -- You received this message

Re: [ansible-project] F5 disable pool/node

2015-02-20 Thread Serge van Ginderachter
On 20 February 2015 at 17:47, Michael Perzel michaelper...@gmail.com wrote: I've been able to do simple things like gather facts, add/delete nodes, add/delete pools but one thing I am missing is being able to disable a node or pool. I don't necessarily want to delete a node to in essence

Re: [ansible-project] Ansible and name resolution

2015-02-19 Thread Serge van Ginderachter
Using the 'pipe' lookup you can use the output of a command, e.g. dig +short my.dns.name http://docs.ansible.com/playbooks_lookups.html#more-lookups On 19 February 2015 at 01:00, Charles Brown charlie...@gmail.com wrote: Hello, How do I perform name-to-IP lookups form within ansible YAML?

Re: [ansible-project] Re: special dict hostvars

2015-02-19 Thread Serge van Ginderachter
On 19 February 2015 at 08:48, Jan-Piet Mens jpmens@gmail.com wrote: Am I misunderstanding what hostvars _should_ contain? AFAIK, hostvars should be a dict of dicts, where the keys are the inventory_hostnames. The fact that host variables are put directly in hostvars, is a bug, I think.​

[ansible-project] special dict hostvars

2015-02-18 Thread Serge van Ginderachter
Hi, We're used to do things like hostvars[inventory_hostname].somevar Now, I wanted to debug someting and did ansible all -m debug -a var=hostvars I expected this to return something like { 'hostvars': 'host1': 'somevar' : somevalue

Re: [ansible-project] special dict hostvars

2015-02-18 Thread Serge van Ginderachter
On 18 February 2015 at 20:07, Brian Coca bc...@ansible.com wrote: In code the difference is mostly that hostvars is a 'cache' object that internally implements most (but not all, it seems) the methods of a dictionary. The default cache is an actual in memory dictionary but the object still

Re: [ansible-project] Re: Ansible 1.8.3 Released

2015-02-18 Thread Serge van Ginderachter
On 18 February 2015 at 20:57, Toshio Kuratomi tkurat...@ansible.com wrote: If any of you have encountered something that worked in 1.8.2 and regressed in 1.8.3 that you think should get fixed let us know ASAP and we'll see if we can squeeze it in. ​I think you need to have a look at this

Re: [ansible-project] Using group_vars with dynamic inventory groups

2015-02-17 Thread Serge van Ginderachter
Seems I can't reproduce your problem: [mstr] serge@cyberlab:~/tmp/ansible-test$ tree . ├── aws-configure.yml ├── aws-provision.yml ├── inventory │ ├── ec2.py-output.json │ └── group_vars │ └── tag_env_test.yml ├── README.md └── vars ├── aws_secrets.yml └── aws_vars.yml 3

Re: [ansible-project] Using group_vars with dynamic inventory groups

2015-02-16 Thread Serge van Ginderachter
On 16 February 2015 at 17:15, ddffgpmfn t...@aioue.net wrote: Edited out a proof of concept from the repo: https://github.com/aioue/ansible-test ​I'm afraid I don't have any AWS credentials to test this. Can you perhaps provide the plain json dump​ - can be redacted? -- You received this

Re: [ansible-project] Using group_vars with dynamic inventory groups

2015-02-16 Thread Serge van Ginderachter
On 16 February 2015 at 19:39, ddffgpmfn t...@aioue.net wrote: Are you looking for the output of the config playbook with -? ​no the output of your inventory plugin, which is json​ -- You received this message because you are subscribed to the Google Groups Ansible Project group. To

Re: [ansible-project] Using group_vars with dynamic inventory groups

2015-02-16 Thread Serge van Ginderachter
On 16 February 2015 at 16:18, ddffgpmfn t...@aioue.net wrote: added line to ./inventory/test/test as suggested: [local] localhost target_environment=test dev_key=aws-xxx [tag_env_test] No change. Variable is still not defined. ​What Brian suggested should IIRC not be needed. The

Re: [ansible-project] Using group_vars with dynamic inventory groups

2015-02-16 Thread Serge van Ginderachter
On 16 February 2015 at 16:32, ddffgpmfn t...@aioue.net wrote: Is there anything else I can show to work out whether I have made a mistake or there is a bug? Perhaps if you could put a minimal example in a gist, that reproduces this?​ -- You received this message because you are subscribed

Re: [ansible-project] include + with_foo

2015-02-16 Thread Serge van Ginderachter
On 16 February 2015 at 10:45, j...@ioctl.org wrote: Am I right in thinking this is coming back in v2? ​That's what I read in James Cammarata's presentation on v2.​ -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this

Re: [ansible-project] A host appears in more than one group, and both groups have the same tasks in them; any way to run tasks once?

2015-02-10 Thread Serge van Ginderachter
This is by design. The only way to go would be to apply role2 only in one playbook to one specific group, and not use role2 in any other playbook on a group that might have common members, like here. On 10 February 2015 at 14:47, Asfand Yar Qazi ayq...@gmail.com wrote: Hi, If anyone wants

Re: [ansible-project] Syntax for providing module parameters

2015-02-07 Thread Serge van Ginderachter
On 7 February 2015 at 15:11, Jim McMahon jmcma...@flatworldknowledge.com wrote: Is the second way wrong? Is one way preferred over the other? ​Definitely not wrong.​ ​Personally, I prefer the second., which is more pure yamlish. -- You received this message because you are subscribed to

Re: [ansible-project] Execute task for specific host.

2015-02-06 Thread Serge van Ginderachter
​try this: ​ when: servers.role ==​ ​ ​ ​​ ​upstream -- 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 ansible-project+unsubscr...@googlegroups.com. To post to

Re: [ansible-project] Unexpected Item is undefined

2014-12-10 Thread Serge van Ginderachter
On 10 December 2014 at 21:41, Capi Etheriel barrapo...@gmail.com wrote: Hi folks I got kind of stuck with https://gist.github.com/barraponto/a14c264a7755c8371ade ​kast line(13) in the task file, the indent of with_items is wrong: with_items: aws_vpc_subnets ​ ​Indent should be

Re: [ansible-project] Multiple inventory sources

2014-11-18 Thread Serge van Ginderachter
On 18 November 2014 10:57, Thomas Quinot tho...@quinot.org wrote: That's true, but would require reimplementing the parsing of standard inventoy files in the dynamic inventory script. ​Not reinventing, you van just import the ansible.inventory​ in your script and use it (on your specific

Re: [ansible-project] Force re-read of dynamic inventory script?

2014-11-18 Thread Serge van Ginderachter
On 18 November 2014 16:38, Josh Smift j...@care.com wrote: There's not a way to have a dynamic inventory script create group variables, is there? It's all just host variables? ​That is certainly possible: http://docs.ansible.com/developing_inventory.html#script-conventions ​ -- You

Re: [ansible-project] group_vars - is this supported?

2014-11-07 Thread Serge van Ginderachter
Yes, up to one level. On 6 November 2014 22:59, Tennis Smith ten...@nextgxdx.com wrote: Can group_vars have nested sub-directories? For example, can I have directories for groups group_one and group_two like this: group_vars/ all group_one/ all foo

Re: [ansible-project] Is aptitude really needed?

2014-10-24 Thread Serge van Ginderachter
On 24 October 2014 16:29, Goran Jurić gju...@gmail.com wrote: I am running multiple services on lean (minimal) containers on Debian and aptitude package needs to be installed on the target system if you want to run: apt: upgrade=full command Is there a command that does the same but

Re: [ansible-project] How are debug: var=vars / var=hostvars supposed to work?

2014-10-23 Thread Serge van Ginderachter
On 20 October 2014 23:12, Michael DeHaan mich...@ansible.com wrote: I *think* that debug: var=hostvars should print all the variables in scope (for each host) It doesn't do this, but rather looks for variable names inside hostvars. You can think of the hostvars syntax as a way to reference

Re: [ansible-project] ansible 1.8 (devel 4c86bd3ca6) not reading group_vars?

2014-10-22 Thread Serge van Ginderachter
​Given those paths:​ $ customer/windows-testing $ group_vars/windows.yml ​Your group vars (current dir) are one level above your inventory​ ​(within customer dir) So they are not found.. ​ $ ansible windows -i customers/windows-testing -m win_ping - -- You received this message

Re: [ansible-project] ansible 1.8 (devel 4c86bd3ca6) not reading group_vars?

2014-10-22 Thread Serge van Ginderachter
On 22 October 2014 22:51, Michael Wozniak mwozn...@itbit.com wrote: I think your group_vars files should not have .yml extensions ​That is not a problem, could even be .yaml or .json​ lib/ansible/constants.py:# check all of these extensions when looking for yaml files for things like

Re: [ansible-project] regarding inventory scripts

2014-10-16 Thread Serge van Ginderachter
On 16 October 2014 03:18, Florin Andrei florin.and...@gmail.com wrote: If I have several inventory scripts, is it possible to use them all at once, e.g. like this? ansible -i ec2.py -i some-other-provider.py ... ​put both sript in a directory and pint -i .. to that directory​ -- You

Re: [ansible-project] regarding inventory scripts

2014-10-16 Thread Serge van Ginderachter
On 16 October 2014 03:18, Florin Andrei florin.and...@gmail.com wrote: If I have several inventory scripts, is it possible to use them all at once, e.g. like this? ansible -i ec2.py -i some-other-provider.py ... ​put both scripts in a directory and pint -i .. to that directory​ there are

Re: [ansible-project] How do you feed your inventories to CI server?

2014-10-08 Thread Serge van Ginderachter
On 7 October 2014 12:42, Andrew Pashkin andrew.pash...@gmx.co.uk wrote: Do you push your inventories directly to project repositories, or you feed them to CI server in some other ways? ​I'm afraid your question is not well understood. Can you rephrase or elaborate?​ Serge -- You received

Re: [ansible-project] How to get a hold of the hostname from inventory file?

2014-10-08 Thread Serge van Ginderachter
that would be the special var inventory_hostname On 8 October 2014 15:47, Samnang Sen samnang@gmail.com wrote: I need to fetch a file from all servers in my inventory file. # ansible_hosts.txt server1 server2 server3 # Command I run. I want to substitute SERVER NAME with the

Re: [ansible-project] Host vars, group vars, Inventory vars?

2014-10-03 Thread Serge van Ginderachter
​That would be via the default 'all' group​: [ ​all​ :vars] would work but it does not appear to. ​though I would recommend you to not put variables in the ini file, and use the host/group_vars construct.​ -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Any chance for a 'stable' Ansible branch in main GitHub repository?

2014-10-02 Thread Serge van Ginderachter
On 2 October 2014 22:54, Michael DeHaan mich...@ansible.com wrote: Ansible will not be keeping a seperate branch named stable ​Why? ​ We use the development branch for development (ha), and then branch of each release, which are each stable. We also tag each release. ​TBH, I always

Re: [ansible-project] Any chance for a 'stable' Ansible branch in main GitHub repository?

2014-10-02 Thread Serge van Ginderachter
On 2 October 2014 23:02, Michael DeHaan mich...@ansible.com wrote: Tags are specifically interesting milestone events. ​Exactly. And tags often are that within a major branch, Looking at the history, it makes sense to have e.g. a 1.7 branch, but not separate branches for the minor releases.​

Re: [ansible-project] Re: nested dictionary access

2014-10-01 Thread Serge van Ginderachter
You can iterate through it in a jinja template, though only for a fixed depth as you would need to code each iteration level manually (AFAIK) {% for p in ppools %} {% for devices in ppools[p].devices %} etc On 1 October 2014 09:28, Sergey Sudakovich sudy...@gmail.com wrote: It looks like I

Re: [ansible-project] 'join' a list and a dict

2014-09-26 Thread Serge van Ginderachter
​Try targetting the values of the dict:​ with_together: - dict_name ​.values()​ - list_of_files -- 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] Re: Hash merging not working for me (hash_behaviour = merge)

2014-09-24 Thread Serge van Ginderachter
After a quick look in the action module, I see those vars are actually returned as ansible_facts, so merging include_vars would mean merging ansible_facts AFAICS. (playbook/__init__.py) On 24 September 2014 13:18, Daniel Schroeder deeme...@googlemail.com wrote: Thanks Michael, I filed the

Re: [ansible-project] Hierarchical overrides for playbooks

2014-09-19 Thread Serge van Ginderachter
Hi Javier, Perhaps you could start with explainig - for non-puppeteers here - what an 'override' exactly is, and show some basic high level example of what you try to accomplish? Serge On 19 September 2014 18:58, Javier Domingo Cansino javier...@gmail.com wrote: Hello, First of all, I am

Re: [ansible-project] Hierarchical overrides for playbooks

2014-09-19 Thread Serge van Ginderachter
​Javier,​ On 19 September 2014 22:36, Javier Domingo Cansino javier...@gmail.com wrote: No no, I meant overriding variables. In this case, the variable user_groups is an array of the groups that the role users has to install in each machine, and it doesn't inherit from all the sysadmin

Re: [ansible-project] Ansible 1.7.1 : Slowness at playbook startup

2014-09-18 Thread Serge van Ginderachter
On 18 September 2014 14:25, 'Ludovic Petetin' via Ansible Project ansible-project@googlegroups.com wrote: Has something changed in inventory load or anywhere else that could explain this? ​Yes. The fact that you notice this might be explained in that you have an extensive inventory, with

Re: [ansible-project] How to flatten host vars into a string.

2014-09-15 Thread Serge van Ginderachter
something like {% for cmd in tester_commands_root_extra %}{{ cmd }}{% if not loop.last %}, {% endif %}{% endfor %} On 15 September 2014 12:54, Alainkr akreienb...@gmail.com wrote: Hello, I'm trying to build a String based on host vars from a group. I see how to loop thru host in a group

Re: [ansible-project] Unique Host Entries In Inventory File?

2014-09-15 Thread Serge van Ginderachter
On 15 September 2014 18:06, Tiglath te...@tiglath.net wrote: I read in another thread that hosts must appear only once in the inventory file. ​That must be a mistake or misunderstood. Hosts can be in multiple groups, so they need to be repeated in the ini file(s). There is no harm in

Re: [ansible-project] Is there a way to dynamically target subsets of an inventory group based on facts?

2014-09-12 Thread Serge van Ginderachter
On 12 September 2014 16:48, Willard Dennis willard.den...@gmail.com wrote: So am I doing this incorrectly, or for some reason, is the os-Fedora group empty? (i.e. the logic is not matching any hosts) ​The --limit happens early, at initialization​, and at that time the group is indeed empty.

Re: [ansible-project] Re: Get rid of previous known host file not found

2014-08-22 Thread Serge van Ginderachter
On 22 August 2014 18:31, Michael DeHaan mich...@ansible.com wrote: You can add our PPA as indicated in http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu if you like... ​+1, especially on precise, as it needs a backported package too.​ -- You received this

Re: [ansible-project] centralizing groups of groups, strategy that works for both dynamic and static inventory

2014-08-15 Thread Serge van Ginderachter
On 15 August 2014 14:19, Matthew Simon matthew.b.si...@gmail.com wrote: though I could combine a static host list with my rollup groups file, but only if I put each static inventory in a separate directory with a copy of rollup groups. As far as I am aware, that's the only way to combine

Re: [ansible-project] Dynamic inventory group as a child of managed group - group_vars unavailable

2014-08-06 Thread Serge van Ginderachter
On 6 August 2014 10:52, Ran ranuse...@gmail.com wrote: 2. hosts file consists of: [workercommon] [tag_worker_1:children] workercommon 3. group_vars has a file workercommon.yml which includes variables. - The play's pattern references tag_worker_1 (the ec2 group). However the

  1   2   3   >