Jira (BOLT-1056) Shell one liners with pipes and redirects don't work with bolt command and run_as

1 view
Skip to first unread message

Alex Dreyer (JIRA)

unread,
Dec 21, 2018, 1:10:02 PM12/21/18
to puppe...@googlegroups.com
Alex Dreyer updated an issue
 
Puppet Task Runner / Bug BOLT-1056
Shell one liners with pipes and redirects don't work with bolt command and run_as
Change By: Alex Dreyer
For example:
{noformat}
bolt command run 'base64 -d /etc/puppetlabs/license.enc > /etc/puppetlabs/license.key' -n example.com --run-as root
{fornmat}

Fails because {{sudo base64 -d /etc/puppetlabs/license.enc}} is redirected as the original user  to {{/etc/puppetlabs/license.key}}

It's not clear how we can fix this without overriding the login shell. We should at least document how to call {{bash}} or another shell as the command.


Question: How can we make sure users find this documentation?
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Alex Dreyer (JIRA)

unread,
Dec 21, 2018, 1:10:03 PM12/21/18
to puppe...@googlegroups.com
Alex Dreyer created an issue
Issue Type: Bug Bug
Assignee: Unassigned
Components: DOCS
Created: 2018/12/21 10:09 AM
Priority: Normal Normal
Reporter: Alex Dreyer

For example:

 

bolt command run 'base64 -d /etc/puppetlabs/license.enc > /etc/puppetlabs/license.key' -n example.com --run-as root

{fornmat}

Fails because sudo base64 -d /etc/puppetlabs/license.enc is redirected as the original user to /etc/puppetlabs/license.key

It's not clear how we can fix this without overriding the login shell. We should at least document how to call bash or another shell as the command.

Lucy Wyman (JIRA)

unread,
Jun 25, 2019, 11:33:03 AM6/25/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
Change By: Lucy Wyman
For example:
{
noformat code }

bolt command run 'base64 -d /etc/puppetlabs/license.enc > /etc/puppetlabs/license.key' -n example.com --run-as root
{ fornmat code }


Fails because {{sudo base64 -d /etc/puppetlabs/license.enc}} is redirected as the original user  to {{/etc/puppetlabs/license.key}}

It's not clear how we can fix this without overriding the login shell. We should at least document how to call {{bash}} or another shell as the command.

Question: How can we make sure users find this documentation?

Lucy Wyman (JIRA)

unread,
Jun 25, 2019, 11:36:03 AM6/25/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages