Thanks for the help Mr Kai. I really appreciat 👍
On Fri, Sep 8, 2017 at 11:38 AM, Kai Stian Olstad <
[email protected]> wrote:
> On 08. sep. 2017 05:59, parwinderjit singh wrote:
>
>> My host file is
>>
>> [splunk-head]
>> parv-vm-01 ansible_ssh_host=10.48.21.99 host_fqdn=parv-vm-01
>>
>> [splunk-indexer]
>> parv-vm-02 ansible_ssh_host=10.48.21.94 host_fqdn1=parv-vm-02
>> parv-vm-03 ansible_ssh_host=10.48.21.96 host_fqdn=parv-vm-03
>> parv-vm-04 ansible_ssh_host=10.48.21.86 host_fqdn=parv-vm-04
>>
>
> <snip />
>
> I am installing search-head of splunk on one server but i need to run one
>> command which need all hostname of splunk-indexer
>>
>> - name: add search-indexer
>> command: /opt/splunk/bin/splunk add search-server <hostname of
>> splunk-indexer 1>:8089 -auth {{ SPLUNK_UI_USERNAME }}:{{
>> Splunk_UI_Password
>> }} -remoteUsername {{ SPLUNK_UI_USERNAME }} -remotePassword {{
>> Splunk_UI_Password }}
>>
>> i need to run above command three times so that the command will run three
>> times and add 10.48.21.94, 10.48.21.96, 10.48.21.86
>>
>>
> - name: add search-indexer
> command: /opt/splunk/bin/splunk add search-server {{ item }}:8089
> -auth {{ SPLUNK_UI_USERNAME }}:{{ Splunk_UI_Password }}
> -remoteUsername {{ SPLUNK_UI_USERNAME }}
> -remotePassword {{ Splunk_UI_Password }}
> with_items: "{{ groups['splunk-indexer'] }}"
>
> --
> Kai Stian Olstad
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/ansible-project/HoCh1EqsT4A/unsubscribe.
> To unsubscribe from this group and all its topics, 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/ms
> gid/ansible-project/78927140-f41e-59a1-8f34-cdbcfdfa4a78%40olstad.com.
>
> 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/CAEzRYMTYwW8P1bFfd4n8xxYa2Q%2BT8Nayn2N5VPu6hN6rBabcMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.