mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Get conf checksum directly for localhost CP loadbalancer (#12632)
There is no need to stat the templated file, because the template module already returns a checksum.
This commit is contained in:
@@ -18,14 +18,7 @@
|
||||
owner: root
|
||||
mode: "0755"
|
||||
backup: true
|
||||
|
||||
- name: Haproxy | Get checksum from config
|
||||
stat:
|
||||
path: "{{ haproxy_config_dir }}/haproxy.cfg"
|
||||
get_attributes: false
|
||||
get_checksum: true
|
||||
get_mime: false
|
||||
register: haproxy_stat
|
||||
register: haproxy_conf
|
||||
|
||||
- name: Haproxy | Write static pod
|
||||
template:
|
||||
|
||||
@@ -18,14 +18,7 @@
|
||||
owner: root
|
||||
mode: "0755"
|
||||
backup: true
|
||||
|
||||
- name: Nginx-proxy | Get checksum from config
|
||||
stat:
|
||||
path: "{{ nginx_config_dir }}/nginx.conf"
|
||||
get_attributes: false
|
||||
get_checksum: true
|
||||
get_mime: false
|
||||
register: nginx_stat
|
||||
register: nginx_conf
|
||||
|
||||
- name: Nginx-proxy | Write static pod
|
||||
template:
|
||||
|
||||
@@ -7,7 +7,7 @@ metadata:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
k8s-app: kube-haproxy
|
||||
annotations:
|
||||
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
|
||||
haproxy-cfg-checksum: "{{ haproxy_conf.checksum }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
|
||||
@@ -7,7 +7,7 @@ metadata:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
k8s-app: kube-nginx
|
||||
annotations:
|
||||
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
|
||||
nginx-cfg-checksum: "{{ nginx_conf.checksum }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
|
||||
Reference in New Issue
Block a user