Hello,

I am trying to create a dynamic inventory module that returns hosts like
this:

  ###### hosts
[applicationservers:children]
dev1_appserver
dev2_appserver

[dev1_appserver]
host1

[dev2_appserver]
host1

[dev1_appserver:vars]
appserver_name=dev1
appserver_home="somepath/dev1/..."
appserver_port="9090"

[dev2_appserver:vars]
appserver_name=dev2
appserver_home="somepath/dev2/..."
appserver_port="8080"

########################

They share the same host, it's not mistake. If I write a playbook like this:
###### playbook
- hosts: applicationservers
  tasks:
  -name: deploy our application
  shell: doDeploy.sh {{ appserver_name }} {{ appserver_home }} {{
appserver_port }}
################################################

If I run this, the task "deploy our application" is only executed once. It
looks like ansible's smallest unit is the host. But we have here up to 6
application servers per host and want to deploy them at once.
How should the inventory look like?

Thank you!

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2f83d267-dc71-40f1-8c30-0fe8ae724ea6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Brian Coca at Nov 25, 2014 at 9:31 pm
    dynamic inventory modules are supposed to return json, not ini

    this has examples:
    http://docs.ansible.com/developing_inventory.html


    --
    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+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mBCbqTNghS%3Dsod%2BP0XFVODovXpJc1ST%2BUpeQRKND4zCQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ronny at Nov 26, 2014 at 6:59 am
    Sorry, my question was not clear. I created a new topic.
    This one can be deleted.

    Am Dienstag, 25. November 2014 22:31:39 UTC+1 schrieb Brian Coca:
    dynamic inventory modules are supposed to return json, not ini

    this has examples:
    http://docs.ansible.com/developing_inventory.html


    --
    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+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9df97546-1f1a-410d-8447-8b8aa8f1dd1b%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedNov 25, '14 at 6:35p
activeNov 26, '14 at 6:59a
posts3
users2

2 users in discussion

Ronny: 2 posts Brian Coca: 1 post

People

Translate

site design / logo © 2022 Grokbase