summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/common/openshift-cluster/initialize_facts.yml1
-rw-r--r--playbooks/common/openshift-etcd/config.yml1
-rw-r--r--roles/openshift_examples/tasks/main.yml43
-rw-r--r--roles/openshift_node/tasks/storage_plugins/nfs.yml7
4 files changed, 49 insertions, 3 deletions
diff --git a/playbooks/common/openshift-cluster/initialize_facts.yml b/playbooks/common/openshift-cluster/initialize_facts.yml
index cda490b1f..37f523246 100644
--- a/playbooks/common/openshift-cluster/initialize_facts.yml
+++ b/playbooks/common/openshift-cluster/initialize_facts.yml
@@ -1,6 +1,7 @@
---
- name: Initialize host facts
hosts: oo_all_hosts
+ any_errors_fatal: true
roles:
- openshift_facts
tasks:
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml
index 6cb3a954f..a95de8cf3 100644
--- a/playbooks/common/openshift-etcd/config.yml
+++ b/playbooks/common/openshift-etcd/config.yml
@@ -1,6 +1,7 @@
---
- name: Set etcd facts needed for generating certs
hosts: oo_etcd_to_config
+ any_errors_fatal: true
roles:
- openshift_facts
tasks:
diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml
index fb10188f2..e9966d735 100644
--- a/roles/openshift_examples/tasks/main.yml
+++ b/roles/openshift_examples/tasks/main.yml
@@ -1,9 +1,46 @@
---
-- name: Copy openshift examples
- copy:
- src: "examples/{{ content_version }}/"
+######################################################################
+# Copying Examples
+#
+# We used to use the copy module to transfer the openshift examples to
+# the remote. Then it started taking more than a minute to transfer
+# the files. As noted in the module:
+#
+# "The 'copy' module recursively copy facility does not scale to
+# lots (>hundreds) of files."
+#
+# The `synchronize` module is suggested as an alternative, we can't
+# use it either due to changes introduced in Ansible 2.x.
+- name: Create local temp dir for OpenShift examples copy
+ local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
+ become: False
+ register: copy_examples_mktemp
+ run_once: True
+
+- name: Create tar of OpenShift examples
+ local_action: command tar -C "{{ role_path }}/files/examples/{{ content_version }}/" -cvf "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" .
+ become: False
+ register: copy_examples_tar
+
+- name: Create the remote OpenShift examples directory
+ file:
+ dest: "{{ examples_base }}"
+ state: directory
+ mode: 0755
+
+- name: Unarchive the OpenShift examples on the remote
+ unarchive:
+ src: "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar"
dest: "{{ examples_base }}/"
+- name: Cleanup the OpenShift Examples temp dir
+ become: False
+ local_action: file dest="{{ copy_examples_mktemp.stdout }}" state=absent
+
+# Done copying examples
+######################################################################
+# Begin image streams
+
- name: Modify registry paths if registry_url is not registry.access.redhat.com
shell: >
find {{ examples_base }} -type f | xargs -n 1 sed -i 's|registry.access.redhat.com|{{ registry_host | quote }}|g'
diff --git a/roles/openshift_node/tasks/storage_plugins/nfs.yml b/roles/openshift_node/tasks/storage_plugins/nfs.yml
index 14a613786..8380714d4 100644
--- a/roles/openshift_node/tasks/storage_plugins/nfs.yml
+++ b/roles/openshift_node/tasks/storage_plugins/nfs.yml
@@ -9,3 +9,10 @@
state: yes
persistent: yes
when: ansible_selinux and ansible_selinux.status == "enabled"
+
+- name: Set seboolean to allow nfs storage plugin access from containers(sandbox)
+ seboolean:
+ name: virt_sandbox_use_nfs
+ state: yes
+ persistent: yes
+ when: ansible_selinux and ansible_selinux.status == "enabled"