Browse Source

fix #2: check if there are residue of an old install of K8S

master
Nicolas Massé 8 years ago
parent
commit
d2eff8d652
  1. 21
      prepare.yml

21
prepare.yml

@ -10,6 +10,27 @@
docker_version: 1.13.1 docker_version: 1.13.1
tasks: tasks:
- name: Check if /etc/kubernetes exists
stat:
path: /etc/kubernetes
register: etc_kubernetes
tags: checks
- name: Check if /etc/cni exists
stat:
path: /etc/cni
register: etc_cni
tags: checks
- name: Check if there is an old version of Kubernetes installed
assert:
that:
- "'KUBE_CONFIG' not in ansible_env"
- "not etc_kubernetes.stat.exists"
- "not etc_cni.stat.exists"
msg: An old installation of Kubernetes may have been found
tags: checks
- name: Make sure SELinux is enabled - name: Make sure SELinux is enabled
lineinfile: lineinfile:
path: /etc/sysconfig/selinux path: /etc/sysconfig/selinux

Loading…
Cancel
Save