salt
salt copied to clipboard
Conflict between script_args and bootstrap-salt.sh
Using such script_args:
$ cat cloud/local/etc/cloud.profiles
debian_container:
provider: bigal
image: debian
network_profile: nic
profile: debian
script_args: -g https://github.com/jpic/salt.git git current
Is expected to make minions bootstrapped with my fork.
Here's the actual result:
[INFO ] Running sh /tmp/26751fac9d4b8d92885087046d9d7581/bootstrap.sh -g https://github.com/jpic/salt.git git current -c /tmp/.c_26751fac9d4b8d92885087046d9d7581 in LXC container 'test_new3'
[DEBUG ] Child Forked! PID: 34623 STDOUT_FD: 17 STDERR_FD: 30
[DEBUG ] Terminal Command: /bin/sh -c lxc-attach --clear-env --set-var PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/bin:/usr/local/sbin -n test_new3 -- sh /tmp/26751fac9d4b8d92885087046d9d7581/bootstrap.sh -g https://github.com/jpic/salt.git git current -c /tmp/.c_26751fac9d4b8d92885087046d9d7581
[INFO ] * ERROR: options are only allowed before install arguments
[INFO ] Usage : bootstrap-salt.sh [options] <install-type> <install-type-args>
What's your take on this ?
@jpic use a placeholder
script_args: "-c {0} -g https://github.com/jpic/salt.git git current"
See https://github.com/saltstack/salt/blob/develop/salt/modules/lxc.py#L3129
(this is a question, and not a bug)
@jpic Did you try @kiorky's solution and did it work?
I had the same error and the solution proposed by @kiorky solved it.