summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r--roles/openshift_master/tasks/main.yml27
1 files changed, 26 insertions, 1 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 43647cc49..6844a16cc 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -21,6 +21,10 @@
msg: "openshift_master_cluster_password must be set for multi-master installations"
when: openshift_master_ha | bool and openshift_master_cluster_method == "pacemaker" and (openshift_master_cluster_password is not defined or not openshift_master_cluster_password)
+- fail:
+ msg: "openshift_master_ha is not yet supported on atomic hosts"
+ when: openshift_master_ha | bool and is_atomic
+
- name: Set master facts
openshift_facts:
role: master
@@ -79,6 +83,25 @@
- name: Install Master package
action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version }} state=present"
+ when: not is_atomic
+
+# TODO: enable when ansible#1993 lands and is widespread enough
+# - name: Docker image present
+# docker:
+# image: "{{ openshift.common.docker.image }}"
+# state: image_present
+# when: is_atomic
+
+- name: Install Master docker service file
+ template:
+ dest: "/etc/systemd/system/{{ openshift.common.service_type }}-master.service"
+ src: openshift.docker.master.service
+ register: install_result
+ when: is_atomic
+
+- name: Reload systemd units
+ command: systemctl daemon-reload
+ when: is_atomic and install_result | changed
- name: Re-gather package dependent master facts
openshift_facts:
@@ -113,6 +136,7 @@
action: "{{ ansible_pkg_mgr }} name=httpd-tools state=present"
when: (item.kind == 'HTPasswdPasswordIdentityProvider')
with_items: openshift.master.identity_providers
+ when: not is_atomic
- name: Ensure htpasswd directory exists
file:
@@ -251,7 +275,7 @@
- name: Install cluster packages
action: "{{ ansible_pkg_mgr }} name=pcs state=present"
- when: openshift_master_ha | bool and openshift.master.cluster_method == 'pacemaker'
+ when: openshift_master_ha | bool and openshift.master.cluster_method == 'pacemaker' and not is_atomic
register: install_result
- name: Start and enable cluster service
@@ -283,6 +307,7 @@
command: cp {{ openshift_master_config_dir }}/admin.kubeconfig ~{{ item }}/.kube/config
args:
creates: ~{{ item }}/.kube/config
+ when: not is_atomic
with_items:
- root
- "{{ ansible_ssh_user }}"