On Monday, 20 November 2017 01.22.14 CET M I Chowdhury wrote:
> I need some automation like to run a script into all remotes machines which 
> requires some interactive input described as below:
> 
> Master server:
> ----------------------
> /Having patch script here
> /Need to Transfer the script to remote machines

The copy module can do that.


> /Execute the script into remotes machines which needs configuration inputs 
> based on  on which host it is configuring.

This can the expect module do.


> Remote hosts:
> -----------------------
> /copied  the script here
> /will run the script here which had some configuration inputs as below
> 1. Like what is the host name that you running the script?[hostX]:<get the 
> host name and input host name here>

In Ansible facts you have this information, and can use this in the expect 
module.


> 2. what is host database server name?<need to find out in a file which has 
> a parameter db-host=hostdb> < input the host db here

To get this information, you can run the command module an register the output 
in a variable and then use that in the expect module.


-- 
Kai Stian Olstad

-- 
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/1817691.OA4ky2jAZB%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to