Skip to content

Commit

Permalink
Add tasks names
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Feb 29, 2024
1 parent 5fe9d0b commit 7c93197
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 23 deletions.
35 changes: 21 additions & 14 deletions tasks/front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
kube_wait_api_server_ip: "{{kube_api_server}}"
when: kube_api_server != "0.0.0.0"

- name: wait Kube to start on "{{kube_wait_api_server_ip}}"
wait_for: port=6443 host="{{kube_wait_api_server_ip}}"

- set_fact:
node_port_exists: false

Expand All @@ -26,7 +23,7 @@
when: " '{{item.option}}' == '--service-node-port-range'"
loop: "{{ kube_apiserver_options }}"

- name: Add Kube API server --service-node-port-rang option
- name: Add Kube API server --service-node-port-range option
set_fact:
kube_apiserver_options: "{{ [{'option': '--service-node-port-range', 'value': '80-35000'}] + kube_apiserver_options }}"
when: kube_install_ingress | bool and not node_port_exists | bool
Expand Down Expand Up @@ -124,15 +121,19 @@
- include_tasks: cert-manager.yaml

- block:
- copy: src=kubernetes-dashboard.yaml dest=/tmp/kubernetes-dashboard.yaml
- command: kubectl apply -f /tmp/kubernetes-dashboard.yaml
- name: Create kubernetes-dashboard.yaml
copy: src=kubernetes-dashboard.yaml dest=/tmp/kubernetes-dashboard.yaml
- name: Apply kubernetes-dashboard.yaml
command: kubectl apply -f /tmp/kubernetes-dashboard.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_deploy_dashboard | bool

- block:
- copy: src=metrics-server.yaml dest=/tmp/metrics-server.yaml
- command: kubectl apply -f /tmp/metrics-server.yaml
- name: Create metrics-server.yaml
copy: src=metrics-server.yaml dest=/tmp/metrics-server.yaml
- name: Apply metrics-server.yaml
command: kubectl apply -f /tmp/metrics-server.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_install_metrics | bool
Expand Down Expand Up @@ -163,8 +164,10 @@
with_items: "{{ kube_apply_repos }}"

- block:
- template: src=nfs-client.j2 dest=/tmp/nfs-client.yaml
- command: kubectl apply -f /tmp/nfs-client.yaml
- name: Create nfs-client.yaml
template: src=nfs-client.j2 dest=/tmp/nfs-client.yaml
- name: Apply nfs-client.yaml
command: kubectl apply -f /tmp/nfs-client.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_install_nfs_client | bool
Expand All @@ -173,15 +176,19 @@
when: kube_install_ingress | bool

- block:
- template: src=nvidia-device-plugin.j2 dest=/tmp/nvidia-device-plugin.yml
- command: kubectl apply -f /tmp/nvidia-device-plugin.yml
- name: Create nvidia-device-plugin.yaml
template: src=nvidia-device-plugin.j2 dest=/tmp/nvidia-device-plugin.yml
- name: Apply nvidia-device-plugin.yaml
command: kubectl apply -f /tmp/nvidia-device-plugin.yml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_nvidia_support | bool

- block:
- template: src=kubernetes-dashboard-ingress.j2 dest=/tmp/kubernetes-dashboard-ingress.yaml
- command: kubectl apply -f /tmp/kubernetes-dashboard-ingress.yaml
- name: Create kubernetes-dashboard-ingress.yaml
template: src=kubernetes-dashboard-ingress.j2 dest=/tmp/kubernetes-dashboard-ingress.yaml
- name: Apply kubernetes-dashboard-ingress.yaml
command: kubectl apply -f /tmp/kubernetes-dashboard-ingress.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_install_ingress | bool and kube_deploy_dashboard | bool
Expand Down
27 changes: 18 additions & 9 deletions tasks/kube_nets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- lineinfile:
- name: Set net.bridge.bridge-nf-call-iptables to 1
lineinfile:
dest: /etc/sysctl.d/k8s.conf
regexp: '^net.bridge.bridge-nf-call-iptables'
line: 'net.bridge.bridge-nf-call-iptables = 1'
Expand All @@ -8,29 +9,37 @@
when: kube_network == 'flannel' or kube_network == 'kube-router'

- block:
- template: src=flannel-net.j2 dest=/tmp/flannel-net.yml
- command: kubectl apply -f /tmp/flannel-net.yml creates=/etc/cni/net.d/10-flannel.conflist
- name: Create flannel-net.yaml
template: src=flannel-net.j2 dest=/tmp/flannel-net.yml
- name: Apply flannel-net.yaml
command: kubectl apply -f /tmp/flannel-net.yml creates=/etc/cni/net.d/10-flannel.conflist
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
when: kube_network == 'flannel'

- block:
- copy: src=calico-net.yaml dest=/tmp/calico-net.yaml
- command: kubectl apply -f /tmp/calico-net.yaml creates=/var/etcd/calico-data
- name: Create calico-net.yaml
copy: src=calico-net.yaml dest=/tmp/calico-net.yaml
- name: Apply calico-net.yaml
command: kubectl apply -f /tmp/calico-net.yaml creates=/var/etcd/calico-data
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
when: kube_network == 'calico'

- block:
- copy: src=kuberouter-net.yaml dest=/tmp/kuberouter-net.yaml
- command: kubectl apply -f /tmp/kuberouter-net.yaml creates=/etc/cni/net.d/10-kuberouter.conf
- name: Create kuberouter-net.yaml
copy: src=kuberouter-net.yaml dest=/tmp/kuberouter-net.yaml
- name: Apply kuberouter-net.yaml
command: kubectl apply -f /tmp/kuberouter-net.yaml creates=/etc/cni/net.d/10-kuberouter.conf
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
when: kube_network == 'kube-router'

- block:
- copy: src=weave-net.yaml dest=/tmp/weave-net.yaml
- command: kubectl apply -f /tmp/weave-net.yaml creates=/etc/cni/net.d/10-weave.conf
- name: Create weave-net.yaml
copy: src=weave-net.yaml dest=/tmp/weave-net.yaml
- name: Apply weave-net.yaml
command: kubectl apply -f /tmp/weave-net.yaml creates=/etc/cni/net.d/10-weave.conf
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
when: kube_network == 'weave'
Expand Down

0 comments on commit 7c93197

Please sign in to comment.