Skip to content
This repository
Browse code

Merge pull request #710 from moutten/patch-1

Add the --format tag to knife list commands
  • Loading branch information...
commit 2864e421eaf67adf334efc9e5d0e05e8af1221b4 2 parents 7c66c63 + 10618f3
Robby Russell authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 plugins/knife/_knife
12 plugins/knife/_knife
@@ -141,27 +141,27 @@ _knife_options3() {
141 141
142 142 # The chef_x_remote functions use knife to get a list of objects of type x on the server
143 143 _chef_roles_remote() {
144   - (knife role list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  144 + (knife role list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
145 145 }
146 146
147 147 _chef_clients_remote() {
148   - (knife client list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  148 + (knife client list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
149 149 }
150 150
151 151 _chef_nodes_remote() {
152   - (knife node list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  152 + (knife node list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
153 153 }
154 154
155 155 _chef_cookbooks_remote() {
156   - (knife cookbook list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  156 + (knife cookbook list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
157 157 }
158 158
159 159 _chef_sitecookbooks_remote() {
160   - (knife cookbook site list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  160 + (knife cookbook site list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
161 161 }
162 162
163 163 _chef_data_bags_remote() {
164   - (knife data bag list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
  164 + (knife data bag list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
165 165 }
166 166
167 167 _chef_environments_remote() {

0 comments on commit 2864e42

Please sign in to comment.
Something went wrong with that request. Please try again.