diff options
| author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-17 15:43:02 -0400 | 
|---|---|---|
| committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-17 15:43:02 -0400 | 
| commit | a599005dc0ec7dcca64d4f60b7fb7ab5cb959ebc (patch) | |
| tree | c180cb0f246cd3354b0a8d1b837623059d69db5d /roles/openshift_master/tasks | |
| parent | 167bee246f1a032a99e3003dc1b75c1307269973 (diff) | |
| parent | 0a021c047bfb3fe5710be1e7de8cd577455f53c2 (diff) | |
| download | openshift-a599005dc0ec7dcca64d4f60b7fb7ab5cb959ebc.tar.gz openshift-a599005dc0ec7dcca64d4f60b7fb7ab5cb959ebc.tar.bz2 openshift-a599005dc0ec7dcca64d4f60b7fb7ab5cb959ebc.tar.xz openshift-a599005dc0ec7dcca64d4f60b7fb7ab5cb959ebc.zip  | |
Merge pull request #348 from detiber/ha_master
Ha master
Diffstat (limited to 'roles/openshift_master/tasks')
| -rw-r--r-- | roles/openshift_master/tasks/main.yml | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 02905f32d..bb1689e5f 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -8,6 +8,10 @@      - openshift_master_oauth_grant_method in openshift_master_valid_grant_methods    when: openshift_master_oauth_grant_method is defined +- fail: +    msg: "openshift_master_cluster_password must be set for multi-master installations" +  when: openshift_master_ha and not openshift.master.cluster_defer_ha | bool and openshift_master_cluster_password is not defined +  - name: Install OpenShift Master package    yum: pkg=openshift-master state=present    register: install_result @@ -16,6 +20,9 @@    openshift_facts:      role: master      local_facts: +      cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}" +      cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}" +      cluster_defer_ha: "{{ openshift_master_cluster_defer_ha | default(None) }}"        debug_level: "{{ openshift_master_debug_level | default(openshift.common.debug_level) }}"        api_port: "{{ openshift_master_api_port | default(None) }}"        api_url: "{{ openshift_master_api_url | default(None) }}" @@ -114,12 +121,26 @@  - name: Start and enable openshift-master    service: name=openshift-master enabled=yes state=started +  when: not openshift_master_ha    register: start_result  - name: pause to prevent service restart from interfering with bootstrapping    pause: seconds=30    when: start_result | changed +- name: Install cluster packages +  yum: pkg=pcs state=present +  when: openshift_master_ha and not openshift.master.cluster_defer_ha | bool +  register: install_result + +- name: Start and enable cluster service +  service: name=pcsd enabled=yes state=started +  when: openshift_master_ha and not openshift.master.cluster_defer_ha | bool + +- name: Set the cluster user password +  shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster +  when: install_result | changed +  - name: Create the OpenShift client config dir(s)    file:      path: "~{{ item }}/.kube"  | 
