diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index c28ad02d8..5f667187c 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -68,6 +68,7 @@ nginx_cpu_requests: 25m nginx_image_repo: nginx nginx_image_tag: 1.13 +nginx_config_dir: "/etc/nginx" etcd_config_dir: /etc/ssl/etcd diff --git a/roles/kubernetes/node/tasks/nginx-proxy.yml b/roles/kubernetes/node/tasks/nginx-proxy.yml index 36cb32592..4b3b5f2f5 100644 --- a/roles/kubernetes/node/tasks/nginx-proxy.yml +++ b/roles/kubernetes/node/tasks/nginx-proxy.yml @@ -6,7 +6,7 @@ - name: nginx-proxy | Make nginx directory file: - path: /etc/nginx + path: "{{ nginx_config_dir }}" state: directory mode: 0700 owner: root @@ -14,7 +14,7 @@ - name: nginx-proxy | Write nginx-proxy configuration template: src: nginx.conf.j2 - dest: "/etc/nginx/nginx.conf" + dest: "{{ nginx_config_dir }}/nginx.conf" owner: root mode: 0755 backup: yes diff --git a/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 index ccd2e4786..e3d54b523 100644 --- a/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/nginx-proxy.manifest.j2 @@ -33,4 +33,4 @@ spec: volumes: - name: etc-nginx hostPath: - path: /etc/nginx + path: {{ nginx_config_dir }} diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 634492e37..0f3e6eaea 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -120,7 +120,7 @@ - /etc/ssl/etcd - /var/log/calico - /etc/cni - - /etc/nginx + - "{{ nginx_config_dir }}" - /etc/dnsmasq.d - /etc/dnsmasq.conf - /etc/dnsmasq.d-available