feat: hostname
This commit is contained in:
parent
ce838f5bcb
commit
c12c8c6346
@ -1 +1 @@
|
|||||||
ssh debian@vps-gra-k8s10.gmoker.com sudo cat /etc/kubernetes/admin.conf > f.conf
|
ssh debian@k8s.gmoker.com sudo cat /etc/kubernetes/admin.conf > kubeconfig
|
||||||
|
3
hosts
3
hosts
@ -1 +1,2 @@
|
|||||||
debian@vps-gra-k8s10.gmoker.com
|
#debian@vps-gra-k8s10.gmoker.com
|
||||||
|
debian@vps-sbg-10.gmoker.com
|
||||||
|
@ -13,6 +13,12 @@
|
|||||||
KUBECONFIG: /etc/kubernetes/admin.conf
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Fix hostname
|
||||||
|
copy:
|
||||||
|
dest: /etc/hostname
|
||||||
|
content: |
|
||||||
|
{{ inventory_hostname | regex_replace('.*@', '') | regex_replace('\..*$', '') }}
|
||||||
|
|
||||||
- name: Copy conf
|
- name: Copy conf
|
||||||
copy:
|
copy:
|
||||||
src: rootfs/
|
src: rootfs/
|
||||||
@ -39,15 +45,6 @@
|
|||||||
autoremove: true
|
autoremove: true
|
||||||
purge: true
|
purge: true
|
||||||
|
|
||||||
- name: Reboot?
|
|
||||||
stat:
|
|
||||||
path: /var/run/reboot-required
|
|
||||||
register: doreboot
|
|
||||||
|
|
||||||
- name: Reboot
|
|
||||||
reboot:
|
|
||||||
when: doreboot.stat.exists
|
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@ -106,14 +103,18 @@
|
|||||||
service:
|
service:
|
||||||
name: crio.service
|
name: crio.service
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: Reboot
|
- name: Reboot
|
||||||
reboot:
|
reboot:
|
||||||
|
|
||||||
#- name: Init k8s
|
#- name: Init k8s
|
||||||
# shell: kubeadm init --pod-network-cidr=10.244.0.0/16
|
# shell: kubeadm init --pod-network-cidr=10.244.0.0/16 --control-plane-endpoint=k8s.gmoker.com
|
||||||
#- name: Apply flannel (network)
|
#- name: Remove master node taint
|
||||||
# shell: kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
|
|
||||||
#- name:
|
|
||||||
# shell: kubectl taint node --all node-role.kubernetes.io/control-plane:NoSchedule-
|
# shell: kubectl taint node --all node-role.kubernetes.io/control-plane:NoSchedule-
|
||||||
#- name:
|
#- name: Apply flannel
|
||||||
|
# shell: kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
|
||||||
|
#- name: Apply nginx ingress
|
||||||
# shell: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.1/deploy/static/provider/cloud/deploy.yaml
|
# shell: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.1/deploy/static/provider/cloud/deploy.yaml
|
||||||
|
|
||||||
|
#- name: Reboot
|
||||||
|
# reboot:
|
||||||
|
Loading…
Reference in New Issue
Block a user