summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/post_control_plane.yml4
-rw-r--r--playbooks/init/facts.yml3
-rw-r--r--playbooks/openshift-master/private/additional_config.yml2
-rw-r--r--roles/docker/tasks/main.yml9
-rw-r--r--roles/docker/tasks/package_docker.yml5
-rw-r--r--roles/docker/tasks/systemcontainer_crio.yml6
-rw-r--r--roles/openshift_node/defaults/main.yml1
-rw-r--r--roles/openshift_node/tasks/systemd_units.yml4
9 files changed, 16 insertions, 20 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml b/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml
index 52345a9ba..2e3a7ae8b 100644
--- a/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml
+++ b/playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml
@@ -16,7 +16,7 @@
changed_when: no
- name: Get current version of Docker
- command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker"
+ command: "{{ repoquery_installed }} --qf '%{version}' docker"
register: curr_docker_version
retries: 4
until: curr_docker_version | succeeded
diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
index c634e0ab8..3aa9e0460 100644
--- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
@@ -93,11 +93,11 @@
# not already exist. We could have potentially done a replace --force to
# create and update in one step.
- role: openshift_examples
- when: openshift_install_examples | default(true,true) | bool
+ when: openshift_install_examples | default(true) | bool
- openshift_hosted_templates
# Update the existing templates
- role: openshift_examples
- when: openshift_install_examples | default(true,true) | bool
+ when: openshift_install_examples | default(true) | bool
registry_url: "{{ openshift.master.registry_url }}"
openshift_examples_import_command: replace
- role: openshift_hosted_templates
diff --git a/playbooks/init/facts.yml b/playbooks/init/facts.yml
index 7439313b7..6368eaa88 100644
--- a/playbooks/init/facts.yml
+++ b/playbooks/init/facts.yml
@@ -29,7 +29,6 @@
- name: initialize_facts set fact for containerized and l_is_*_system_container
set_fact:
l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}"
- l_is_openvswitch_system_container: "{{ (openshift_use_openvswitch_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
l_is_master_system_container: "{{ (openshift_use_master_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
# TODO: Should this be moved into health checks??
@@ -113,7 +112,6 @@
hostname: "{{ openshift_hostname | default(None) }}"
ip: "{{ openshift_ip | default(None) }}"
is_containerized: "{{ l_is_containerized | default(None) }}"
- is_openvswitch_system_container: "{{ l_is_openvswitch_system_container | default(false) }}"
is_master_system_container: "{{ l_is_master_system_container | default(false) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
@@ -139,6 +137,7 @@
- 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_facts set_fact on openshift_docker_hosted_registry_network
set_fact:
diff --git a/playbooks/openshift-master/private/additional_config.yml b/playbooks/openshift-master/private/additional_config.yml
index 32f638d42..b7cfbe4e4 100644
--- a/playbooks/openshift-master/private/additional_config.yml
+++ b/playbooks/openshift-master/private/additional_config.yml
@@ -24,7 +24,7 @@
- role: openshift_project_request_template
when: openshift_project_request_template_manage
- role: openshift_examples
- when: openshift_install_examples | default(true, true) | bool
+ when: openshift_install_examples | default(true) | bool
registry_url: "{{ openshift.master.registry_url }}"
- role: openshift_hosted_templates
registry_url: "{{ openshift.master.registry_url }}"
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 55052b0a3..b02a74711 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -60,10 +60,11 @@
state: stopped
name: "{{ openshift.docker.service_name }}"
- - name: "Ensure {{ docker_alt_storage_path }} exists"
- file:
- path: "{{ docker_alt_storage_path }}"
- state: directory
+ - name: copy "{{ docker_default_storage_path }}" to "{{ docker_alt_storage_path }}"
+ command: "cp -r {{ docker_default_storage_path }} {{ docker_alt_storage_path }}"
+ register: results
+ failed_when:
+ - results.rc != 0
- name: "Set the selinux context on {{ docker_alt_storage_path }}"
command: "semanage fcontext -a -e {{ docker_default_storage_path }} {{ docker_alt_storage_path }}"
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml
index e6c3fe4d7..5437275a2 100644
--- a/roles/docker/tasks/package_docker.yml
+++ b/roles/docker/tasks/package_docker.yml
@@ -1,6 +1,6 @@
---
- name: Get current installed Docker version
- command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker"
+ command: "{{ repoquery_installed }} --qf '%{version}' docker"
when: not openshift.common.is_atomic | bool
register: curr_docker_version
retries: 4
@@ -33,9 +33,10 @@
# Make sure Docker is installed, but does not update a running version.
# Docker upgrades are handled by a separate playbook.
+# Note: The curr_docker_version.stdout check can be removed when https://github.com/ansible/ansible/issues/33187 gets fixed.
- name: Install Docker
package: name=docker{{ '-' + docker_version if docker_version is defined else '' }} state=present
- when: not openshift.common.is_atomic | bool
+ when: not openshift.common.is_atomic | bool and not curr_docker_version | skipped and not curr_docker_version.stdout != ''
- block:
# Extend the default Docker service unit file when using iptables-services
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index 3e5bdf32c..17800d4e5 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/roles/docker/tasks/systemcontainer_crio.yml
@@ -3,16 +3,10 @@
# TODO: Much of this file is shared with container engine tasks
- set_fact:
l_insecure_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l2_docker_insecure_registries)) }}"
- when: l2_docker_insecure_registries | bool
- set_fact:
l_crio_registries: "{{ l2_docker_additional_registries + ['docker.io'] }}"
- when: l2_docker_additional_registries | bool
-- set_fact:
- l_crio_registries: "{{ ['docker.io'] }}"
- when: not (l2_docker_additional_registries | bool)
- set_fact:
l_additional_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l_crio_registries)) }}"
- when: l2_docker_additional_registries | bool
- set_fact:
l_openshift_image_tag: "{{ openshift_image_tag | string }}"
diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml
index d249278dc..62208c155 100644
--- a/roles/openshift_node/defaults/main.yml
+++ b/roles/openshift_node/defaults/main.yml
@@ -14,6 +14,7 @@ system_images_registry_dict:
origin: "docker.io"
system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
+l_is_openvswitch_system_container: "{{ (openshift_use_openvswitch_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
openshift_image_tag: ''
diff --git a/roles/openshift_node/tasks/systemd_units.yml b/roles/openshift_node/tasks/systemd_units.yml
index 6dd4838bd..397e1ba18 100644
--- a/roles/openshift_node/tasks/systemd_units.yml
+++ b/roles/openshift_node/tasks/systemd_units.yml
@@ -25,7 +25,7 @@
include_tasks: openvswitch_system_container.yml
when:
- openshift_node_use_openshift_sdn | bool
- - openshift.common.is_openvswitch_system_container | bool
+ - l_is_openvswitch_system_container | bool
- block:
- name: Pre-pull openvswitch image
@@ -38,7 +38,7 @@
when:
- openshift.common.is_containerized | bool
- openshift_node_use_openshift_sdn | bool
- - not openshift.common.is_openvswitch_system_container | bool
+ - not l_is_openvswitch_system_container | bool
- include_tasks: config/configure-node-settings.yml
- include_tasks: config/configure-proxy-settings.yml