X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Finfra-ansible.git;a=blobdiff_plain;f=roles%2Fbaremetal_provision%2Ftasks%2Fstop_console_logging.yml;h=45a6b81f222b78ebc5df3ff35b01bc9037e751ea;hp=1e4cd35b4902c69e05035e47513b1a5258bac359;hb=1aeb85260cd48e76577afdae4fa3851dedb7c3c5;hpb=ebead6e70289f4cabe7cc0784e45b4864022f0fb diff --git a/roles/baremetal_provision/tasks/stop_console_logging.yml b/roles/baremetal_provision/tasks/stop_console_logging.yml index 1e4cd35..45a6b81 100644 --- a/roles/baremetal_provision/tasks/stop_console_logging.yml +++ b/roles/baremetal_provision/tasks/stop_console_logging.yml @@ -15,42 +15,27 @@ # limitations under the License. - name: Stop tmux console windows - shell: "source /opt/tmux_setup/tmux.inc; tmux_kill {{item.name}}" - with_items: "{{baremetal_ironic_nodes_ids}}" + shell: "source /opt/tmux_setup/tmux.inc; tmux_kill {{ironic_node_details.name}}" ignore_errors: yes - loop_control: - label: "{{ item.name }}" - - name: Stop tmux console session shell: "source /opt/tmux_setup/tmux.inc; tmux_kill tmux-session-deploy" ignore_errors: yes - name: Deactivate ipmi sol - command: "/usr/bin/ipmitool -I lanplus -H {{hosts[item.name]['hwmgmt']['address']}} -U {{hosts[item.name]['hwmgmt']['user']}} -P {{hosts[item.name]['hwmgmt']['password']}} sol deactivate" - with_items: "{{baremetal_ironic_nodes_ids}}" + command: "/usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} sol deactivate" ignore_errors: yes no_log: True - loop_control: - label: "{{ item.name }}" - name: Enable shellinabox console logging for target nodes environment: OS_AUTH_TOKEN: "fake-token" IRONIC_URL: "{{ ironic_service_adminurl }}" - command: "ironic node-set-console-mode {{item.name}} true" - with_items: - - "{{ baremetal_ironic_nodes_ids }}" - - {"name": "{{installation_controller}}"} + command: "ironic node-set-console-mode {{ironic_node_details.name}} true" when: - installation_phase == "provisioning-started" - loop_control: - label: "{{ item.name }}" - name: Enable shellinabox console logging for target nodes - command: "openstack --os-cloud default baremetal node console enable {{item.name}}" - with_items: "{{ baremetal_ironic_nodes_ids }}" + command: "openstack --os-cloud default baremetal node console enable {{ironic_node_details.name}}" when: - installation_phase != "provisioning-started" - loop_control: - label: "{{ item.name }}"