Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-08-27 Thread Yasmin Rajabi (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Yasmin Rajabi updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Yasmin Rajabi  
 
 
Labels: 
 closed-github-move  eyu  known-issue-added windows  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.296554.1550589154000.74917.1566932340682%40Atlassian.JIRA.


Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-21 Thread Melissa Amos (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Melissa Amos updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Melissa Amos  
 
 
Labels: 
 known-issue-added windows  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-21 Thread Melissa Amos (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Melissa Amos updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Melissa Amos  
 
 
Release Notes Summary: 
 The PowerShell cmdlet ConvertTo When passing complex arguments to tasks with - Json typically does not produce -params,  JSON  output consumable by  strings (typically created with  the  ConvertTo  - -params Bolt argument. Some values may need Json cmdlet) might require  additional escaping  to be properly passed to Bolt, while other types of values may not serialize in an easily consumable way .  The PowerShell  In some cases, you can use the  stop - parsing symbol --%  may be used in some cases to address the escaping problem  as a workaround .  A more comprehensive general solution will be addressed later.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at 

Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-19 Thread Ethan Brown (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ethan Brown updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Ethan Brown  
 
 
Release Notes Summary: 
 The PowerShell cmdlet ConvertTo-Json typically does not produce JSON output consumable by the --params Bolt argument. Some values may need additional escaping to be properly passed to Bolt, while other types of values may not serialize in an easily consumable way. The PowerShell stop-parsing symbol --% may be used in some cases to address the escaping problem. A more comprehensive general solution will be addressed later.  
 
 
Release Notes: 
 Known Issue  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to 

Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-19 Thread Ethan Brown (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ethan Brown updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Ethan Brown  
 

  
 
 
 
 

 
 BOLT-159 introduced a change to simplify argument passing from PowerShell when dealing with nested quotes.The change does improve the case mentioned, such that users can now use a simpler invocation like the following (rather than using {{"""}} themselves):  {code}  bolt command run 'echo "hi from $(hostname)"' --modulepath .  --nodes winrm://localhost -u Administrator -p Qu@lity! --no-ssl{code}  However, there are still cases where using more complex argument passing does not work properly due to not all values being escaped correctly for Ruby.In an ideal situation, a complex object should be serializable to a JSON string, which can then be passed directly like {{--params ($myobject | ConvertTo-Json)}}. Note that we will likely need a new PowerShell helper to serialize the values as desired, because of the way {{ConvertTo-Json}} handles certain types.  For instance, more complex values like {{RegEx}}, {{IO.FileInfo}} and {{DateTime}} do not serialize in a way that's friendly to Bolt, requiring that {{ToString()}} be called first.  {code}  PS C:\cygwin64\home\Administrator> [DateTime]::Now | ConvertTo-Json{"value":  "\/Date(155054351)\/","DateTime":  "Tuesday, February 19, 2019 3:08:04 PM"}PS C:\cygwin64\home\Administrator> [DateTime]::Now.ToString() | ConvertTo-Json"2/19/2019 3:08:07 PM"PS C:\cygwin64\home\Administrator> [IO.FileInfo]'c:\windows' | ConvertTo-Json{"Name":  "windows","Length":  null,"DirectoryName":  "c:\\","Directory":  { "Name":  "c:\\", "FullName":  "c:\\", "Parent":  null, "Exists":  true, "Root":  { "Name":  "c:\\", "FullName":  "c:\\", "Parent":  null, "Exists":  true, "Root":  "c:\\", "Extension":  "", "CreationTime":  "\/Date(1536991766317)\/", "CreationTimeUtc":  "\/Date(1536991766317)\/", "LastAccessTime":  "\/Date(1550181187575)\/", "LastAccessTimeUtc":  "\/Date(1550181187575)\/", "LastWriteTime":  "\/Date(1550181186731)\/", "LastWriteTimeUtc":  "\/Date(1550181186731)\/", "Attributes":  22 }, "Extension":  "", "CreationTime":  "\/Date(1536991766317)\/", "CreationTimeUtc":  "\/Date(1536991766317)\/", "LastAccessTime":  "\/Date(1550181187575)\/", "LastAccessTimeUtc":  "\/Date(1550181187575)\/", "LastWriteTime":  "\/Date(1550181186731)\/", "LastWriteTimeUtc":  "\/Date(1550181186731)\/", "Attributes":  22

Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-19 Thread Ethan Brown (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ethan Brown updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Change By: 
 Ethan Brown  
 

  
 
 
 
 

 
 BOLT-159 introduced a change to simplify argument passing from PowerShell when dealing with nested quotes.The change does improve the case mentioned, such that users can now use a simpler invocation like the following (rather than using {{"""}} themselves):{code}bolt command run 'echo "hi from $(hostname)"' --modulepath .  --nodes winrm://localhost -u Administrator -p Qu@lity! --no-ssl{code}However, there are still cases where using more complex argument passing does not work properly due to not all values being escaped correctly for Ruby.In an ideal situation, a complex object should be serializable to a JSON string, which can then be passed directly like {{--params ($myobject | ConvertTo-Json)}}. Note that we will likely need a new PowerShell helper to serialize the values as desired, because of the way {{ConvertTo-Json}} handles certain types.  For instance, more complex values like {{RegEx}}, {{IO.FileInfo}} and {{DateTime}} do not serialize in a way that's friendly to Bolt, requiring that {{ToString()}} be called first.{code}PS C:\cygwin64\home\Administrator> [DateTime]::Now | ConvertTo-Json{"value":  "\/Date(155054351)\/","DateTime":  "Tuesday, February 19, 2019 3:08:04 PM"}PS C:\cygwin64\home\Administrator> [DateTime]::Now.ToString() | ConvertTo-Json"2/19/2019 3:08:07 PM"PS C:\cygwin64\home\Administrator> [IO.FileInfo]'c:\windows' | ConvertTo-Json{"Name":  "windows","Length":  null,"DirectoryName":  "c:\\","Directory":  { "Name":  "c:\\", "FullName":  "c:\\", "Parent":  null, "Exists":  true, "Root":  { "Name":  "c:\\", "FullName":  "c:\\", "Parent":  null, "Exists":  true, "Root":  "c:\\", "Extension":  "", "CreationTime":  "\/Date(1536991766317)\/", "CreationTimeUtc":  "\/Date(1536991766317)\/", "LastAccessTime":  "\/Date(1550181187575)\/", "LastAccessTimeUtc":  "\/Date(1550181187575)\/", "LastWriteTime":  "\/Date(1550181186731)\/", "LastWriteTimeUtc":  "\/Date(1550181186731)\/", "Attributes":  22 }, "Extension":  "", "CreationTime":  "\/Date(1536991766317)\/", "CreationTimeUtc":  "\/Date(1536991766317)\/", "LastAccessTime":  "\/Date(1550181187575)\/", "LastAccessTimeUtc":  "\/Date(1550181187575)\/", "LastWriteTime":  "\/Date(1550181186731)\/", "LastWriteTimeUtc":  "\/Date(1550181186731)\/", "Attributes":  22  

Jira (BOLT-1130) Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params

2019-02-19 Thread Ethan Brown (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ethan Brown created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1130  
 
 
  Bolt PowerShell wrapper should allow for the use of Convert-ToJson (or similar) when using --params   
 

  
 
 
 
 

 
Issue Type: 
  Task  
 
 
Affects Versions: 
 BOLT 1.11.0  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 Windows  
 
 
Created: 
 2019/02/19 7:12 AM  
 
 
Labels: 
 windows  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Ethan Brown  
 

  
 
 
 
 

 
 BOLT-159 introduced a change to simplify argument passing from PowerShell when dealing with nested quotes. The change does improve the case mentioned, such that users can now use a simpler invocation like the following (rather than using """ themselves):  
 
 
 
 
 bolt command run 'echo "hi from $(hostname)"' --modulepath .  --nodes winrm://localhost -u Administrator -p Qu@lity! --no-ssl
  
 
 
 
  However, there are still cases where using more complex argument passing does not work properly due to not all values being escaped correctly for Ruby. In an ideal situation, a complex object should be serializable to a JSON string, which can then be passed