(command.CommandList children: [ (command.ShFunction name: myping body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{<hash>} {<fping>}] redirects: [ (redir.Redir op: <Id.Redir_Great '2>'> fd: 2 arg_word: {</dev/null>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [(C {<fping>} {<-aq>} {($ Id.VSub_Number '$1')})] ) ) } spids: [45] ) ] ) ] spids: [32 42] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<ping>} {<-c>} {<1>} {($ Id.VSub_Number '$1')}) (C {<grep>} {<ttl>}) ] negated: F ) ] ) ) } spids: [60] ) ] ) ] ) (C {<echo>} {($ Id.VSub_DollarName '$RES')}) ] ) ) (command.If arms: [ (if_arm cond: [ (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: [ (C {<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' environment (role)'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] spids: [89 102] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENVIRONMENT) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [119] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROLE_REQUESTED) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [126] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<cluster.txt>}) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Sentence child: (C {<read>} {<HOSTNAME>} {<MACADDR>} {<IPADDR>} {<ILOIPADDR>} {<DOMAIN>} {<ROLE>}) terminator: <Id.Op_Semi _> ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: {($ Id.VSub_DollarName '$HOSTNAME')} right: {(DQ <end>)} ) ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)] spids: [165 180] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$ROLE_REQUESTED'))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: {(DQ ($ Id.VSub_DollarName '$ROLE'))} right: {(DQ ($ Id.VSub_DollarName '$ROLE_REQUESTED'))} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HOSTS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$HOSTS') <' '> ($ Id.VSub_DollarName '$HOSTNAME') ) } spids: [217] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IPS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$IPS') <' '> ($ Id.VSub_DollarName '$IPADDR') ) } spids: [225] ) ] ) ] spids: [189 214] ) ] ) ] ) redirects: [(redir.Redir op:<Id.Redir_Less '<'> fd:-1 arg_word:{<cluster.txt>})] ) (C {<echo>} {(DQ <'HOSTS = '> ($ Id.VSub_DollarName '$HOSTS'))}) (command.ForEach iter_name: HOST iter_words: [{($ Id.VSub_DollarName '$IPS')}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [(C {<myping>} {($ Id.VSub_DollarName '$HOST')})] ) ) } spids: [263] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {($ Id.VSub_DollarName '$RES')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {($ Id.VSub_DollarName '$HOST')} {<is>} {<down>}) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] spids: [273 284] ) ] else_action: [(C {<echo>} {($ Id.VSub_DollarName '$HOST')} {<is>} {<up>})] ) (C {<./nodessh.sh>} {($ Id.VSub_DollarName '$ENVIRONMENT')} {($ Id.VSub_DollarName '$HOST')} {(DQ <chef-client>)} {<sudo>} ) ] ) ) ] spids: [131 142] ) ] ) ] )