Compare commits

...

2 Commits

Author SHA1 Message Date
c744bb30fe Minor fixes alla round 2021-03-01 03:36:23 -06:00
e6d34c0200 Add args to k8s.sh 2021-03-01 02:33:49 -06:00
3 changed files with 9 additions and 3 deletions

3
k8s.sh
View File

@ -1,6 +1,7 @@
#! /bin/sh #! /bin/sh
ansible-playbook playbooks/pik8s.yml \ unset KUBECONFIG K8S_AUTH_KUBECONFIG
ansible-playbook playbooks/pik8s.yml "$@" \
-i inventory-localhost \ -i inventory-localhost \
-l localhost \ -l localhost \
--tags k8s --tags k8s

View File

@ -4,6 +4,10 @@
# k8s # k8s
- hosts: pik8s - hosts: pik8s
gather_facts: no gather_facts: no
tasks:
- name: install nfs-common
apt: name=nfs-common
tags: [ k8s, packages, apt ]
roles: roles:
- role: k8s - role: k8s
tags: [ k8s, skip-pull ] tags: [ k8s, skip-pull ]
@ -27,10 +31,11 @@
group/k8s: group/k8s:
api_version: v1 api_version: v1
host: "https://192.168.102.1:6443" host: "https://192.168.102.1:6443"
ca_cert: "{{ k8s_path }}/ca.crt"
kubeconfig: "{{ k8s_path }}/kubeconfig" kubeconfig: "{{ k8s_path }}/kubeconfig"
client_cert: "{{ k8s_path }}/client.crt" client_cert: "{{ k8s_path }}/client.crt"
client_key: "{{ k8s_path }}/client.key" client_key: "{{ k8s_path }}/client.key"
context: kubernetes-admin@kubernetes
validate_certs: no
tasks: tasks:
- name: assure nfs pv - name: assure nfs pv
k8s: k8s:

View File

@ -43,7 +43,7 @@
vars: vars:
nfs_exports: nfs_exports:
- "/srv/nfs/bulk 192.168.0.0/16(rw,no_root_squash,sync) 172.23.0.0/16(rw,no_root_squash,sync)" - "/srv/nfs/bulk 192.168.0.0/16(rw,no_root_squash,sync) 172.23.0.0/16(rw,no_root_squash,sync)"
- "/srv/nfs/k8s 192.168.103.0/24(rw,no_root_squash,sync)" - "/srv/nfs/k8s 192.168.102.0/24(rw,no_root_squash,sync)"
tags: [ pis, storage, nfs ] tags: [ pis, storage, nfs ]
# Multipurpose Pis running unbound # Multipurpose Pis running unbound
- hosts: pi-mp-1.desu.ltd,pi-mp-2.desu.ltd - hosts: pi-mp-1.desu.ltd,pi-mp-2.desu.ltd