openshift / openshift-ansible-contrib

Additional roles and playbooks for OpenShift installation and management
https://www.openshift.com
Apache License 2.0
283 stars 372 forks source link

Fix trust anchors backup when file does not exist #1096

Closed eramoto closed 4 years ago

eramoto commented 5 years ago

What does this PR do?

Backs up trust anchors directory because backup_master_node.sh fails when trust anchors file does not exist.

How should this be manually tested?

Run the following commands on OpenShift node

mkdir -p /tmp/test
curl -O https://raw.githubusercontent.com/eramoto/openshift-ansible-contrib/backup-trust-anchors/reference-architecture/day2ops/scripts/backup_master_node.sh
bash -xe backup_master_node.sh /tmp/test

if success, anchros directory exist

ls /tmp/test/etc/pki/ca-trust/source/

Is there a relevant Issue open for this?

None.

Who would you like to review this?

cc: @tomassedovic PTAL

cwilkers commented 4 years ago

/lgtm