com.github.woostju.ansible.command.ScriptCommand Maven / Gradle / Ivy
package com.github.woostju.ansible.command;
import java.util.List;
import org.assertj.core.util.Lists;
import com.github.woostju.ansible.Module;
/**
*
* Runs a local script on a remote node after transferring it
* Get more information from script module.
* @author jameswu
*
*/
public class ScriptCommand extends Command{
public ScriptCommand(List hosts, List module_args, List options) {
super(hosts, Module.script.toString(), module_args, options);
}
/**
*
* @param hosts target hosts
* @param scriptFilePath Path to the script on server to run followed by optional arguments.
* @param executablePath Name or path of a executable to invoke the script with.
*/
public ScriptCommand(List hosts, String scriptFilePath, String executablePath) {
this(hosts, Lists.newArrayList(scriptFilePath, "executable="+executablePath), null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy