[ansible-project] Re: How do you structure Playbooks to Handle Managing Many Applications with Many Environments?

2015-10-18 Thread John McNulty
What we do is this: *Playbooks* Each host must contain a list variable called (e.g.) apps_list in its host_vars file. This will usually be just one application, but could be more that one if you install multiple apps on one server (e.g. different application DBs on a single DB server).

Re: [ansible-project] RedHat buys Ansible?

2015-10-16 Thread John McNulty
Not any more. Satellite 6 is a totally new beast, based on the upstream open source tool Katello. Katello itself is a combination of Foreman + Candlepin + Pulp. The Foreman component was really written with Puppet in mind, but I can't see how that's going to be strategic in light of

[ansible-project] Custom module - finding files?

2015-05-21 Thread John McNulty
I've written a module that has requires a src and dest file. I'm puzzled as to how core modules like copy find their source files in the role/name/files directory. I've looked at the sources for copy.py and it just gets the source file from module.params['src']. Then tests with: if not

[ansible-project] Re: Custom module - finding files?

2015-05-21 Thread John McNulty
Sorry for the garbage code on the end. Cut and paste using ctrl-v on my chromebook sometimes does some strange stuff in google groups, and the option to edit ones own posts is not enable in this group (hint :) ) On Thursday, 21 May 2015 15:33:37 UTC+1, John McNulty wrote: I've written

Re: [ansible-project] Custom module - finding files?

2015-05-21 Thread John McNulty
Hi Brian, So really the way forward is for me to split this over two tasks. One task to copy the file from the role files directory on the Ansible server to a temporary directory on the remote host, and then use that known location in my custom module to find, process and clean the target

[ansible-project] Re: Replacing dictionary key values

2015-05-12 Thread John McNulty
So you're saying it's not possible to replace the value of a dictionary key without changing hash_behaviour to merge? On Tuesday, 12 May 2015 16:06:35 UTC+1, Pascal Mathis wrote: You do have an option :) Set the *hash_behaviour

[ansible-project] 'always' tag doesn't match the documentation

2015-04-28 Thread John McNulty
Hi. The docs (http://docs.ansible.com/playbooks_tags.html) say that the 'always' tag will always run a task even if running a playbook with another tag, but it doesn't do that for me. I have a role called 'common' with a list of dependencies. The first of which is called

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-12 Thread John McNulty
: item.value.absent is defined tags: netdev On Wednesday, 11 March 2015 15:23:43 UTC, Jonathan Davila wrote: Would you mind sharing the full body of the task that pertains to this as well as the template file? On Tuesday, March 10, 2015 at 12:19:46 PM UTC-4, John McNulty wrote: So the reason why I

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread John McNulty
dev bond.123 10.198.0.0/24 via 10.118.255.254 dev bond.123 Actually don't need the with_dict loop here at all. Hopefully that helps, let us know otherwise. On Tuesday, March 10, 2015 at 9:23:49 AM UTC-4, John McNulty wrote: Hi, So here's the scenario - I'm given a data structure

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread John McNulty
this: route_file_state: routes-other: present routes-ext: absent would prevent that extra attribute from interfering with my jinja example and needing to add more logic. On Wednesday, March 11, 2015 at 1:07:52 PM UTC-4, John McNulty wrote: Hi, For just processing

[ansible-project] dict merge - with_dict expects a dict

2015-03-10 Thread John McNulty
Hi, So here's the scenario - I'm given a data structure that when converted to yaml looks like this (names numbers invented). host_routes: route-oob: device: bond.123 routes: 10.118.0.0/16: '10.118.255.254' route-int: device: bond.456 routes: 172.168.0.0/23:

[ansible-project] Re: Sharing variables defaults across roles

2015-03-06 Thread John McNulty
How about adding 3rd common role that has no tasks but just sets vars, then add that to both db and web as a dependency? On Wednesday, 27 August 2014 17:59:03 UTC+1, Daniele Varrazzo wrote: Hello, first of all thank you very much for Ansible. I'm setting up the deployment of a complex

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

2015-03-06 Thread John McNulty
Thanks Serge, that worked. I'll use that. On Friday, 6 March 2015 13:24:46 UTC, Serge van Ginderachter wrote: On 6 March 2015 at 12:15, John McNulty john...@gmail.com javascript: wrote: # inventory/poc [poc:children] poc-app poc-db - And repeat my test $ ansible-playbook

[ansible-project] Problem grouping inventory directory files

2015-03-06 Thread John McNulty
By way of explanation here's a simple reproducer. - The Inventory is a directory containing two files - each one contains one group and one host # inventory/poc-app [poc-app] host1 # inventory/poc-db [poc-db] host2 - A playbook is created to run a couple of roles for each --- #