variables: ssh: - name: host config_key: host components: ['oceanbase', 'obproxy', 'oceanbase-ce', 'obproxy-ce', 'obagent', 'ocp-express', 'grafana', 'prometheus'] - name: user config_key: username components: ['oceanbase', 'obproxy', 'oceanbase-ce', 'obproxy-ce', 'obagent', 'ocp-express', 'grafana', 'prometheus'] server: - name: home_path config_key: home_path components: ['oceanbase', 'obproxy', 'oceanbase-ce', 'obproxy-ce', 'obagent', 'ocp-express', 'grafana', 'prometheus'] - name: mysql_port config_key: mysql_port components: ['oceanbase', 'oceanbase-ce'] global: - name: password config_key: root_password components: ['oceanbase', 'oceanbase-ce'] - name: password config_key: observer_root_password components: ['obproxy', 'obproxy-ce'] wrappers: - name: ssh remote_command: ssh {user}@{host} -t '{cmd}' local_command: "{cmd}" - name: ssh_client command: "{cmd}" executor: "ssh_client" commands: - name: ssh components: ['oceanbase', 'obproxy', 'oceanbase-ce', 'obproxy-ce', 'obagent', 'ocp-express', 'grafana', 'prometheus'] command: "cd {home_path}/log; echo 'ssh {user}@{host}'; bash --login" wrapper: "ssh" interactive: true - name: log components: ['oceanbase', 'obproxy', 'oceanbase-ce', 'obproxy-ce', 'obagent', 'ocp-express', 'grafana', 'prometheus'] command: "cd {home_path}/log; echo 'ssh {user}@{host}'; ls -l; bash --login" wrapper: "ssh" interactive: true - name: less command: "less {home_path}/log/observer.log" components: ['oceanbase', 'oceanbase-ce'] wrapper: "ssh" interactive: true no_interruption: true - name: less command: "less {home_path}/log/obproxy.log" components: ['obproxy', 'obproxy-ce'] wrapper: "ssh" interactive: true no_interruption: true - name: pid wrapper: ssh_client command: "pgrep -u {user} -f ^{home_path}/bin/observer" components: ['oceanbase', 'oceanbase-ce'] no_excption: true - name: pid wrapper: ssh_client command: "pgrep -u {user} -f ^{home_path}/bin/obproxy" components: ['obproxy', 'obproxy-ce'] no_excption: true - name: gdb wrapper: "ssh" command: "cd {home_path}; LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH gdb --pid=`$pid`" components: ['oceanbase', 'oceanbase-ce'] interactive: true no_interruption: true