Replace shell with command in order to allow the task to fail when openssl x509 does return zero (#3516)
parent
fcd8d850dc
commit
b4e2b85745
|
@ -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 @@
|
||||||
|
|
||||||
- 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
|
||||||
|
|
Loading…
Reference in New Issue