I prepared a WLST script that prints all sever names from WebLogic cluster to output file. The output is dynamic and it’s content depends of amount of servers – cluster members.
The output file is simple:
hostname1
hostname2 ..
hostnameN
I need now to prepare the Ant task that will copy one file to each server from the outputfile. As I understand I need to use Apply task , because I cannot install additional Ant packages.
One way of doing this is , assuming the use of SCP for the deploy, is to run a setup script before running ant deploy target.
Setup has:
Once the setup has run, the abstract deploy step is now concrete and has a list of SCP steps in a loop that will copy to all needed hosts.
Sample SCP syntax..
Sample loop :
The @ in a for loop while using scp