diff options
| author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-29 10:21:53 -0400 | 
|---|---|---|
| committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-29 11:55:12 -0400 | 
| commit | e6e5c64508ff876973cc5db768012ec836aea31e (patch) | |
| tree | 9d2e2cc1605034debe7cf917af5e74f5838427f8 /roles/openshift_master | |
| parent | cb0fc3000447b6305491fe24d28d4b8574e4acac (diff) | |
The systemd unit for atomic-openshift-master wasn't not being created
Diffstat (limited to 'roles/openshift_master')
| -rw-r--r-- | roles/openshift_master/tasks/systemd_units.yml | 22 | 
1 files changed, 16 insertions, 6 deletions
diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml index 1037890d1..a81270bab 100644 --- a/roles/openshift_master/tasks/systemd_units.yml +++ b/roles/openshift_master/tasks/systemd_units.yml @@ -4,28 +4,38 @@  - name: Init HA Service Info    set_fact: -    ha_svc_svc_dir: "/usr/lib/systemd/system" +    containerized_svc_dir: "/usr/lib/systemd/system"      ha_svc_template_path: "native-cluster"  - name: Set HA Service Info for containerized installs    set_fact: -    ha_svc_svc_dir: "/etc/systemd/system" +    containerized_svc_dir: "/etc/systemd/system"      ha_svc_template_path: "docker-cluster"    when: openshift.common.is_containerized | bool -# workaround for missing systemd unit files for controllers/api +# workaround for missing systemd unit files  - name: Create the systemd unit files    template: +    src: "docker/master.docker.service.j2" +    dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master.service" +  when: openshift.common.is_containerized | bool and (openshift.master.ha is not defined or not openshift.master.ha | bool) +  register: create_master_unit_file + +- command: systemctl daemon-reload +  when: create_master_unit_file | changed + +- name: Create the ha systemd unit files +  template:      src: "{{ ha_svc_template_path }}/atomic-openshift-master-{{ item }}.service.j2" -    dest: "{{ ha_svc_svc_dir }}/{{ openshift.common.service_type }}-master-{{ item }}.service" +    dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master-{{ item }}.service"    when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native"    with_items:    - api    - controllers -  register: create_unit_files +  register: create_ha_unit_files  - command: systemctl daemon-reload -  when: create_unit_files | changed +  when: create_ha_unit_files | changed  # end workaround for missing systemd unit files  - name: Create the master api service env file  | 
