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
|
||||
|
||||
tasks:
|
||||
- name: Fix hostname
|
||||
copy:
|
||||
dest: /etc/hostname
|
||||
content: |
|
||||
{{ inventory_hostname | regex_replace('.*@', '') | regex_replace('\..*$', '') }}
|
||||
|
||||
- name: Copy conf
|
||||
copy:
|
||||
src: rootfs/
|
||||
@ -39,15 +45,6 @@
|
||||
autoremove: true
|
||||
purge: true
|
||||
|
||||
- name: Reboot?
|
||||
stat:
|
||||
path: /var/run/reboot-required
|
||||
register: doreboot
|
||||
|
||||
- name: Reboot
|
||||
reboot:
|
||||
when: doreboot.stat.exists
|
||||
|
||||
- name: Install deps
|
||||
apt:
|
||||
name:
|
||||
@ -106,14 +103,18 @@
|
||||
service:
|
||||
name: crio.service
|
||||
enabled: true
|
||||
|
||||
- name: Reboot
|
||||
reboot:
|
||||
|
||||
#- name: Init k8s
|
||||
# shell: kubeadm init --pod-network-cidr=10.244.0.0/16
|
||||
#- name: Apply flannel (network)
|
||||
# shell: kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
|
||||
#- name:
|
||||
# shell: kubeadm init --pod-network-cidr=10.244.0.0/16 --control-plane-endpoint=k8s.gmoker.com
|
||||
#- name: Remove master node taint
|
||||
# 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
|
||||
|
||||
#- name: Reboot
|
||||
# reboot:
|
||||
|
Loading…
Reference in New Issue
Block a user