How to use the different parameter for each host in playbook

24 views
Skip to first unread message

Devesh singh

unread,
Mar 1, 2019, 8:36:42 AM3/1/19
to Ansible Project
Hi,

Could you please anyone help me to complete below request.

We need to excute the one playbook on  10 hosts and each task in playbook  should use the different-2 parameter on each host.

Could you please how we can perform it.

Your prompt response will be appreciable for the same.

Thanks & Regards,
Devesh Kumar Singh

Jeffrey Agnitsch

unread,
Mar 1, 2019, 9:41:37 AM3/1/19
to Ansible Project
One playbook on 10 hosts with two different parameters.

What are the two parameters? 



if its just general data you can use some tasks to create the variable on the machine such as below with the set fact to make a variable with the contents of a password


you could have some tasks within the playbook to  in this case set a password

  name: Setup password
  set_fact: root_db_server_pwd={{lookup('password', '/dev/null chars=ascii_letters,digits,hexdigits length=10')}}


You could also run some commands and register the output of those commands to be used later.

Could you be a little more specific on what you are trying to accomplish?

Sudheer S

unread,
Mar 4, 2019, 10:07:52 AM3/4/19
to ansible...@googlegroups.com

On 01/03/19 7:06 PM, Devesh singh wrote:
> Hi,
>
> Could you please anyone help me to complete below request.
>
> We need to excute the one playbook on  10 hosts and each task in
> playbook  should use the different-2 parameter on each host.
>
> Could you please how we can perform it.
>
>
Tell us what are those 'different-2 parameter' are?

-

Sudheer S

Robert Bellarmin

unread,
Mar 4, 2019, 10:09:10 AM3/4/19
to ansible...@googlegroups.com
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ba3a50b8-5d98-ff87-55b3-43ec8e7582ea%40techchorus.net.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages