mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-09-08 21:27:36 +02:00
build
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
delay: 6
|
delay: 6
|
||||||
until: "'System clock synchronized: yes' in timedatectl_status.stdout"
|
until: "'System clock synchronized: yes' in timedatectl_status.stdout"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Create apt proxy file
|
- name: Create apt proxy file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/apt/apt.conf.d/02proxy
|
dest: /etc/apt/apt.conf.d/02proxy
|
||||||
@@ -285,10 +285,23 @@
|
|||||||
cmd: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
|
cmd: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
|
||||||
environment:
|
environment:
|
||||||
KUBECONFIG: /etc/kubernetes/admin.conf
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
||||||
when: inventory_hostname.endswith("-vm01.home.lan")
|
when:
|
||||||
|
- inventory_hostname.endswith("-vm01.home.lan")
|
||||||
|
- net_driver == "flannel"
|
||||||
register: flannel_result
|
register: flannel_result
|
||||||
changed_when: "'created' in flannel_result.stdout or 'configured' in flannel_result.stdout"
|
changed_when: "'created' in flannel_result.stdout or 'configured' in flannel_result.stdout"
|
||||||
|
|
||||||
|
- name: Install Calico
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.31.3/manifests/calico.yaml
|
||||||
|
environment:
|
||||||
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
||||||
|
when:
|
||||||
|
- inventory_hostname.endswith("-vm01.home.lan")
|
||||||
|
- net_driver == "calico"
|
||||||
|
register: calico_result
|
||||||
|
changed_when: "'created' in calico_result.stdout or 'configured' in calico_result.stdout"
|
||||||
|
|
||||||
- name: Get join command
|
- name: Get join command
|
||||||
command: sudo kubeadm token create --print-join-command
|
command: sudo kubeadm token create --print-join-command
|
||||||
register: join_command
|
register: join_command
|
||||||
|
|||||||
Reference in New Issue
Block a user