diff options
author | Andrew Butcher <abutcher@afrolegs.com> | 2016-11-16 15:09:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 15:09:33 -0500 |
commit | f116f79f30f295a14f2f36836d2cdb80fe7ab298 (patch) | |
tree | 8a1fc02735d6268306fd84792ca8c36e49714478 /roles/openshift_master/tasks | |
parent | 7762b55f399eda5dd1ea1ad74773ac48778cb30b (diff) | |
parent | 435346f46cee49bf2047d9492f40fc7c979024c6 (diff) | |
download | openshift-f116f79f30f295a14f2f36836d2cdb80fe7ab298.tar.gz openshift-f116f79f30f295a14f2f36836d2cdb80fe7ab298.tar.bz2 openshift-f116f79f30f295a14f2f36836d2cdb80fe7ab298.tar.xz openshift-f116f79f30f295a14f2f36836d2cdb80fe7ab298.zip |
Merge pull request #2702 from jkhelil/fix_master_config_template
Prevent useless master restart by reworking template for master service enf file
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r-- | roles/openshift_master/tasks/systemd_units.yml | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml index 56110c28f..11e010716 100644 --- a/roles/openshift_master/tasks/systemd_units.yml +++ b/roles/openshift_master/tasks/systemd_units.yml @@ -127,16 +127,22 @@ - name: Preserve Master Proxy Config options command: grep PROXY /etc/sysconfig/{{ openshift.common.service_type }}-master - register: master_proxy + register: master_proxy_result failed_when: false changed_when: false +- set_fact: + master_proxy: "{{ master_proxy_result.stdout_lines | default([]) }}" + - name: Preserve Master AWS options command: grep AWS_ /etc/sysconfig/{{ openshift.common.service_type }}-master - register: master_aws + register: master_aws_result failed_when: false changed_when: false +- set_fact: + master_aws: "{{ master_aws_result.stdout_lines | default([]) }}" + - name: Create the master service env file template: src: "atomic-openshift-master.j2" @@ -144,17 +150,3 @@ backup: true notify: - restart master - -- name: Restore Master Proxy Config Options - lineinfile: - dest: /etc/sysconfig/{{ openshift.common.service_type }}-master - line: "{{ item }}" - with_items: "{{ master_proxy.stdout_lines | default([]) }}" - when: master_proxy.rc == 0 and 'http_proxy' not in openshift.common and 'https_proxy' not in openshift.common - -- name: Restore Master AWS Options - lineinfile: - dest: /etc/sysconfig/{{ openshift.common.service_type }}-master - line: "{{ item }}" - with_items: "{{ master_aws.stdout_lines | default([]) }}" - when: master_aws.rc == 0 and not (openshift_cloudprovider_kind is defined and openshift_cloudprovider_kind == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined) |