-
Notifications
You must be signed in to change notification settings - Fork 332
/
nfs-client-provisioner.yml
41 lines (39 loc) · 1.29 KB
/
nfs-client-provisioner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
# This playbook is used to setup the nfs-client-provisioner
# If the cluster already has an nfs server setup run with --skip-tags="nfs_server,nfs_mkdir"
# Otherwhise an NFS server will be configured on kube-master[0]
# After settting up an NFS server, nfs software is installed on all nodes
# Lastly, the nfs-client-provisioner is helm installed using the role
#
# The default NFS configuration of this playbook is not meant for production systems
# For production deployments please configur NFS with storage-partner guidance
#
# Install the required NFS software on all nodes and then helm install the nfs-client
- hosts: kube-master[0]
become: yes
tasks:
- name: Make sure NFS directory exists and is globally writable
file:
path: "{{ k8s_nfs_export_path }}"
state: directory
mode: "u=rwx,g=rwx,o=rwx"
when: k8s_nfs_mkdir and k8s_deploy_nfs_server
- name: Deploy NFS server master
include_role:
name: nfs
vars:
- nfs_is_server: yes
when: k8s_deploy_nfs_server
- hosts: "k8s-cluster"
become: yes
roles:
- nfs
tags:
- nfs_software
- hosts: kube-master[0]
become: true
tasks:
- name: install nfs-client-provisioner
include_role:
name: nfs-client-provisioner
environment: "{{proxy_env if proxy_env is defined else {}}}"