[ansible-project] How to handle case when dynamic inventory initially returns empty host list?

2019-02-16 Thread Andrei Pashkin
Let's suppose I have a custom dynamic inventory fetches instances from EC2 and makes an inventory from them and then if certain required instances do not exist they are created in the playbook and then inventory is refreshed using "meta: refresh_inventory" task. My problem is that when initial

Re: [ansible-project] Trouble integrating custom module_utils module

2019-01-18 Thread Andrei Pashkin
If someone having the same problem - I've found a workaround. I just use imp.find_module()/imp.load_module()functions from the standard library to load the module with shared code into a plugin module. On Tuesday, January 15, 2019 at 7:10:31 AM UTC+3, Andrei Pashkin wrote: > > Th

Re: [ansible-project] Trouble integrating custom module_utils module

2019-01-14 Thread Andrei Pashkin
gt; > See https://github.com/ansible/ansible/issues/28770 > > On Mon, Jan 14, 2019 at 4:00 PM Andrei Pashkin > wrote: > >> Hello! >> >> I tried to write a custom module_utils module, I set up everything >> according to the docs, but for some reason I get an

[ansible-project] Trouble integrating custom module_utils module

2019-01-14 Thread Andrei Pashkin
Hello! I tried to write a custom module_utils module, I set up everything according to the docs, but for some reason I get an error: > Skipping plugin (...) as it seems to be invalid: No module named ... I've isolated the problem in a small project: https://github.com/AndreiPashkin/ansible-tes