unexpected behavior in Bolt 0.18.1

20 views
Skip to first unread message

Ty Young

unread,
Apr 2, 2018, 11:03:15 AM4/2/18
to Puppet Users
Hey fellow Puppet users,

I'm a Puppet newb, but I did look through postings in this group and in other locations for the answer before posting this question.  Please forgive me if I'm asking a FAQ.

When I execute a Bolt 'run command' task, my connection succeeds using SSH keys but job terminates with a status code 1 and reminds me of the proper syntax for scp (secure copy) commands. 

root@zztypuppet01:tty1@23:25:08:~/.puppetlabs # bolt command run '/bin/echo "hello world"' --nodes remotehost --user root --verbose
Started on remotehost...
2018-04-01T23:25:13.182788 INFO   remotehost: Command failed with exit code 1
Failed on remotehost:
 
The command failed with exit code 1
  STDERR
:
    usage
: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
               
[-l limit] [-o ssh_option] [-P port] [-S program]
               
[[user@]host1:]file1 ... [[user@]host2:]file2
Failed on 1 node: remotehost
Ran on 1 node in 0.18 seconds
root@zztypuppet01
:tty1@23:25:13:~/.puppetlabs #

Logging on the remote host for SSH indicates a successful connection:

Apr  1 23:28:19 remotehost sshd[29147]: Accepted publickey for root from 10.204.40.10 port 37122 ssh2
Apr  1 23:28:19 remotehost sshd[29147]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr  1 23:28:19 remotehost sshd[29147]: pam_unix(sshd:session): session closed for user root

According to the documentation for Bolt, I'm formatting the command successfully.

Am I missing something here?
Thanks
ty

Nick Lewis

unread,
Apr 4, 2018, 5:01:10 PM4/4/18
to puppet...@googlegroups.com
That's really a mysterious error. Your usage of bolt looks correct, and there shouldn't be any files uploaded when just running a command regardless. Can you try the command with --debug and provide that output? Also, do you have any config in ~/.puppetlabs/bolt.yaml?

Nick

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3fac9078-7ead-47dc-90d6-96ab1b45ff4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages