(CommandList children: [ (FuncDef name: gen_knife_config body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("current_dir = File.dirname(__FILE__)\n") ("log_level :info\n") ("log_location STDOUT\n") ("node_name ") (Right_DoubleQuote "\"") (admin) (Right_DoubleQuote "\"") ("\n") ("client_key ") (Right_DoubleQuote "\"") ("#{current_dir}/admin.pem") (Right_DoubleQuote "\"") ("\n") ("validation_client_name ") (Right_DoubleQuote "\"") (bcpc-validator) (Right_DoubleQuote "\"") ("\n") ("validation_key ") (Right_DoubleQuote "\"") ("#{current_dir}/bcpc-validator.pem") (Right_DoubleQuote "\"") ("\n") ("chef_server_url ") (Right_DoubleQuote "\"") ("https://bcpc-bootstrap/organizations/bcpc") (Right_DoubleQuote "\"") ("\n") ("cache_type 'BasicFile'\n") ("cache_options( :path => ") (Right_DoubleQuote "\"") ("#{ENV['HOME']}/.chef/checksums") (Right_DoubleQuote "\"") (" )\n") ("cookbook_path [") (Right_DoubleQuote "\"") ("#{current_dir}/../cookbooks") (Right_DoubleQuote "\"") ("]\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [19] ) ] ) ] spids: [14] ) spids: [11 14] ) (FuncDef name: copy_client_keys body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_n child:{(DQ ($ VSub_Name "$SUDO_USER"))}) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OWNER) op: Equal rhs: {($ VSub_Name "$SUDO_USER")} spids: [86] ) ] spids: [86] ) ] spids: [-1 83] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OWNER) op: Equal rhs: {($ VSub_Name "$USER")} spids: [93] ) ] spids: [93] ) ] spids: [90 97] ) (C {(install)} {(-d)} {(-m0770)} {(-o)} {($ VSub_Name "$OWNER")} {(.chef)}) (C {(sudo)} {(install)} {(-m0600)} {(-o)} {($ VSub_Name "$OWNER")} {(/etc/opscode/admin.pem)} {(.chef/admin.pem)} ) (C {(sudo)} {(install)} {(-m0600)} {(-o)} {($ VSub_Name "$OWNER")} {(/etc/opscode/bcpc-validator.pem)} {(.chef/bcpc-validator.pem)} ) ] spids: [67] ) spids: [64 67] ) (C {(set)} {(-x)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PROXY_INFO_FILE) op: Equal rhs: {(DQ (/home/vagrant/proxy_info.sh))} spids: [154] ) ] spids: [154] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_f child:{($ VSub_Name "$PROXY_INFO_FILE")}) ) terminator: <Op_Semi ";"> ) ] action: [(C {(.)} {($ VSub_Name "$PROXY_INFO_FILE")})] spids: [-1 170] ) ] spids: [-1 177] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_f child:{(./proxy_setup.sh)})) terminator: <Op_Semi ";"> ) ] action: [(C {(.)} {(./proxy_setup.sh)})] spids: [-1 191] ) ] spids: [-1 198] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Number "$1"))})) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BOOTSTRAP_IP) op: Equal rhs: {(10.0.100.3)} spids: [217] ) ] spids: [217] ) ] spids: [-1 214] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BOOTSTRAP_IP) op: Equal rhs: {($ VSub_Number "$1")} spids: [223] ) ] spids: [223] ) ] spids: [220 226] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Number "$2"))})) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:USER) op:Equal rhs:{(root)} spids:[245])] spids: [245] ) ] spids: [-1 242] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USER) op: Equal rhs: {($ VSub_Number "$2")} spids: [251] ) ] spids: [251] ) ] spids: [248 254] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_f child:{(.chef/knife.rb)})) terminator: <Op_Semi ";"> ) ] action: [ (AndOr children: [ (C {(knife)} {(node)} {(delete)} { (CommandSubPart command_list: (CommandList children:[(C {(hostname)} {(-f)})]) left_token: <Left_Backtick "`"> spids: [280 284] ) } {(-y)} ) (C {(true)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(knife)} {(client)} {(delete)} {($ VSub_Name "$USER")} {(-y)}) (C {(true)})] op_id: Op_DPipe ) (C {(mv)} {(.chef/)} { (DQ (.chef_found_) (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other "+") (DQ ("%m-%d-%Y %H:%M:%S"))})] ) left_token: <Left_CommandSub "$("> spids: [314 321] ) ) } ) ] spids: [-1 271] ) ] spids: [-1 324] ) (C {(install)} {(-d)} {(-m0700)} {(.chef)}) (SimpleCommand words: [{(gen_knife_config)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(.chef/knife.rb)} spids:[337])] ) (C {(cp)} {(-p)} {(.chef/knife.rb)} {(.chef/knife-proxy.rb)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Name "$http_proxy"))}) ) ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("http_proxy ") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (${ VSub_Name http_proxy) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(.chef/knife-proxy.rb)} spids: [379] ) ] ) (SimpleCommand words: [ {(echo)} { (DQ ("https_proxy ") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (${ VSub_Name https_proxy) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(.chef/knife-proxy.rb)} spids: [395] ) ] ) ] spids: [-1 365] ) ] spids: [-1 399] ) (C {(copy_client_keys)}) (C {(knife)} {(ssl)} {(fetch)}) (C {(cd)} {(cookbooks)}) (ForEach iter_name: cookbook iter_words: [ {(DQ ("apt 1.10.0"))} {(ubuntu)} {(cron)} {(ntp)} {(DQ ("yum 3.2.2"))} {(DQ ("logrotate 1.6.0"))} ] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_d child: { (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(" *")}) spids: [458 462] ) } ) ) ) terminator: <Op_Semi ";"> ) ] action: [ (C {(knife)} {(cookbook)} {(site)} {(download)} {($ VSub_Name "$cookbook")} {(--config)} {(../.chef/knife-proxy.rb)} ) (C {(tar)} {(zxf)} { (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(" *")}) spids: [493 497] ) (Lit_Other "*") (.tar.gz) } ) (C {(rm)} { (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(" *")}) spids: [504 508] ) (Lit_Other "*") (.tar.gz) } ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_f child: { (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {(" *")} ) spids: [519 523] ) (.patch) } ) ) terminator: <Op_Semi ";"> ) ] action: [ (C {(pushd)} { (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(" *")}) spids: [534 538] ) } ) (SimpleCommand words: [{(patch)} {(-p1)}] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(../) (BracedVarSub token: <VSub_Name cookbook> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(" *")}) spids: [548 552] ) (.patch) } spids: [545] ) ] ) (C {(popd)}) ] spids: [-1 529] ) ] spids: [-1 559] ) ] spids: [-1 467] ) ] spids: [-1 562] ) ] spids: [447 564] ) spids: [427 445] ) ] )