Re: [ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-27 Thread Frank Perks
Thanks brian. action_plugins directory worked fine for me. :D On Friday, September 25, 2015 at 6:08:18 PM UTC-4, Brian Coca wrote: > > first, you should be able to just write the var into a facts file on > the target machine and fact gathering shoudl automatically pick it up > (http://docs.ansib

Re: [ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-25 Thread Brian Coca
first, you should be able to just write the var into a facts file on the target machine and fact gathering shoudl automatically pick it up (http://docs.ansible.com/ansible/setup_module.html read fact_path). as for the action plugin, each plugin type has it's own directory name, you cannot mix plu

[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-25 Thread Frank Perks
Unfortunately it seems like include_vars only looks for the vars file on the ansible server, and will not fetch it on the remote server. Trying to elegantly handle these cases ended up becoming a huge mess. I ended up just creating my own action plugin that pulls the a key/value parameter and

[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-25 Thread Veny Tchistopolskii
Hey, Perhaps Registered Variable are what you want? (Still new to this, feel free to say I'm wrong) According to Ansible documentation: "Registered variables are valid on the host the remainder of the playbook run, which is the same as the lifetime of “facts” in Ansible. Effectively registere

[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-23 Thread Vikas Kumar
Hello Frank, This is not exactly what do you want, but certainly can give you some pointers. Regards, Vikas On Wednesday, 23 September 2015 10:07:54 UTC+10, Frank Perks wrote: > > Any ideas? This

[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-23 Thread George Boobyer
This might provide some inspiration, where a vars file is templated and then included allowing dynamic variable names and values. I think it would be 'more elegant' to build up an in memory YAML/JSON as opposed to creating a file - but haven't got a good example - so hope this helps! and it may

[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-22 Thread Frank Perks
Any ideas? This is really blocking me. On Monday, September 21, 2015 at 7:49:13 PM UTC-4, Frank Perks wrote: > > I am trying to shrink ~30+ roles into a single role to drastically reduce > the amount of duplicate and copy and pasted code into a single nice and > neat role. One of the problems i