[ansible-project] Dynamic inventory can take a long time to fetch hosts in group (aws_ec2)

2022-11-02 Thread Josh K
I have a dynamic inventory created with the aws_ec2 inventory plugin. I added a new group and now my inventory is taking a noticeably long time to load: groups: ... u: "tags.get('Name') | regex_search('u[\\d]+')" I've written a short python program to test how long this is taking: import

[ansible-project] Dynamic inventory on openstack

2021-04-22 Thread abhay srivastava
Hello team, How to run ansible using openstack.py inventory script. I need to run ansible playbook on ecs based on tag. So how to use it. -- Regards, Abhay Srivastava --- Mob-9160512000 -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-25 Thread Sakshi Rathore
Is there any other approach to achieve this? On Wed, 24 Mar, 2021, 2:20 PM Sakshi Rathore, wrote: > i have written a python script to list all the ips for master nodes and > worker nodes with respect to cluster name. > but i am not sure how to do it for nested ip addresses. > > i have also

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Sakshi Rathore
i have written a python script to list all the ips for master nodes and worker nodes with respect to cluster name. but i am not sure how to do it for nested ip addresses. i have also tried converting json to csv and then fetch the ip addresses from this using this approach i am getting csv file

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Abhijeet Kasurde
What have you tried so far and what is required output? On Wed, Mar 24, 2021 at 6:29 PM Sakshi Rathore wrote: > please find attached json file. > > On Wed, Mar 24, 2021 at 1:03 PM Abhijeet Kasurde > wrote: > >> Please provide a sample complex json file. >> >> On Wed, Mar 24, 2021 at 5:29 PM

Re: [ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Abhijeet Kasurde
Please provide a sample complex json file. On Wed, Mar 24, 2021 at 5:29 PM Sakshi Rathore wrote: > hi all, > > i am having a complex json file with nested json structure. how can i > create dynamic inventory using json file into ansible. > > i have tried many tutorials but due to compley json

[ansible-project] dynamic inventory creation for complex json file

2021-03-24 Thread Sakshi Rathore
hi all, i am having a complex json file with nested json structure. how can i create dynamic inventory using json file into ansible. i have tried many tutorials but due to compley json structure i am not getting it completely. please advise. -- You received this message because you are

Re: [ansible-project] Dynamic inventory and run ansible playbook in python script

2020-09-26 Thread prajwal
Hi thanks for the study meterials On Sun, 27 Sep, 2020, 4:03 AM Samuel Mwangi, wrote: > Hi, > > In addition to previously share documentation link, I would also recommend > this video by Jeff Geerling about dynamic inventories here > https://youtu.be/_rDzMYp-fBs > > On Sat, 26 Sep 2020, 19:37

Re: [ansible-project] Dynamic inventory and run ansible playbook in python script

2020-09-26 Thread Samuel Mwangi
Hi, In addition to previously share documentation link, I would also recommend this video by Jeff Geerling about dynamic inventories here https://youtu.be/_rDzMYp-fBs On Sat, 26 Sep 2020, 19:37 Abhijeet Kasurde, wrote: > You may want to take a look at >

Re: [ansible-project] Dynamic inventory and run ansible playbook in python script

2020-09-26 Thread Abhijeet Kasurde
You may want to take a look at https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html I find virtualbox ( https://github.com/ansible-collections/community.general/blob/main/plugins/inventory/virtualbox.py) inventory plugin easiest one to understand. On Sat, Sep 26, 2020 at

[ansible-project] Dynamic inventory and run ansible playbook in python script

2020-09-26 Thread prajwal
Hi all I need help to create dynamic inventory and run playbook using python script if anyone knows please help me out Thanks Prajwal -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Dynamic inventory azure_rm.yaml plugin cache

2020-04-06 Thread Sebastien Chartrand
Does anyone knows if that Inventory plugin supports Inventory caching ? I am using ansible version 2.9 . -- 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] Dynamic inventory for Ansible Controller on Google Cloud and nodes on AWS.

2020-01-09 Thread Brian Coca
This should work https://docs.ansible.com/ansible/latest/plugins/inventory/aws_ec2.html , but im not sure what your issue is. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Dynamic inventory for Ansible Controller on Google Cloud and nodes on AWS.

2020-01-06 Thread Ashish B
Hi Everyone, I am trying to find out a way to create dynamic inventory list that let me use the updated IP of EC2 instances after restart. I tried to search in documentation but there is not much information available about it. Is there anyone who can help me with it? -- You received this

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-21 Thread A Drew
FYI I finally figured out a way to handle the structure. A big note, for me, when I created a JSON item, if I ran it through a 'json.dumps' command, to validate, it would actually create an object that Tower did not like. However, if I just created a JSON string that was fine. Thanks! On

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-19 Thread Kai Stian Olstad
On 19.08.2019 21:20, A Drew wrote: > Normally, I would. > > However, for this specific case of our, we are reading a database to > generate the list of servers, so to prevent having to maintain the list of > servers in 2 places, we are using a script to read the database and > generate the JSON

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-19 Thread A Drew
Normally, I would. However, for this specific case of our, we are reading a database to generate the list of servers, so to prevent having to maintain the list of servers in 2 places, we are using a script to read the database and generate the JSON output. Thanks! On Monday, August 19, 2019

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-19 Thread Kai Stian Olstad
On 19.08.2019 20:49, A Drew wrote: > I don't mean to be dumb, but I read the document page you indicated, and > the example formats I have provide appear to me to fit into what is says > should work, yet they are not. > > This is why I posted the question. Most people posting on the list don't

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-19 Thread A Drew
I don't mean to be dumb, but I read the document page you indicated, and the example formats I have provide appear to me to fit into what is says should work, yet they are not. This is why I posted the question. Thanks! On Monday, August 19, 2019 at 1:42:46 PM UTC-5, Kai Stian Olstad wrote: >

Re: [ansible-project] Dynamic Inventory Script - Groups in Groups

2019-08-19 Thread Kai Stian Olstad
On 19.08.2019 20:12, A Drew wrote: > Can I get help as to what either format (YAML or JSON) should look like to > get the hosts to be added to the cell_test_* groups? The format is in the documentation https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html -- Kai Stian

Re: [ansible-project] dynamic inventory

2019-08-07 Thread Brian Coca
on the config side your indentation seems wrong (but that might just be an email issue), your main problem though is that you need the vmware sdk installed on the same python that ansible is using to execute. -- -- Brian Coca -- You received this message because you are subscribed to

[ansible-project] dynamic inventory

2019-08-01 Thread Sloan Miller
I am trying to get dynamic inventory working. I have not found much on the internet or in the docs that give a high level overview as to how the configs and files relate. Any tips? Can I get some suggestions on my dynamic inventory config? Is there a simple way to test and determine

[ansible-project] Dynamic inventory using VMware vSphere

2019-07-03 Thread Vicente Juan Tomas Monserrat
Hi everyone, We've been using Ansible since v2.1 and using static inventory since then. At v2.7 now. The infra has grown quite a lot and we would like to use dynamic inventory. I tried the configuration as it says here https://docs.ansible.com/ansible/2.7/vmware/vmware_inventory.html and it

[ansible-project] dynamic inventory not working

2019-03-18 Thread Mahender Tirumala
can you please let me know where to change in ec2.py to get dynamic inventory success getting unreachable error -- 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

[ansible-project] Dynamic Inventory on VMWare not working; but works when the script is run directly

2019-03-07 Thread computerprosupport
I am trying to implement Dynamic Inventory for VMWare with the vmware_inventory.py script >From here : https://github.com/ansible/ansible/blob/devel/contrib/inventory/vmware_inventory.py I have searched for docs on the ansible site and also google searched and there is nothing useful. the

[ansible-project] Dynamic Inventory for Windows EC2 Instances

2018-12-10 Thread Pawan Sawalani
Hi All, I am trying to use EC2 external inventory script (ec2.py/ec2.ini) for AWS instances. All my AWS EC2 instances are Windows hosts. When I run below command: ansible ec2 -i /etc/ansible/ec2.py -m win_ping I get

Re: [ansible-project] Dynamic Inventory script

2018-12-06 Thread Kai Stian Olstad
On 05.12.2018 16:25, Tuyen Nguyen wrote: Oh, can you explain how you would do that in the Ansible code? I have just started using Ansible and I don't know the language too well. Thanks. There is no code, default Ansible inventory is just a file with one host on each line.

Re: [ansible-project] Dynamic Inventory script

2018-12-05 Thread Tuyen Nguyen
Hi Oh, can you explain how you would do that in the Ansible code? I have just started using Ansible and I don't know the language too well. Thanks. On Tuesday, November 27, 2018 at 10:37:18 PM UTC-5, Brian Coca wrote: > > a 'flat file' will work with the ini plugin, no need to create a

Re: [ansible-project] Dynamic Inventory script

2018-11-27 Thread Brian Coca
a 'flat file' will work with the ini plugin, no need to create a script. -- -- Brian Coca -- 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] Dynamic Inventory script

2018-11-27 Thread Tuyen Nguyen
Hi No, but I thought that the format of the script needs to adhere to a JSON format. On Saturday, November 24, 2018 at 2:41:18 PM UTC-5, Samer Odeh wrote: > > did you try to simply cat the file ? > > On Sat, Nov 24, 2018 at 8:26 PM Tuyen Nguyen > wrote: > >> Hi >> >> Is there any simple

Re: [ansible-project] Dynamic Inventory script

2018-11-24 Thread Samer Odeh
did you try to simply cat the file ? On Sat, Nov 24, 2018 at 8:26 PM Tuyen Nguyen wrote: > Hi > > Is there any simple dynamic inventory script that would read from a local > file contain list of hostnames only? > > -- > You received this message because you are subscribed to the Google Groups >

[ansible-project] Dynamic Inventory script

2018-11-24 Thread Tuyen Nguyen
Hi Is there any simple dynamic inventory script that would read from a local file contain list of hostnames only? -- 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] dynamic inventory from another ansbile?

2018-08-06 Thread Kai Stian Olstad
On 06.08.2018 20:01, Kai Stian Olstad wrote: On 06.08.2018 19:02, eric.b.hymow...@nasa.gov wrote: I don't know how to take a discussion from the list to a private email... but the problem with setting up ssh bastion hosts is not ansible configuration or ssh configuration, it's poorly-designed

Re: [ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread Kai Stian Olstad
On 06.08.2018 19:02, eric.b.hymow...@nasa.gov wrote: I don't know how to take a discussion from the list to a private email... but the problem with setting up ssh bastion hosts is not ansible configuration or ssh configuration, it's poorly-designed security protocols that interfere with

Re: [ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread eric . b . hymowitz
I don't know how to take a discussion from the list to a private email... but the problem with setting up ssh bastion hosts is not ansible configuration or ssh configuration, it's poorly-designed security protocols that interfere with well-configured machines. ... unless you know of a way

Re: [ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread Kai Stian Olstad
On 06.08.2018 16:29, eric.b.hymow...@nasa.gov wrote: I had trouble setting up an ssh-proxy the last time I tried, but I don't remember why exactly. I should look into it again. That is ... a fascinating idea. One I will definitely need to look into (and check with my boss about). If you go

Re: [ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread eric . b . hymowitz
On Monday, August 6, 2018 at 10:09:33 AM UTC-4, Kai Stian Olstad wrote: > > On 06.08.2018 15:44, eric.b@nasa.gov wrote: > > I have two ansible servers, call them ansible-a and ansible-b . > > ansible-a is my "primary" most-often-used ansible server for most of my > > hosts including

Re: [ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread Kai Stian Olstad
On 06.08.2018 15:44, eric.b.hymow...@nasa.gov wrote: I have two ansible servers, call them ansible-a and ansible-b . ansible-a is my "primary" most-often-used ansible server for most of my hosts including ansible-b. However, there is a segregated network that ansible-a cannot get to, so

[ansible-project] dynamic inventory from another ansbile?

2018-08-06 Thread eric . b . hymowitz
I have two ansible servers, call them ansible-a and ansible-b . ansible-a is my "primary" most-often-used ansible server for most of my hosts including ansible-b. However, there is a segregated network that ansible-a cannot get to, so ansible-b is the ansible server for those hosts on that

Re: [ansible-project] Dynamic inventory json format question

2018-04-19 Thread fseudiba
Hello, ansible-inventory -i inventory.ini --list worked now fine for me. (I had a typo in the inventory.ini which prevented ansible-Inventory --list from working in the correct way). Many tnaks for all your help! Frank On Thursday, April 19, 2018 at 4:03:06 PM UTC+2, fseu...@gmail.com

Re: [ansible-project] Dynamic inventory json format question

2018-04-19 Thread fseudiba
Hello, as i did in my question - but here again: [DATABASE1] DATABASE1_hostname1.com ansible_host=hostname1.com [DATABASE2] DATABASE_2_hostname47.de ansible_host=hostname47.de On Thursday, April 19, 2018 at 8:56:36 AM UTC+2, lambd...@yahoo.com wrote: > > Hi > > Can you post contents of your

Re: [ansible-project] Dynamic inventory json format question

2018-04-19 Thread lambda_111 via Ansible Project
Hi Can you post contents of your inventory.ini On Thursday, 19 April 2018 16:05:25 UTC+10, fseu...@gmail.com wrote: > > Hello, > > i did a ansible-inventory -i inventory.ini --list against my working > inventory.ini and got the following result: > > $ ansible-inventory -i inventory.ini

Re: [ansible-project] Dynamic inventory json format question

2018-04-19 Thread fseudiba
Hello, i did a ansible-inventory -i inventory.ini --list against my working inventory.ini and got the following result: $ ansible-inventory -i inventory.ini --list [WARNING]: * Failed to parse /APPL/ansible/cfg/inventory.ini with ini plugin: /APPL/ansible/cfg/inventory.ini:2: Expected

Re: [ansible-project] Dynamic inventory json format question

2018-04-18 Thread Brian Coca
for recreating an inventory: ansible-inventory -i inventory.ini --list --export, w/o the --export it just shows a 'flattened view' which is what ansible sees internally, good for debugging but not for emulating in your own inventory source. -- -- Brian Coca -- You received this

[ansible-project] Dynamic inventory json format question

2018-04-18 Thread fseudiba
Hello, in the past i used this inventory entries. *inventory.ini format:* [DATABASE1] hostname1.com [DATABASE2] hostname47.de *dynamic inventory json format:* { "DATABASE1" : { "hosts" : [ "hostname1.com ] }, "DATABASE2" : { "hosts" : [ "hostname47.de ] } } This setup wors fine. For

Re: [ansible-project] Dynamic Inventory and Openstack: how to cache ?

2018-03-27 Thread Ilyes Semlali
I've found some doc ! https://docs.openstack.org/os-client-config/latest/user/configuration.html#ipv6 Le lundi 26 mars 2018 16:00:07 UTC+2, Ilyes Semlali a écrit : > > Any suggestions on where to find some documentation on "the config there" > ? I've looked through a few source code to check

Re: [ansible-project] Dynamic Inventory and Openstack: how to cache ?

2018-03-26 Thread Ilyes Semlali
Any suggestions on where to find some documentation on "the config there" ? I've looked through a few source code to check which key to add to my /etc/ansible/openstack.yml file. All I could find was : https://github.com/ansible/ansible/blob/devel/contrib/inventory/openstack.yml I really need

Re: [ansible-project] Dynamic Inventory and Openstack: how to cache ?

2018-03-26 Thread Ilyes Semlali
Any suggestions on where to find some documentation on "the config there" ? I've looked through a few source code to check which key to add to my /etc/ansible/openstack.yml file. All I could find was : I really need to cache my inventory, my cloud provider has set an unlimitted timeout when

[ansible-project] Dynamic Inventory using Google Cloud Platform

2018-02-20 Thread Chrisy
We are trying to configure Google compute engine resources using dynamic inventory in ANSIBLE We are getting the below error when we run the command: $ ./gce.py --list File "./gce.py", line 508, in GceInventory() File "./gce.py", line 170, in _init_ self.driver =

Re: [ansible-project] Dynamic Inventory Using CSV of Excel File ...

2018-02-19 Thread Kai Stian Olstad
On Friday, 16 February 2018 15.17.28 CET Hemant Kulkarni wrote: > Hello All, > > is there any way so that I can use CSV or excel file as Dynamic Inventory > in Ansiable ... if yes can you please let me know how I do that ... There are many different scripts here

[ansible-project] Dynamic Inventory Using CSV of Excel File ...

2018-02-16 Thread Hemant Kulkarni
Hello All, is there any way so that I can use CSV or excel file as Dynamic Inventory in Ansiable ... if yes can you please let me know how I do that ... Regards...HeM -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] Dynamic Inventory using Active Directory / LDAP

2018-02-13 Thread Michael Ströder
aa...@klep.net wrote: > Does anyone have code that can pull a dynamic inventory from list of AD > OUs?  Want to use the windows_update module to patch our servers only in > specific OUs. > > Maybe I missed it, but I don't see Windows Active Directory inventory > here: 

[ansible-project] Dynamic Inventory using Active Directory / LDAP

2018-02-12 Thread aaron
Does anyone have code that can pull a dynamic inventory from list of AD OUs? Want to use the windows_update module to patch our servers only in specific OUs. Maybe I missed it, but I don't see Windows Active Directory inventory here:

[ansible-project] dynamic inventory

2017-11-15 Thread arpanmeda93
Is there a way for dynamic inventory in vmware environmnet. Can we use the tags of VMs to do dynamic invetory in ansible. Any example would help. Thanks. Meda. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

[ansible-project] Dynamic inventory / Inline content help

2017-10-12 Thread Aaron Street
Hi all, I am passing a jenkins build job to Ansible that contain the Instance ID such as "i-0803f13f0236a495f" I want to used this as the input to the dynamic inventory and was hoping to use the ec2.py script to do this but i can't figure out how to pull this value back easily What I want to

[ansible-project] dynamic inventory not working properly

2017-07-10 Thread Babatunde Busari
Original post https://github.com/ansible/ansible/issues/26574 ANSIBLE VERSION ansible 2.3.1.0 config file = /projects/robomation/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] I

[ansible-project] Dynamic inventory - how to use group:children

2017-06-24 Thread Trond Hindenes
In "normal" inventory files, there's the concept of "group children", allowing the use of nested groups of hotsts. However, the documentation for the expected output of dynamic inventory systems does not include information about how Ansible expects group children to be presented in json form.

[ansible-project] Dynamic inventory shows some internal host incorrectly

2017-06-19 Thread Anthony Cheng
I am currently using dynamic inventory with ec2.ini set to use private_dns_name & private_ip_address However certain host in a different subnet are showing up as ip-x.x.x.x.ec2-internal as opposed to just returning their private IP (which they have). Does anyone have an idea why this is

[ansible-project] Dynamic Inventory Scaling

2017-03-15 Thread Cody John
We are building dynamic inventory scripts that pull both host/group info as well as variable data from our CMDB. We are in the initial phases so that data set is relatively small at the moment, but I'm worried about how well it's going to scale to tens of thousands of hosts and even more

Re: [ansible-project] Dynamic Inventory and Openstack: how to cache ?

2017-02-09 Thread Brian Coca
The openstack libraries control the caching, look at the config there. -- Brian Coca -- 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] Dynamic Inventory to private VPC instances

2016-12-20 Thread colin byrne
I asked this a while back and I did not find a good solution back then... Hopefully something has changed! I am running Ansible outside of multiple VPCs, and have a set of configs in my ~/.ssh/config that get picked up when using a static inventory file. Is there a way to utilize that config

[ansible-project] Dynamic Inventory help

2016-12-10 Thread Sivaram Kannan
Hi, I am trying to modify the fleet dynamic inventory. I have modified the fleet.py in github to generate a json like this { "all": { "nodetype1": { "hosts": ["10.209.6.1", "10.203.6.1", "10.201.6.1"] } } } When I run this fleet.py with the ansible I get this error ERROR! Attempted to

[ansible-project] Dynamic Inventory and Openstack: how to cache ?

2016-10-06 Thread David Vandergucht
Hi ! I cannot find any example of cloud.yaml configuring openstack for dynamic inventory with caching. Right now, each run takes forever to start because it is repopulating from openstack every time. How should i do ? Cheers David -- You received this message because you are subscribed to

[ansible-project] dynamic inventory jinja2 template help

2016-08-03 Thread Bryan Pearson
I have nodes in AWS and I'd like to use the dynamic inventory to create a template. Currently I cant get the facts from all the nodes into the one template file. The template only gets populated with the node thats in "role deploy" and doesnt include the monitor group. playbook - -

[ansible-project] Dynamic inventory with OpenStack

2016-07-21 Thread sergio gonzalez
Hello I am trying to use the dynamic inventory script: $ ./openstack.py --host 10.2.1.111 Traceback (most recent call last): File "./openstack.py", line 246, in main() File "./openstack.py", line 232, in main inventory = shade.inventory.OpenStackInventory(**inventory_args)

Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread Brian Coca
in 2.1 ansible supports a yaml inventory file format, this can read json but the format is not the same as the 'dynamic script' output. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread André Cruz
On Thursday, May 26, 2016 at 3:40:58 PM UTC+1, Brian Coca wrote: > > You've hit the nail on the head! We do have plans to make a 'inventory > cache' part of Ansible itself, currently its up to each script and of > course we have different implementations and some that don't implement any. >

Re: [ansible-project] Dynamic inventory cache

2016-05-26 Thread Brian Coca
You've hit the nail on the head! We do have plans to make a 'inventory cache' part of Ansible itself, currently its up to each script and of course we have different implementations and some that don't implement any. On Thu, May 26, 2016 at 10:30 AM, André Cruz wrote: >

Re: [ansible-project] Dynamic inventory cache

2016-05-26 Thread André Cruz
Since ansible already supports caching of facts shouldn't this also be a job of ansible itself? Otherwise each dynamic inventory plugin will implement it in a different way or not implement it at all... On Tuesday, 24 May 2016, Matt Hite wrote: > I believe it would be up to

Re: [ansible-project] Dynamic inventory cache

2016-05-24 Thread Matt Hite
I believe it would be up to the dynamic inventory script to implement the caching functionality. On Tue, May 24, 2016 at 9:55 AM, André Cruz wrote: > Hello all. > > I'm using the Azure RM dynamic inventory script, which although it works > fine, is very slow. > > Is it

[ansible-project] Dynamic inventory cache

2016-05-24 Thread André Cruz
Hello all. I'm using the Azure RM dynamic inventory script, which although it works fine, is very slow. Is it possible to cache its results and reuse them on another invocation? Can I just dump the output of the script (JSON) and load it? Thank you and best regards, André -- You received

[ansible-project] dynamic inventory - hostname or ip address

2016-04-28 Thread Bill WANG
Hi all, I got dynamic inventory for ec2 instances via ansible. But the host in export are all IP addresses. In ec2.ini vpc_destination_variable = private_ip_address Sample of dynamic inventory output: "tag_Name_abc01_example_com": [ "10_1_1_15" ], So when run playbook, I have

[ansible-project] Dynamic inventory not working in playbook

2016-04-18 Thread Pavanan M S
Hi all, I am using a playbook to create a GCE VM intance and deploy some code to it. I was hard coding the IP of the created instance until i realized the use of dynamic inventories. I downloaded gce.py and made it executable. Commands like ./gce.py --list

Re: [ansible-project] Dynamic Inventory in 2.0 with children

2016-02-20 Thread Brian Coca
​It seems you found a bug...​ On Sat, Feb 20, 2016 at 1:44 PM, Bruce Freeman wrote: > I'm seeing a difference in dynamic inventory between 1.9.4 and 2.0 but > what we have seems to be correct according to the documentation. > > Here is a simple Shell script to

[ansible-project] Dynamic Inventory in 2.0 with children

2016-02-20 Thread Bruce Freeman
I'm seeing a difference in dynamic inventory between 1.9.4 and 2.0 but what we have seems to be correct according to the documentation. Here is a simple Shell script to demonstrate: #!/bin/sh cat

Re: [ansible-project] Dynamic Inventory

2016-02-17 Thread govindaraj
Sorry, it's the UUID of the machine. Any way we can have it to write IP address? "mesos_masters": [ "b9d2e61e-0653-4a1f-a472-c5f15a017eae", "ca8c9fc7-337f-4f92-baac-7fe41f6475ce", "a904e509-b4b1-479e-8137-17bb30b400c9" ], On Tue, Feb 16, 2016 at 7:35 PM, govindaraj

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Hi Matt, How can i force openstack.py script to write IPv4 address? For some reason the JSON file has IPv6 address. "mesos_masters": [ "b9d2e61e-0653-4a1f-a472-c5f15a017eae", "ca8c9fc7-337f-4f92-baac-7fe41f6475ce", "a904e509-b4b1-479e-8137-17bb30b400c9" ], I tried the below and

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Hi Matt, Here is the output from running openstack.py --list. Took a snippet of it. "interface_ip": "96.119.246.10", "key_name": "ssd-xplat", "metadata": { "cluster_name": "jenkins_mesos_master", "group": "mesos_masters",

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread Matt Martz
Effectively ansible is calling that inventory like `./openstack.py --list` You would need to inspect the output to see what is available. You are specifying a hosts entry of `jenkins_mesos_slave_prod`, so the dynamic inventory would need to return that group for it to be used. On Tue, Feb 16,

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Thanks Matt. How do i execute this dynamic inventory against my playbook? When i tried the below it says no hosts matches. #ansible-playbook jenkins_mesos_slave.yml -i openstack.py --limit jmesosslv-cmce-02p.sys.comcast.net Here is my playbook. How can i ensure my playbook can run against this

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread Matt Martz
The dynamic inventory scripts are supposed to be used in place of a ini formatted inventory. Instead of using `-i /path/to/ini/inventory` you would use `-i /path/to/openstack.py` To make that possible, the `openstack.py` file needs to be marked as executable. On Tue, Feb 16, 2016 at 4:05 PM,

[ansible-project] Dynamic Inventory

2016-02-16 Thread Govindaraj Venkatesan
Hi, Is there any script that we can use to construct dynamic inventory file for Openstack? I downloaded the script but it gives a JSON output. Does anyone have a script to convert JSON to update a inventory file with list of IP address? You can download the latest version of the OpenStack

Re: [ansible-project] Dynamic Inventory Error

2015-12-29 Thread Matt Martz
You cannot provide dynamic inventory JSON output, that would normally come from a script, directly to the Inventory class. The first argument for Inventory is the `host_list`, which can be 1 of 3 things: 1) Path to ini formatted inventory file 2) Path to executable dynamic inventory script 3)

[ansible-project] dynamic inventory with host files

2015-09-28 Thread Roy
Hi, We have a use case in which I want to run playbook on specific set of machines and same task on spot instances which belongs to same set of machines but we dont have entry into host file. We have cluster of machines (on demand) and some spot instances. I want to deploy code to all these

[ansible-project] dynamic inventory scenario

2015-09-03 Thread James Addison
I'm trying to wrap my head around hosts files, dynamic inventory (Linode, for me) and creating/provisioning new nodes within this scenario. If I have a brand new project and I want to use Ansible to spin up a few linodes to handle it - how best can I visualize this? Keeping it simple,

[ansible-project] Dynamic Inventory and ansible_ssh_ variables.

2015-08-19 Thread Michael Luich
Hello, I'm trying to write a custom inventory script that sets a non standard ssh port. I've put the ansible_ssh variables in the _meta section of the json. These variables don't seem to get applied. I can set it in /etc/ansible/group_vars/CDS.yml and it gets picked up. This example only

Re: [ansible-project] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-15 Thread Brian Coca
ansible is not responsible for the yaml version in this case, that depens on your script, ansible just executes invenory scripts, it does not even know if it is python, ruby or C, just that it is executable. are you setting PYTHONPATH for ansible? in that case the env variable would get inherited

Re: [ansible-project] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-15 Thread Brian Coca
This is one reason we removed homebrew from our instructions on how to install ansible. -- Brian Coca -- 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] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-15 Thread pixel fairy
turns out homebrew set that python path. running from git works as it should. pixel$ cat `which ansible` #!/bin/bash PYTHONPATH=/usr/local/Cellar/ansible/1.9.2/libexec/lib/python2.7/site-packages:/usr/local/Cellar/ansible/1.9.2/libexec/vendor/lib/python2.7/site-packages exec

Re: [ansible-project] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-15 Thread pixel fairy
Yes, the rest the script (stripped out for brevity) works fine. checked for all needed packages in both versions of python, but ansible insists on its own (python2) version of yaml. is there a way around that? like telling ansible not to use its own yaml? ill probably just generate a static

[ansible-project] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-14 Thread pixel fairy
wrote a dynamic inventory for ansible, which seems to run fine on its own, but when run in ansible, it complains that it cant import yaml. a script that just cats out the output (cut and paste) of the first script works just fine. the parts that actually make and configure the virtual

Re: [ansible-project] dynamic inventory script doesnt run under ansible, but a script that cats its output works just fine.

2015-07-14 Thread Brian Coca
so ansible uses python2 which would require yaml to work and seems to be installed correctly, but your script uses python3, did you install yaml for python 3? -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from

[ansible-project] Dynamic inventory for rackspace cloud besides servers

2015-07-06 Thread Mehul Ved
Hi, I started a rackspace cloud database instance and tried to look for ways to list it but can't find a way to list the database instances. Is there a way to list different types of rackspace cloud instances as we can do for rackspace cloud servers? Or the recommended way is to register the new

[ansible-project] Dynamic Inventory AWS EC2 + group_vars

2015-06-11 Thread sirkubax
Hi ansible 1.9.1 I'd like to load some variables for newly created instances from my static inventory. I do create some EC2 instances with a playbook (as in basic example): *- hosts: localhost* * connection: local* * gather_facts: False* * tasks:* *- name: Provision a set of

[ansible-project] dynamic inventory tiered groups

2015-05-26 Thread Marc Pascual
Hello! I'm new to ansible, and I am trying to figure out how the json output should look like if I have a flat-file inventory source like: # application:environment=hostlist heroes:marvel=thor hulk stark cap heroes:dc=supe bats flash robin colors:primary=red blue yellow colors:secondary:green

[ansible-project] [Dynamic Inventory] ec2_tag_Name is undefined

2015-04-28 Thread Mateus Dubiela Oliveira
*TL;DR: *When I create a instance the *ec2_* *variables are undefined. Hello, I'm using ansible to create instances and using the *ec2_tag_Name* to set up the machine's hostname. The problem is, on the first run the playbook crashes saying that the '*ec2_tag_Name*' variable is undefinded,

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

2015-04-21 Thread spezam
Since that was the only option, did some changes and implemented the _meta output. Performance issue solved. Thanks. On Tuesday, April 21, 2015 at 4:47:27 PM UTC+2, spezam wrote: Yeah, my only problem is that I already have the hosts array data structure available, but to produce the

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

2015-04-21 Thread spezam
Yeah, my only problem is that I already have the hosts array data structure available, but to produce the _meta information I have to split that information into single hosts. I hoped I could avoid it, but I guess that's the only way. On Tuesday, April 21, 2015 at 4:37:19 PM UTC+2, Serge van

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

2015-04-21 Thread spezam
Is it the only way? I do really want to avoid to iterate through each host (instead of using arrays) and produce duplicate data... On Tuesday, April 21, 2015 at 4:00:10 PM UTC+2, Serge van Ginderachter wrote: use the '_meta' key

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

  1   2   >