Skip to content
Snippets Groups Projects
Commit b4e2b857 authored by Erwan Miran's avatar Erwan Miran Committed by k8s-ci-robot
Browse files

Replace shell with command in order to allow the task to fail when openssl...

Replace shell with command in order to allow the task to fail when openssl x509 does return zero (#3516)
parent fcd8d850
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
- etcd-secrets - etcd-secrets
- name: "Gen_certs | Get etcd certificate serials" - name: "Gen_certs | Get etcd certificate serials"
shell: "openssl x509 -in {{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem -noout -serial | cut -d= -f2" command: "openssl x509 -in {{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem -noout -serial"
register: "etcd_client_cert_serial_result" register: "etcd_client_cert_serial_result"
changed_when: false changed_when: false
when: inventory_hostname in groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort when: inventory_hostname in groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
- name: Set etcd_client_cert_serial - name: Set etcd_client_cert_serial
set_fact: set_fact:
etcd_client_cert_serial: "{{ etcd_client_cert_serial_result.stdout }}" etcd_client_cert_serial: "{{ etcd_client_cert_serial_result.stdout.split('=')[1] }}"
when: inventory_hostname in groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort when: inventory_hostname in groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort
tags: tags:
- master - master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment