summaryrefslogtreecommitdiffstats
path: root/playbooks/init/facts.yml
diff options
context:
space:
mode:
authorMichael Gugino <gugino.michael@yahoo.com>2017-12-21 15:53:30 -0500
committerGitHub <noreply@github.com>2017-12-21 15:53:30 -0500
commitfbf32e8e992a5de1cb5fa9cacba9224658b5c0a4 (patch)
tree54d9187a470cd044be9406e97d47ca5989411570 /playbooks/init/facts.yml
parent0300b611877689e9f14ad5714b1e4e2c7224ca1e (diff)
parente3cf9edff6d0186b09b1a112592f283fab6857d0 (diff)
downloadopenshift-fbf32e8e992a5de1cb5fa9cacba9224658b5c0a4.tar.gz
openshift-fbf32e8e992a5de1cb5fa9cacba9224658b5c0a4.tar.bz2
openshift-fbf32e8e992a5de1cb5fa9cacba9224658b5c0a4.tar.xz
openshift-fbf32e8e992a5de1cb5fa9cacba9224658b5c0a4.zip
Merge pull request #6530 from mgugino-upstream-stage/init-task-trim
Move sanity_checks into custom action plugin
Diffstat (limited to 'playbooks/init/facts.yml')
-rw-r--r--playbooks/init/facts.yml66
1 files changed, 8 insertions, 58 deletions
diff --git a/playbooks/init/facts.yml b/playbooks/init/facts.yml
index ac4429b23..9e411a551 100644
--- a/playbooks/init/facts.yml
+++ b/playbooks/init/facts.yml
@@ -21,6 +21,14 @@
path: /run/ostree-booted
register: ostree_booted
+ # TODO(michaelgugino) remove this line once CI is updated.
+ - name: set openshift_deployment_type if unset
+ set_fact:
+ openshift_deployment_type: "{{ deployment_type }}"
+ when:
+ - openshift_deployment_type is undefined
+ - deployment_type is defined
+
- name: initialize_facts set fact openshift_is_atomic and openshift_is_containerized
set_fact:
openshift_is_atomic: "{{ ostree_booted.stat.exists }}"
@@ -28,26 +36,6 @@
# TODO: Should this be moved into health checks??
# Seems as though any check that happens with a corresponding fail should move into health_checks
- - name: Validate python version - ans_dist is fedora and python is v3
- fail:
- msg: |
- openshift-ansible requires Python 3 for {{ ansible_distribution }};
- For information on enabling Python 3 with Ansible, see https://docs.ansible.com/ansible/python_3_support.html
- when:
- - ansible_distribution == 'Fedora'
- - ansible_python['version']['major'] != 3
-
- # TODO: Should this be moved into health checks??
- # Seems as though any check that happens with a corresponding fail should move into health_checks
- - name: Validate python version - ans_dist not Fedora and python must be v2
- fail:
- msg: "openshift-ansible requires Python 2 for {{ ansible_distribution }}"
- when:
- - ansible_distribution != 'Fedora'
- - ansible_python['version']['major'] != 2
-
- # TODO: Should this be moved into health checks??
- # Seems as though any check that happens with a corresponding fail should move into health_checks
# Fail as early as possible if Atomic and old version of Docker
- when:
- openshift_is_atomic | bool
@@ -68,39 +56,6 @@
- l_atomic_docker_version.stdout | replace('"', '') is version_compare('1.12','>=')
msg: Installation on Atomic Host requires Docker 1.12 or later. Please upgrade and restart the Atomic Host.
- - when:
- - not openshift_is_atomic | bool
- block:
- - name: Ensure openshift-ansible installer package deps are installed
- package:
- name: "{{ item }}"
- state: present
- with_items:
- - iproute
- - "{{ 'python3-dbus' if ansible_distribution == 'Fedora' else 'dbus-python' }}"
- - "{{ 'python3-PyYAML' if ansible_distribution == 'Fedora' else 'PyYAML' }}"
- - yum-utils
- register: result
- until: result is succeeded
-
- - name: Ensure various deps for running system containers are installed
- package:
- name: "{{ item }}"
- state: present
- with_items:
- - atomic
- - ostree
- - runc
- when:
- - >
- (openshift_use_system_containers | default(False)) | bool
- or (openshift_use_etcd_system_container | default(False)) | bool
- or (openshift_use_openvswitch_system_container | default(False)) | bool
- or (openshift_use_node_system_container | default(False)) | bool
- or (openshift_use_master_system_container | default(False)) | bool
- register: result
- until: result is succeeded
-
- name: Gather Cluster facts
openshift_facts:
role: common
@@ -136,11 +91,6 @@
local_facts:
sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
- - name: initialize_facts set_fact repoquery command
- set_fact:
- repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
- repoquery_installed: "{{ 'dnf repoquery --latest-limit 1 -d 0 --disableexcludes=all --installed' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins --installed' }}"
-
- name: Initialize special first-master variables
hosts: oo_first_master
roles: