Playbook #1

/root/kubeinit/ci/builds/6mbKNrxD/0/kubeinit/kubeinit/kubeinit-aux/kubeinit/playbook.yml

Report Status CLI Date Duration Controller User Versions Hosts Plays Tasks Results Files Records
29 Oct 2023 10:04:38 +0000 00:25:53.67 nyctea root Ansible 2.15.2 ara 1.6.1 (client), 1.6.1 (server) Python 3.11.4 5 9 822 822 48 1

File: /root/.ansible/collections/ansible_collections/kubeinit/kubeinit/roles/kubeinit_libvirt/tasks/70_check_nodes_up.yml

---
# Copyright kubeinit contributors
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

#
# Verify that nodes are up before continuing
#

- name: "Make sure we can execute remote commands in {{ kubeinit_deployment_node_name }}"
  ansible.builtin.shell: |
    set -o pipefail
    ssh {{ hostvars[kubeinit_deployment_node_name].ansible_ssh_common_args }} \
        {{ _param_guest_user | default('root') }}@{{ hostvars[kubeinit_deployment_node_name].ansible_host }} 'echo connected' || true
  args:
    executable: /bin/bash
  register: _result
  retries: 30
  delay: 10
  until: "'connected' in _result.stdout"
  changed_when: "_result.rc == 0"
  delegate_to: "{{ kubeinit_deployment_delegate }}"

- name: "Wait for booting {{ kubeinit_deployment_node_name }}"
  ansible.builtin.wait_for_connection:
    connect_timeout: 20
    sleep: 5
    delay: 5
    timeout: 300
  vars:
    ansible_user: "{{ _param_guest_user | default('root') }}"
  delegate_to: "{{ kubeinit_deployment_node_name }}"
  when: _param_request_ping | default(true) | bool