53 lines
1.3 KiB
YAML
Executable File
53 lines
1.3 KiB
YAML
Executable File
#!/usr/bin/env ansible-playbook
|
|
# vim:ft=ansible:
|
|
---
|
|
# k8s
|
|
- hosts: pik8s
|
|
gather_facts: no
|
|
roles:
|
|
- role: k8s
|
|
tags: [ k8s, skip-pull ]
|
|
- role: motd
|
|
vars:
|
|
motd_watch_services_extra:
|
|
- docker
|
|
- kubelet
|
|
tags: [ k8s, motd ]
|
|
- hosts: pik8s_masters
|
|
gather_facts: no
|
|
tasks:
|
|
- name: install openshift
|
|
pip: name=openshift state=latest
|
|
tags: [ k8s, packages, pip ]
|
|
- hosts: localhost
|
|
gather_facts: no
|
|
vars:
|
|
k8s_path: "{{ playbook_dir }}/files/k8s/desu.local"
|
|
module_defaults:
|
|
group/k8s:
|
|
api_version: v1
|
|
host: "https://192.168.102.1:6443"
|
|
ca_cert: "{{ k8s_path }}/ca.crt"
|
|
kubeconfig: "{{ k8s_path }}/kubeconfig"
|
|
client_cert: "{{ k8s_path }}/client.crt"
|
|
client_key: "{{ k8s_path }}/client.key"
|
|
tasks:
|
|
- name: assure nfs pv
|
|
k8s:
|
|
definition:
|
|
apiVersion: v1
|
|
kind: PersistentVolume
|
|
metadata:
|
|
name: pv-nfs
|
|
spec:
|
|
capacity:
|
|
storage: 1.5Ti
|
|
accessModes:
|
|
- ReadWriteMany
|
|
persistentVolumeReclaimPolicy: Retain
|
|
nfs:
|
|
path: /srv/nfs/k8s
|
|
server: pi-storage-1.desu.ltd
|
|
readOnly: false
|
|
tags: [ k8s, manifest, no-pull ]
|