Jira (BOLT-1384) Inventory command

2019-08-12 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 I don't think just removing the final line is a good long term solution. We intended to solve multiple use cases with the fix we added one of which was predicting what target a bolt command would run on. In that case the count is useful.  In general the default "human" output for bolt is not intended to be stable for consumption from bash scripts which is why we've discussed a "oneline" format in the past. If we do add oneline support for this feature we should make sure to add some information beyond the 'name' to force the user to use cut in the initial release otherwise we'll likely break the output in the future.  
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.52730.1565651700226%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-08-12 Thread Corey Osman (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Corey Osman commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 IMHO, the default usage of this command will be for scripts.  If that is the case we should make the default behavior work for the scripts and not against them. So in a case like:  
 
 
 
 
 #!/usr/bin/env bash nodes=$(bolt inventory --nodes ubuntu) for node in $nodes; do ssh-copy-id ethos@${nodes} done
  
 
 
 
  I don't want to go hunt down which modifier I need to add in order to not return "55 targets".  I also don't want to run the command first only to have it fail on the node called "55" and "targets".  So I would like to have this count removed by default.     
 

  
 
 
 
 

 
 
 

 
 
 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 

Jira (BOLT-1384) Inventory command

2019-08-12 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 This seems like a usecase for the often discussed `--format oneline`  
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.52590.1565649120314%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-08-12 Thread Lucy Wyman (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Lucy Wyman commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 Corey Osman What's your use case? I don't follow why –format json doesn't work. You could theoretically use tee to send the output to another stream / file, if you want to both read it and consume it. Is the human formatting what you need for it to be consumed?  
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.52063.1565635800346%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-08-02 Thread Corey Osman (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Corey Osman commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 I would need --format=text, --format=json I would prefer to just have the node count removed by default.  Use a verbose option if you want the count.  
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.42177.1564777200155%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-08-02 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 Does --format=json work?  
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.42173.1564777020136%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-07-25 Thread Corey Osman (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Corey Osman commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 This does satisfy my use case.  Just tried this out. However,  this creates a new problem in that the node count at the bottom will cause any script written against the output of the inventory command to break.  The node count should be removed by default or added as a option.  
 
 
 
 
 192.168.70.104  
 
 
 192.168.70.110  
 
 
 192.168.70.119  
 
 
 192.168.70.125  
 
 
 192.168.70.128  
 
 
 192.168.70.135  
 
 
 192.168.70.136  
 
 
 55 targets
  
 
 
 
   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 

Jira (BOLT-1384) Inventory command

2019-07-25 Thread Tom Beech (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tom Beech commented on  BOLT-1384  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Inventory command   
 

  
 
 
 
 

 
 A `bolt inventory show` command was added in 1.26.0 and supports human and json format. (https://puppet.com/docs/bolt/latest/bolt_new_features.html#section-fh3-j5c-j3b) Does this satisfy your use case?    
 

  
 
 
 
 

 
 
 

 
 
 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.312167.1560296026000.31377.1564075980190%40Atlassian.JIRA.


Jira (BOLT-1384) Inventory command

2019-06-11 Thread Corey Osman (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Corey Osman created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-1384  
 
 
  Inventory command   
 

  
 
 
 
 

 
Issue Type: 
  New Feature  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2019/06/11 4:33 PM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Corey Osman  
 

  
 
 
 
 

 
 I would like to have an inventory command to interact with the inventory file, puppetdb or other place bolt retrieves the list of nodes from. This would allow me to see what is in the inventory before running and also write bootstrap scripts outside of bolt This command would prevent me from having to always parse out the inventory file to accomplish the same thing. Example:    
 
 
 
 
 #!/usr/bin/env bash  
 
 
    
 
 
 nodes=$(bolt inventory --nodes ubuntu)  
 
 
 for node in $nodes; do  
 
 
   ssh-copy-id ethos@${nodes}  
 
 
 done