Hi, I am trying to deploy a VM on VMware vSphere ...
# general
m
Hi, I am trying to deploy a VM on VMware vSphere and then run a shell script from local (not remote). How do I run the shell script where I need to pass multiple arguments to it? This is what I am trying it doesn’t seem to work
Copy code
script_output = command.local.Command("execute_shell_script",
                       create='chmod 755 configure.sh && ./configure.sh \"{pulumivm.default_ip_address}\" {arg1} {arg2}',
                       opts=pulumi.ResourceOptions(depends_on=[pulumivm])
                       )
pulumi.export("script_output", script_output.stdout)
Can you please point me to a snippet or an example where this is being done?
e
The command strings are interpreted as shell lines so you need to escape them as if you we're passing them to "/bin/sh -c" (which is actually all that happens)