On Mon, Apr 2, 2018 at 8:03 AM Ty Young <tythecell...@gmail.com> wrote:

> 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
> <https://puppet.com/docs/bolt/0.x/running_bolt_commands.html>, I'm
> formatting the command successfully.
>
> Am I missing something here?
> Thanks
> ty
>

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+unsubscr...@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
> <https://groups.google.com/d/msgid/puppet-users/3fac9078-7ead-47dc-90d6-96ab1b45ff4c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CANa5_qKcMRbk-4eLfeA6w29SKncsdfJiqt-YxBXH2ksgZ0zErQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to