Playbook #1

/root/kubeinit/ci/builds/bsU8uCNn/0/kubeinit/kubeinit/kubeinit-aux/kubeinit/playbook.yml

Report Status CLI Date Duration Controller User Versions Hosts Plays Tasks Results Files Records
05 May 2024 07:01:27 +0000 00:15:38.91 nyctea root Ansible 2.15.2 ara 1.6.1 (client), 1.6.1 (server) Python 3.11.4 9 7 1009 1076 51 1

File: /root/.ansible/collections/ansible_collections/kubeinit/kubeinit/roles/kubeinit_kid/tasks/main.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.

- name: Deploy the cluster nodes
  ansible.builtin.include_role:
    name: kubeinit.kubeinit.kubeinit_libvirt
    tasks_from: deploy_debian_guest.yml
    public: yes
  loop: "{{ groups['all_cluster_nodes'] }}"
  loop_control:
    loop_var: cluster_node
  vars:
    kubeinit_deployment_node_name: "{{ cluster_node }}"
    kubeinit_deployment_delegate: "{{ hostvars[cluster_node].target }}"
  when: kubeinit_cluster_nodes_deployed is not defined or not kubeinit_cluster_nodes_deployed

- name: Install controller requirements
  ansible.builtin.package:
    name: "{{ kubeinit_kid_controller_dependencies }}"
    state: present
  loop: "{{ groups['all_controller_nodes'] }}"
  loop_control:
    loop_var: controller_node
  vars:
  delegate_to: "{{ controller_node }}"
  when: kubeinit_kid_controller_dependencies is defined

- name: Install compute nodes requirements
  ansible.builtin.package:
    name: "{{ kubeinit_kid_compute_dependencies }}"
    state: present
  loop: "{{ groups['all_compute_nodes'] | default([]) }}"
  loop_control:
    loop_var: compute_node
  delegate_to: "{{ compute_node }}"
  when: kubeinit_kid_compute_dependencies is defined

- name: Create kube directory
  ansible.builtin.file:
    path: ~/.kube
    state: directory
    mode: '0644'
  delegate_to: "{{ kubeinit_provision_service_node }}"

- name: Touch a file
  ansible.builtin.shell: |
    touch ~/.kube/config
  args:
    executable: /bin/bash
  register: _result
  changed_when: "_result.rc == 0"
  delegate_to: "{{ kubeinit_provision_service_node }}"