mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 05:42:46 +01:00
build
This commit is contained in:
@@ -142,12 +142,6 @@
|
||||
ansible.builtin.pause:
|
||||
minutes: 1
|
||||
|
||||
- name: Initialize Kubernetes
|
||||
command: sudo kubeadm init --pod-network-cidr=10.244.0.0/16
|
||||
args:
|
||||
creates: /etc/kubernetes/admin.conf
|
||||
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
|
||||
|
||||
- name: Create .kube directory
|
||||
file:
|
||||
path: /home/{{ ansible_user }}/.kube
|
||||
@@ -171,10 +165,21 @@
|
||||
command: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
|
||||
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
|
||||
ignore_errors: true
|
||||
|
||||
- name: Get join command
|
||||
command: kubeadm token create --print-join-command
|
||||
register: join_command
|
||||
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
|
||||
|
||||
- name: Initialize Kubernetes
|
||||
command: sudo kubeadm init --pod-network-cidr=10.244.0.0/16
|
||||
args:
|
||||
creates: /etc/kubernetes/admin.conf
|
||||
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Save join command
|
||||
set_fact:
|
||||
|
||||
Reference in New Issue
Block a user