49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
---
|
|
- name: create kubernetes config directory
|
|
file: path={{ kube_config_dir }} state=directory
|
|
|
|
- name: create kubernetes script directory
|
|
file: path={{ kube_script_dir }} state=directory
|
|
|
|
- name: Make sure manifest directory exists
|
|
file: path={{ kube_manifest_dir }} state=directory
|
|
|
|
|
|
- name: certs | create system kube-cert groups
|
|
group: name={{ kube_cert_group }} state=present system=yes
|
|
|
|
- name: create system kube user
|
|
user:
|
|
name=kube
|
|
comment="Kubernetes user"
|
|
shell=/sbin/nologin
|
|
state=present
|
|
system=yes
|
|
groups={{ kube_cert_group }}
|
|
|
|
- include: secrets.yml
|
|
tags:
|
|
- secrets
|
|
|
|
- include: install.yml
|
|
|
|
- name: Write kubelet config file
|
|
template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet backup=yes
|
|
notify:
|
|
- restart kubelet
|
|
|
|
- name: write the kubecfg (auth) file for kubelet
|
|
template: src=node-kubeconfig.yaml.j2 dest={{ kube_config_dir }}/node-kubeconfig.yaml backup=yes
|
|
notify:
|
|
- restart kubelet
|
|
|
|
- name: Write proxy manifest
|
|
template:
|
|
src: manifests/kube-proxy.manifest.j2
|
|
dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
|
|
|
|
- name: Enable kubelet
|
|
service:
|
|
name: kubelet
|
|
enabled: yes
|
|
state: started
|