diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-08-23 12:56:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 12:56:45 -0400 |
commit | 46856f244abfcf02bc84a95de191cfce4c62c04d (patch) | |
tree | 9facb69cf73447f74d731c458315fc812ca216a3 | |
parent | 3e6d4304dfe8b5c0a643ea61addd43f7c60a52b6 (diff) | |
parent | 688e02b2edcadde9affc92abfd4b0b948bf87016 (diff) | |
download | openshift-46856f244abfcf02bc84a95de191cfce4c62c04d.tar.gz openshift-46856f244abfcf02bc84a95de191cfce4c62c04d.tar.bz2 openshift-46856f244abfcf02bc84a95de191cfce4c62c04d.tar.xz openshift-46856f244abfcf02bc84a95de191cfce4c62c04d.zip |
Merge pull request #2346 from abutcher/ca-bundle
Link ca to ca-bundle when ca-bundle does not exist.
-rw-r--r-- | roles/openshift_master_certificates/tasks/main.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/openshift_master_certificates/tasks/main.yml b/roles/openshift_master_certificates/tasks/main.yml index aafb06f93..ffde59358 100644 --- a/roles/openshift_master_certificates/tasks/main.yml +++ b/roles/openshift_master_certificates/tasks/main.yml @@ -164,3 +164,29 @@ owner: "{{ item }}" group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}" with_items: "{{ client_users }}" + +# Ensure ca-bundle exists for 3.2+ configuration +- name: Check for ca-bundle.crt + stat: + path: "{{ openshift.common.config_base }}/master/ca-bundle.crt" + register: ca_bundle_stat + failed_when: false + +- name: Check for ca.crt + stat: + path: "{{ openshift.common.config_base }}/master/ca.crt" + register: ca_crt_stat + failed_when: false + +- name: Migrate ca.crt to ca-bundle.crt + command: mv ca.crt ca-bundle.crt + args: + chdir: "{{ openshift.common.config_base }}/master" + when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists + +- name: Link ca.crt to ca-bundle.crt + file: + src: "{{ openshift.common.config_base }}/master/ca-bundle.crt" + path: "{{ openshift.common.config_base }}/master/ca.crt" + state: link + when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists |