(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:IP)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$1'))}
          spids: [15]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ENVIRONMENT)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_Number '$2'))}
          spids: [20]
        )
      ]
    )
    (C {<echo>} {(DQ <'initial configuration of '> ($ Id.VSub_DollarName '$IP'))})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCPCMD)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'./nodescp    '> ($ Id.VSub_DollarName '$ENVIRONMENT') <' '> 
                ($ Id.VSub_DollarName '$IP')
              )
            }
          spids: [33]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHCMD)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'./nodessh.sh '> ($ Id.VSub_DollarName '$ENVIRONMENT') <' '> 
                ($ Id.VSub_DollarName '$IP')
              )
            }
          spids: [41]
        )
      ]
    )
    (C {<echo>} {(DQ <'Checking for Chef ...'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CHEF)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                command_list: 
                  (command.CommandList
                    children: [
                      (C {($ Id.VSub_DollarName '$SSHCMD')} {(DQ <'which chef-client || true'>)})
                    ]
                  )
              )
            }
          spids: [57]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: {(DQ ($ Id.VSub_DollarName '$CHEF'))}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (C {<echo>} {(DQ <'copy files...'>)})
            (C {($ Id.VSub_DollarName '$SCPCMD')} {<zap-ceph-disks.sh>} {</home/ubuntu>})
            (C {($ Id.VSub_DollarName '$SCPCMD')} {<cookbooks/bcpc/files/default/bins/chef-client.deb>} 
              {</home/ubuntu>}
            )
            (C {($ Id.VSub_DollarName '$SCPCMD')} {<install-chef.sh>} {</home/ubuntu>})
            (C {($ Id.VSub_DollarName '$SCPCMD')} {<finish-worker.sh>} {</home/ubuntu>})
            (C {($ Id.VSub_DollarName '$SCPCMD')} {<finish-head.sh>} {</home/ubuntu>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_n
                              child: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Sentence
                                              child: 
                                                (command.Simple
                                                  words: [{<source>} {<proxy_setup.sh>}]
                                                  redirects: [
                                                    (redir.Redir
                                                      op: <Id.Redir_Great '>'>
                                                      fd: -1
                                                      arg_word: {</dev/null>}
                                                    )
                                                  ]
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                            (C {<echo>} {($ Id.VSub_DollarName '$PROXY')})
                                          ]
                                        )
                                    )
                                  )
                                }
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PROXY)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Sentence
                                        child: 
                                          (command.Simple
                                            words: [{<source>} {<proxy_setup.sh>}]
                                            redirects: [
                                              (redir.Redir
                                                op: <Id.Redir_Great '>'>
                                                fd: -1
                                                arg_word: {</dev/null>}
                                              )
                                            ]
                                          )
                                        terminator: <Id.Op_Semi _>
                                      )
                                      (C {<echo>} {($ Id.VSub_DollarName '$PROXY')})
                                    ]
                                  )
                              )
                            }
                          spids: [157]
                        )
                      ]
                    )
                    (C {<echo>} {(DQ <"setting up .wgetrc's to "> ($ Id.VSub_DollarName '$PROXY'))})
                    (C {($ Id.VSub_DollarName '$SSHCMD')} 
                      {
                        (DQ <'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                          <'http_proxy = http://'> ($ Id.VSub_DollarName '$PROXY') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                          <' > .wgetrc'>
                        )
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Unary
                                      op_id: Id.BoolUnary_n
                                      child: {(DQ ($ Id.VSub_DollarName '$APTPROXY'))}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {
                                  (DQ <'Acquire::http::Proxy '> 
                                    (word_part.EscapedLiteral
                                      token: <Id.Lit_EscapedChar '\\"'>
                                    ) <'http://'> (${ Id.VSub_Name APTPROXY) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <';'>
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Great '>'>
                                  fd: -1
                                  arg_word: {</tmp/apt.conf>}
                                )
                              ]
                            )
                            (C {($ Id.VSub_DollarName '$SCPCMD')} {</tmp/apt.conf>} {</tmp>})
                            (C {($ Id.VSub_DollarName '$SSHCMD')} 
                              {(DQ <'mv /tmp/apt.conf /etc/apt/apt.conf'>)} {<sudo>}
                            )
                          ]
                          spids: [198 211]
                        )
                      ]
                    )
                  ]
                  spids: [129 154]
                )
              ]
            )
            (C {<echo>} {(DQ <'setup chef'>)})
            (C {($ Id.VSub_DollarName '$SSHCMD')} {(DQ </home/ubuntu/install-chef.sh>)} {<sudo>})
          ]
          spids: [69 82]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'Chef is installed as '> ($ Id.VSub_DollarName '$CHEF'))})]
    )
    (C {<echo>} {(DQ <'zap disks'>)})
    (C {($ Id.VSub_DollarName '$SSHCMD')} {(DQ </home/ubuntu/zap-ceph-disks.sh>)} {<sudo>})
    (C {<echo>} {(DQ <'temporarily adjust system time to avoid time skew related failures'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:GOODDATE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                command_list: (command.CommandList children:[(C {<date>})])
              )
            }
          spids: [304]
        )
      ]
    )
    (C {($ Id.VSub_DollarName '$SSHCMD')} {(DQ <"date -s '"> ($ Id.VSub_DollarName '$GOODDATE') <"'">)} 
      {<sudo>}
    )
    (C {<echo>} {(DQ <done.>)})
  ]
)