" It looks like ansible's smallest unit is the host. But we have here up to
6 application servers per host "

Consider something like a

"with_items: app_servers" attached to your task.



On Thu, Nov 27, 2014 at 6:30 AM, Ronny <[email protected]> wrote:

> Thank you very much Hugo.
> That is a very good solution that I can work with.
>
> Best regards,
> Ronny
>
> Am Mittwoch, 26. November 2014 07:57:37 UTC+1 schrieb Ronny:
>
>> Hello,
>>
>> I am trying to make a playbook with the following inventory work:
>>
>>  ###### 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/0f26a7a1-ec97-41be-bcb1-7801b40dcb86%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/0f26a7a1-ec97-41be-bcb1-7801b40dcb86%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgx80fppWh-r%3DrRWB6B4fFWuvyEtjT9KMy2k0H_JAvvM9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to