(command.CommandList children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_Pound '$#')} right: {<2>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'Usage: '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' IP-Address Chef-Environment'> ) } ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/stderr'>} ) ] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] spids: [14 27] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HOSTNAME) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<hostname>} {<-f>}))} spids: [58] ) ] ) (command.Pipeline children: [ (C {<knife>} {<client>} {<list>}) (command.Simple words: [{<grep>} {($ Id.VSub_DollarName '$HOSTNAME')}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] do_fork: T ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [83] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {(DQ (${ Id.VSub_Name RES))} right: {<0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sudo>} {<bash>} {<-c>} {(SQ <'EDITOR=true knife client create $(hostname -f) > /etc/chef/client.pem'>)} ) (C {<knife>} {<actor>} {<map>}) (C {<knife>} {<group>} {<add>} {<actor>} {<admins>} {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<hostname>} {<-f>}))} ) ] spids: [86 103] ) ] else_action: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$HOSTNAME') <' already registered in Chef'>)}) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_d child:{<'/home/vagrant'>}) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<knife>} {<bootstrap>} {<-E>} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$1')} {<-i>} {<'/chef-bcpc-host/vbox/insecure_private_key'>} {<-x>} {<vagrant>} {<--sudo>} ) ] spids: [156 167] ) ] else_action: [ (C {<knife>} {<bootstrap>} {<-E>} {($ Id.VSub_Number '$2')} {($ Id.VSub_Number '$1')} {<-x>} {<ubuntu>} {<--sudo>} ) ] ) (C {<knife>} {<node>} {<run_list>} {<add>} {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<hostname>} {<-f>}))} {(SQ <'role[BCPC-Bootstrap]'>)} ) (C {<sudo>} {<chef-client>}) ] )