> +import org.jclouds.scriptbuilder.statements.ssh.InstallRSAPrivateKey;
> +
> +/**
> + * Convert the template options into a statement, but ignoring the public
> key.
> + * <p>
> + * The {@link DigitalOceanComputeServiceAdapter} already takes care of
> + * installing it using the {@link KeyPairApi}.
> + *
> + * @author Sergi Castro
> + * @author Ignasi Barrera
> + */
> +@Singleton
> +public class TemplateOptionsToStatementWithoutPublicKey extends
> TemplateOptionsToStatement {
> +
> + @Override
> + public Statement apply(TemplateOptions options) {
Yes. The ComputeService will check if there is some script configured with the
TemplateBuilder. Some specific options such as the `authorizePublicKey`,
however, need to run a script by default, and this TemplateOptionsToStatement
class reads those options and generates the required scripts.
The contract the ComputeService is that if no runscript is configured in the
options (it is `null`), no script should be run on the node after deploying it.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9171016