(CommandList children: [ (Pipeline children: [ (C {(cat)} {(/etc/) (Lit_Other "*") (-release)}) (C {(grep)} { (DQ ("ID=") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (rhel) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) ) } ) ] negated: False ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OS_RHEL) op:Equal rhs:{($ VSub_QMark "$?")} spids:[95])] spids: [95] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-d)} {(/etc/systemd)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("[Manager]\n") ("DefaultCPUAccounting=yes\n") ("DefaultMemoryAccounting=yes\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [118] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(kubernetes-accounting.conf)} spids: [121] ) ] ) (C {(sudo)} {(mkdir)} {(-p)} {(/etc/systemd/system.conf.d/)}) (C {(sudo)} {(cp)} {(kubernetes-accounting.conf)} {(/etc/systemd/system.conf.d)}) (C {(sudo)} {(systemctl)} {(daemon-reload)}) ] spids: [-1 113] ) ] spids: [-1 152] ) (If arms: [ (if_arm cond: [ (Sentence child: (C { (CommandSubPart command_list: (CommandList children: [ (Sentence child: (C {(sudo)} {(systemctl)} {(status)} {(update-engine)}) terminator: <Op_Amp "&"> ) (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [170] ) ] ) ] ) left_token: <Left_CommandSub "$("> spids: [160 172] ) } ) terminator: <Op_Semi ";"> ) ] action: [(C {(sudo)} {(systemctl)} {(mask)} {(update-engine)} {(locksmithd)})] spids: [-1 175] ) ] spids: [-1 188] ) (C {(sudo)} {(grep)} {(-q)} {(DQ ("# Defaults requiretty"))} {(/etc/sudoers)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(sudo)} {(sed)} {(-i)} {(SQ <"s/Defaults requiretty/# Defaults requiretty/">)} {(/etc/sudoers)} ) ] spids: [-1 220] ) ] spids: [-1 235] ) (Pipeline children: [(C {(cat)} {(/etc/) (Lit_Other "*") (-release)}) (C {(grep)} {(DQ ("ID=ubuntu"))})] negated: False ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-eq)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(which)} {(nsenter)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [279] ) ] ) ] negated: True ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ("Do not find nsenter. Install it."))}) (C {(mkdir)} {(-p)} {(/tmp/nsenter-install)}) (C {(cd)} {(/tmp/nsenter-install)}) (Pipeline children: [ (C {(curl)} {(https) (Lit_Other ":") ( //www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz ) } ) (C {(tar)} {(-zxf-)}) ] negated: False ) (C {(sudo)} {(apt-get)} {(update)}) (C {(sudo)} {(apt-get)} {(--yes)} {(install)} {(make)}) (C {(sudo)} {(apt-get)} {(--yes)} {(install)} {(gcc)}) (C {(cd)} {(util-linux-2.24)}) (C {(./configure)} {(--without-ncurses)}) (C {(make)} {(nsenter)}) (C {(sudo)} {(cp)} {(nsenter)} {(/usr/local/bin)}) (C {(rm)} {(-rf)} {(/tmp/nsenter-install)}) ] spids: [-1 284] ) ] spids: [-1 379] ) ] spids: [-1 268] ) ] spids: [-1 381] ) (SimpleCommand words: [{(hash)} {(docker)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[391])] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$OS_RHEL")} {(-eq)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(sudo)} {(yum)} {(install)} {(-y)} {(docker-latest)}) (C {(sudo)} {(groupadd)} {(docker)}) (C {(sudo)} {(systemctl)} {(enable)} {(docker-latest.service)}) (C {(sudo)} {(systemctl)} {(start)} {(docker-latest.service)}) ] spids: [-1 431] ) ] else_action: [ (Pipeline children: [ (C {(curl)} {(-fsSL)} {(https) (Lit_Other ":") (//get.docker.com/)}) (C {(sh)}) ] negated: False ) (C {(sudo)} {(service)} {(docker)} {(start)}) (C {(sudo)} {(systemctl)} {(enable)} {(docker.service)}) ] spids: [470 504] ) ] spids: [-1 407] ) ] spids: [-1 506] ) (AndOr children: [(C {(id)} {(jenkins)}) (C {(sudo)} {(useradd)} {(jenkins)} {(-m)})] op_id: Op_DPipe ) (C {(sudo)} {(usermod)} {(-a)} {(-G)} {(docker)} {(jenkins)}) (Pipeline children: [(C {(cat)} {(/etc/) (Lit_Other "*") (-release)}) (C {(grep)} {(DQ ("ID=debian"))})] negated: False ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(hash)} {(apt-get)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[576])] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(1)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(sudo)} {(apt-get)} {(install)} {(lxc)} {(-y)}) (C {(lxc-checkconfig)}) (C {(sudo)} {(sed)} {(-i)} { (SQ < "s/GRUB_CMDLINE_LINUX=\"\\(.*\\)\"/GRUB_CMDLINE_LINUX=\"\\1 cgroup_enable=memory\"/" > ) } {(/etc/default/grub)} ) (C {(sudo)} {(update-grub)}) ] spids: [-1 593] ) ] spids: [-1 629] ) ] spids: [-1 569] ) ] spids: [-1 631] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(/etc/init.d/kubelet)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(sudo)} {(rm)} {(/etc/init.d/kubelet)})] spids: [-1 648] ) ] spids: [-1 657] ) ] )