(command.CommandList children: [ (C {<cube_echo>} {(DQ <'Hello World'>)}) (C {<cube_package>} {<install>} {<atop>}) (C {<cube_service>} {<enable>} {<atop>}) (C {<cube_service>} {<start>} {<atop>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<cube_command_exists>} {<dnf>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [(C {<dnf>} {<check-update>}) (C {<cube_check_return>})] ) ] spids: [33 41] ) ] ) (C {<cube_ensure_directory>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/test/'>}) (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<cube_read_heredoc>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {(SQ <HEREDOC>)} here_end_span_id: 79 stdin_parts: [ <'[app]\n'> <'name=${cubevar_app_name}\n'> <'test=${cubevar_app_test}\n'> ] ) ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cubevar_app_myconfig) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name cube_read_heredoc_result))} spids: [69] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cubevar_app_name) op: assign_op.Equal rhs: {(DQ <'Hello World'>)} spids: [81] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cubevar_app_test) op: assign_op.Equal rhs: { (DQ <'{ host: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cube_hostname>}) ) <', random: '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cube_random_number>} {<10>}) ) <', memory: '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<cube_total_memory>})) <', ip: '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<cube_interface_ipv4_address>} {<eth0>})) <' }'> ) } spids: [86] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<cube_set_file_contents_string>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/test/test.cfg'>} {(DQ (${ Id.VSub_Name cubevar_app_myconfig))} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<chmod>} {<600>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/test/test.cfg'>} ) (C {<cube_check_return>}) ] ) ] spids: [112 127] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cube_has_role>} {(DQ <production>)}) (C {<cube_file_contains>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/test/test.cfg'>} {(DQ <'ip: 10'>)} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(C {<cube_throw>} {(DQ <'Production role on test box'>)})] spids: [148 169] ) ] ) ] )