/** whether knife should attempt to run twice; * see {@link ChefConfig#CHEF_RUN_CONVERGE_TWICE} */ public KnifeConvergeTaskFactory<RET> knifeRunTwice(boolean runTwice) { this.runTwice = runTwice; return self(); }
/** function supplying the run list to be passed to knife, evaluated at the last moment */ public KnifeConvergeTaskFactory<RET> knifeRunList(Function<? super Entity, String> runList) { this.runList = runList; return self(); } public KnifeConvergeTaskFactory<RET> knifeRunList(String runList) {
/** what node name to pass to knife; default = null, meaning chef-client will pick the node name */ public KnifeConvergeTaskFactory<RET> knifeNodeName(String nodeName) { this.nodeName = nodeName; return self(); }
/** whether to pass --sudo to knife; default true */ public KnifeConvergeTaskFactory<RET> knifeSudo(boolean sudo) { this.sudo = sudo; return self(); }
/** omit the port parameter altogether (let knife use its default) */ public KnifeConvergeTaskFactory<RET> knifePortUseKnifeDefault() { if (port!=null) { log.warn("knifePortUseKnifeDefault specified to "+this+" when already told to use "+port+" explicitly (overriding previous); see subsequent warning for more details"); port = -1; } portOmittedToUseKnifeDefault = true; return self(); }
/** use the default port known to brooklyn for the target machine for ssh */ public KnifeConvergeTaskFactory<RET> knifePortUseMachineSshPort() { if (port!=null) { log.warn("knifePortUseMachineSshPort specified to "+this+" when already told to use "+port+" explicitly (overriding previous); see subsequent warning for more details"); port = -1; } portOmittedToUseKnifeDefault = false; return self(); }
/** tell knife to use an explicit port */ public KnifeConvergeTaskFactory<RET> knifePort(int port) { if (portOmittedToUseKnifeDefault!=null) { log.warn("Port "+port+" specified to "+this+" for when already explicitly told to use a default (overriding previous); see subsequent warning for more details"); } this.port = port; return self(); }
/** parameters to pass to knife after the bootstrap command */ public KnifeConvergeTaskFactory<RET> knifeAddExtraBootstrapParameters(String extraBootstrapParameter1, String ...extraBootstrapParameters) { this.extraBootstrapParameters.add(extraBootstrapParameter1); for (String p: extraBootstrapParameters) this.extraBootstrapParameters.add(p); return self(); }
public KnifeConvergeTaskFactory<RET> knifeRunList(String runList) { this.runList = Functions.constant(runList); return self(); }
public KnifeConvergeTaskFactory<RET> knifeAddParameters(String word1, String ...words) { super.knifeAddParameters(word1, words); return self(); }
/** includes the given attributes in the attributes to be passed to chef; * when combining with other attributes, this uses {@link Jsonya} semantics to add * (a deep add, combining lists and maps) */ public KnifeConvergeTaskFactory<RET> knifeAddAttributes(Map<? extends Object, ? extends Object> attributes) { if (attributes!=null && !attributes.isEmpty()) { Jsonya.of(knifeAttributes).add(attributes); } return self(); }