summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master_ca/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master_ca/tasks/main.yml')
-rw-r--r--roles/openshift_master_ca/tasks/main.yml15
1 files changed, 14 insertions, 1 deletions
diff --git a/roles/openshift_master_ca/tasks/main.yml b/roles/openshift_master_ca/tasks/main.yml
index 314f068e7..5b4c92f2b 100644
--- a/roles/openshift_master_ca/tasks/main.yml
+++ b/roles/openshift_master_ca/tasks/main.yml
@@ -1,16 +1,29 @@
---
- name: Install the base package for admin tooling
- yum: pkg={{ openshift.common.service_type }}{{ openshift_version }} state=present
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version }} state=present"
+ when: not openshift.common.is_containerized | bool
register: install_result
- name: Reload generated facts
openshift_facts:
+ when: install_result | changed
- name: Create openshift_master_config_dir if it doesn't exist
file:
path: "{{ openshift_master_config_dir }}"
state: directory
+- name: Get docker images
+ command: docker images
+ changed_when: false
+ when: openshift.common.is_containerized | bool
+ register: docker_images
+
+- name: Pull required docker image
+ command: >
+ docker pull {{ openshift.common.cli_image }}
+ when: openshift.common.is_containerized | bool and openshift.common.cli_image not in docker_images.stdout
+
- name: Create the master certificates if they do not already exist
command: >
{{ openshift.common.admin_binary }} create-master-certs