[ansible-project] Re: Inventory level files and templates

2016-05-11 Thread Krzysztof Zarzycki
Sorry, the variables "node1","node2", "node3" or "master" were just example variables, unfortunate names. I just meant some children variables of some master variable. W dniu środa, 11 maja 2016 07:44:05 UTC+2 użytkownik J Hawkesworth napisał: > > Not sure I fully understand what you are tr

[ansible-project] Re: Inventory level files and templates

2016-05-10 Thread 'J Hawkesworth' via Ansible Project
Not sure I fully understand what you are trying to achieve so I may have the wrong idea here. It maybe that you have just used node1, node2, node3 as example variable names, but if you are referring to machines you can refer to variables, including nested ones for other hosts in other groups in

[ansible-project] Re: Inventory level files and templates

2016-05-10 Thread Krzysztof Zarzycki
Thanks guys for your help, I assume you confirm, that there is no such builtin feature in Ansible to manage inventory-level templates/files. I'm trying to keep away of doing custom things with Ansible like loading variables or files manually, but if that would be the only way of progressing, I'

[ansible-project] Re: Inventory level files and templates

2016-05-10 Thread Yannig Perre
Hi, You can use the magic variable inventory_dir and use it in your playbook. Here's the default value: ansible -m debug -a var=inventory_dir localhost localhost | SUCCESS => { "inventory_dir": "/etc/ansible" } Regards, Yannig Le lundi 9 mai 2016 11:13:31 UTC+2, Krzysztof Zarzycki a écr

[ansible-project] Re: Inventory level files and templates

2016-05-09 Thread 'J Hawkesworth' via Ansible Project
You could pick up a different version of a file say for each environment - name: copy environment-specific config copy: src: "configuration.{{environment}}.conf" dest: /etc/someconf.conf I'd argue that if there are lots of things that are different between test and prod then you are m