Jira (BOLT-577) Running powershell script over ssh

2 views
Skip to first unread message

Shaigy Nixon (JIRA)

unread,
Jun 7, 2018, 5:31:02 PM6/7/18
to puppe...@googlegroups.com
Shaigy Nixon created an issue
 
Puppet Task Runner / Improvement BOLT-577
Running powershell script over ssh
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2018/06/07 2:30 PM
Priority: Normal Normal
Reporter: Shaigy Nixon

Integration team is planning to add tasks to beaker-pe for PE installation and setup. It will be nice if we have the option to run powershell script over ssh. Right now agent installation fails on windows as follows when trying with ssh (using puppetlabs-bootstrap):

/opt/puppetlabs/puppet/bin/bolt task run bootstrap::windows --no-host-key-check -m /etc/puppetlabs/code/environments/production/modules/ --nodes lw2qua8rouretwy.delivery.puppetlabs.net, master=lu2c4qh0g8lmaap.delivery.puppetlabs.net --user Administrator --no-host-key-check --debug
....
Executing: mkdir -m 700 /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713
Command returned successfully
Executing: chmod u\+x /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1
Command returned successfully
Executing: /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1
stderr: /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: syntax error near unexpected token `]'
/tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: `[CmdletBinding()]'
Command failed with exit code 2
Executing: rm -rf /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713
Command returned successfully
Closed session
Failed on lw2qua8rouretwy.delivery.puppetlabs.net:
  The task failed with exit code 2:
  /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: syntax error near unexpected token `]'
  /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: `[CmdletBinding()]'
 
  {
  }
....

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Shaigy Nixon (JIRA)

unread,
Jun 7, 2018, 5:35:04 PM6/7/18
to puppe...@googlegroups.com

Michael Smith (JIRA)

unread,
Jun 7, 2018, 5:37:02 PM6/7/18
to puppe...@googlegroups.com
Michael Smith updated an issue
 
Change By: Michael Smith
Integration team is planning to add tasks to beaker-pe for PE installation and setup.  It will be nice if we have the option to run powershell script over ssh. Right now agent installation fails on windows as follows when trying with ssh (using puppetlabs-bootstrap):
{code}

/opt/puppetlabs/puppet/bin/bolt task run bootstrap::windows --no-host-key-check -m /etc/puppetlabs/code/environments/production/modules/ --nodes lw2qua8rouretwy.delivery.puppetlabs.net, master=lu2c4qh0g8lmaap.delivery.puppetlabs.net --user Administrator --no-host-key-check --debug
....
Executing: mkdir -m 700 /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713
Command returned successfully
Executing: chmod u\+x /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1
Command returned successfully
Executing: /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1
stderr: /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: syntax error near unexpected token `]'
/tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: `[CmdletBinding()]'
Command failed with exit code 2
Executing: rm -rf /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713
Command returned successfully
Closed session
Failed on lw2qua8rouretwy.delivery.puppetlabs.net:
  The task failed with exit code 2:
  /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: syntax error near unexpected token `]'
  /tmp/a9fa26d0-b3bd-483a-a0f0-e51443362713/windows.ps1: line 1: `[CmdletBinding()]'

  {
  }
....
{code}

Powershell scripts run over SSH or local transport should support and default to the same powershell parameter passing that we use for WinRM.

Michael Smith (JIRA)

unread,
Jun 7, 2018, 5:37:02 PM6/7/18
to puppe...@googlegroups.com
Powershell scripts run over SSH or local transport should support and default to the same {{ powershell parameter passing }} input method that we use for WinRM.

Yasmin Rajabi (JIRA)

unread,
Feb 8, 2019, 1:32:04 PM2/8/19
to puppe...@googlegroups.com

Yasmin Rajabi (JIRA)

unread,
Aug 29, 2019, 5:41:02 PM8/29/19
to puppe...@googlegroups.com
Yasmin Rajabi updated an issue
Change By: Yasmin Rajabi
Labels: closed-github-move eyu windows
Reply all
Reply to author
Forward
0 new messages