Browse Source

Fix contiv api certificate generation (#3531)

pull/3532/head
Erwan Miran 6 years ago
committed by k8s-ci-robot
parent
commit
4d2b6b71f2
1 changed files with 12 additions and 3 deletions
  1. 15
      roles/network_plugin/contiv/tasks/main.yml

15
roles/network_plugin/contiv/tasks/main.yml

@ -97,13 +97,22 @@
delegate_to: "{{ groups['kube-master'][0] }}" delegate_to: "{{ groups['kube-master'][0] }}"
run_once: true run_once: true
- name: Contiv | Check for cert key existence
stat:
path: /var/contiv/auth_proxy_key.pem
register: contiv_certificate_key_state
when:
- contiv_enable_api_proxy
- contiv_generate_certificate
delegate_to: "{{ groups['kube-master'][0] }}"
run_once: true
- name: Contiv | Generate contiv-api-proxy certificates - name: Contiv | Generate contiv-api-proxy certificates
script: /var/contiv/generate-certificate.sh
args:
creates: /var/contiv/auth_proxy_key.pem
command: /var/contiv/generate-certificate.sh
when: when:
- contiv_enable_api_proxy - contiv_enable_api_proxy
- contiv_generate_certificate - contiv_generate_certificate
- (not contiv_certificate_key_state.stat.exists)
delegate_to: "{{ groups['kube-master'][0] }}" delegate_to: "{{ groups['kube-master'][0] }}"
run_once: true run_once: true

Loading…
Cancel
Save