(command.CommandList children: [ (command.ShFunction name: gen_knife_config body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 62 stdin_parts: [ <'current_dir = File.dirname(__FILE__)\n'> <'log_level :info\n'> <'log_location STDOUT\n'> <'node_name '> <Id.Right_DoubleQuote '"'> <admin> <Id.Right_DoubleQuote '"'> <'\n'> <'client_key '> <Id.Right_DoubleQuote '"'> <'#{current_dir}/admin.pem'> <Id.Right_DoubleQuote '"'> <'\n'> <'validation_client_name '> <Id.Right_DoubleQuote '"'> <bcpc-validator> <Id.Right_DoubleQuote '"'> <'\n'> <'validation_key '> <Id.Right_DoubleQuote '"'> <'#{current_dir}/bcpc-validator.pem'> <Id.Right_DoubleQuote '"'> <'\n'> <'chef_server_url '> <Id.Right_DoubleQuote '"'> <'https://bcpc-bootstrap/organizations/bcpc'> <Id.Right_DoubleQuote '"'> <'\n'> <'cache_type \'BasicFile\'\n'> <'cache_options( :path => '> <Id.Right_DoubleQuote '"'> <'#{ENV[\'HOME\']}/.chef/checksums'> <Id.Right_DoubleQuote '"'> <' )\n'> <'cookbook_path ['> <Id.Right_DoubleQuote '"'> <'#{current_dir}/../cookbooks'> <Id.Right_DoubleQuote '"'> <']\n'> ] ) ) ] do_fork: T ) ] ) ) (command.ShFunction name: copy_client_keys body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$SUDO_USER'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OWNER) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$SUDO_USER')} spids: [88] ) ] ) ] spids: [72 85] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OWNER) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$USER')} spids: [95] ) ] ) ] ) (C {<install>} {<-d>} {<-m0770>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} {<.chef>}) (C {<sudo>} {<install>} {<-m0600>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} {<'/etc/opscode/admin.pem'>} {<'.chef/admin.pem'>} ) (C {<sudo>} {<install>} {<-m0600>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} {<'/etc/opscode/bcpc-validator.pem'>} {<'.chef/bcpc-validator.pem'>} ) ] ) ) (C {<set>} {<-x>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PROXY_INFO_FILE) op: assign_op.Equal rhs: {(DQ <'/home/vagrant/proxy_info.sh'>)} spids: [156] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_f child: {($ Id.VSub_DollarName '$PROXY_INFO_FILE')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<.>} {($ Id.VSub_DollarName '$PROXY_INFO_FILE')})] spids: [161 172] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<'./proxy_setup.sh'>}) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<.>} {<'./proxy_setup.sh'>})] spids: [182 193] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_Number '$1'))}) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BOOTSTRAP_IP) op: assign_op.Equal rhs: {<10.0.100.3>} spids: [219] ) ] ) ] spids: [203 216] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BOOTSTRAP_IP) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [225] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_Number '$2'))}) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USER) op: assign_op.Equal rhs: {<root>} spids: [247] ) ] ) ] spids: [231 244] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USER) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [253] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<'.chef/knife.rb'>}) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<knife>} {<node>} {<delete>} {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<hostname>} {<-f>}))} {<-y>} ) (C {<true>}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<knife>} {<client>} {<delete>} {($ Id.VSub_DollarName '$USER')} {<-y>}) (C {<true>}) ] ) (C {<mv>} {<'.chef/'>} { (DQ <.chef_found_> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<date>} {<Id.Lit_Other '+'> (DQ <'%m-%d-%Y %H:%M:%S'>)}) ) ) } ) ] spids: [262 273] ) ] ) (C {<install>} {<-d>} {<-m0700>} {<.chef>}) (command.Simple words: [{<gen_knife_config>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.chef/knife.rb'>})] do_fork: T ) (C {<cp>} {<-p>} {<'.chef/knife.rb'>} {<'.chef/knife-proxy.rb'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$http_proxy'))} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'http_proxy '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (${ Id.VSub_Name http_proxy) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'.chef/knife-proxy.rb'>} ) ] do_fork: T ) (command.Simple words: [ {<echo>} { (DQ <'https_proxy '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (${ Id.VSub_Name https_proxy) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'.chef/knife-proxy.rb'>} ) ] do_fork: T ) ] spids: [354 369] ) ] ) (C {<copy_client_keys>}) (C {<knife>} {<ssl>} {<fetch>}) (C {<cd>} {<cookbooks>}) (command.ForEach iter_names: [cookbook] iterable: (for_iter.Words words: [ {(DQ <'apt 1.10.0'>)} {<ubuntu>} {<cron>} {<ntp>} {(DQ <'yum 3.2.2'>)} {(DQ <'logrotate 1.6.0'>)} ] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.Unary op_id: Id.BoolUnary_d child: { (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<knife>} {<cookbook>} {<site>} {<download>} {($ Id.VSub_DollarName '$cookbook')} {<--config>} {<'../.chef/knife-proxy.rb'>} ) (C {<tar>} {<zxf>} { (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) <Id.Lit_Star '*'> <.tar.gz> } ) (C {<rm>} { (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) <Id.Lit_Star '*'> <.tar.gz> } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_f child: { (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) <.patch> } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<pushd>} { (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) } ) (command.Simple words: [{<patch>} {<-p1>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<'../'> (braced_var_sub token: <Id.VSub_Name cookbook> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) <.patch> } ) ] do_fork: T ) (C {<popd>}) ] spids: [520 537] ) ] ) ] spids: [454 472] ) ] ) ] ) ) ] )