mercurial.sls looks like:
mercurial:
hg.latest:
- name: ssh://hg@bitbucket.org/nickwilliams/influx-salt
- rev: tip
- target: /srv
- identity: /root/deploy_rsa
If I apply with salt-call --local state.apply
I get this error:
root@precise64:/home/vagrant# salt-call --local state.apply
[WARNING ] /usr/lib/python2.7/dist-packages/salt/grains/core.py:1493: DeprecationWarning: The "osmajorrelease" will be a type of an integer.
[ERROR ] Command '['hg', 'pull', '--ssh "ssh -i /root/deploy_rsa"', 'ssh://hg@bitbucket.org/nickwilliams/influx-salt']' failed with return code: 255
[ERROR ] output: hg pull: option --ssh "ssh -i /root/deploy_rsa" not recognized
But if I take all the args from that [ERROR ] Command
debug from above:
'['hg', 'pull', '--ssh "ssh -i /root/deploy_rsa"', 'ssh://hg@bitbucket.org/nickwilliams/influx-salt']'
And stick em together:
>>> ' '.join(['hg', 'pull', '--ssh "ssh -i /root/deploy_rsa"', 'ssh://hg@bitbucket.org/nickwilliams/influx-salt'])
'hg pull --ssh "ssh -i /root/deploy_rsa" ssh://hg@bitbucket.org/nickwilliams/influx-salt'
And run manually, it works fine.
root@precise64:/srv# hg pull --ssh "ssh -i /root/deploy_rsa" ssh://hg@bitbucket.org/nickwilliams/influx-salt
pulling from ssh://hg@bitbucket.org/nickwilliams/influx-salt
searching for changes
no changes found
remote: Warning: Permanently added the RSA host key for IP address '104.192.143.1' to the list of known hosts.
What gives?