summaryrefslogtreecommitdiffstats
path: root/playbooks/container-runtime
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-12-05 15:14:49 -0500
committerMichael Gugino <mgugino@redhat.com>2017-12-07 09:25:31 -0500
commit2249ba3d08d1e6c55bf008609c9e4eace16bd917 (patch)
tree849e51214d2bd93e3fe8f9f4537d8f843416d4d8 /playbooks/container-runtime
parent4bcb53654635de775c60d0176e3aeeed4856fc86 (diff)
downloadopenshift-2249ba3d08d1e6c55bf008609c9e4eace16bd917.tar.gz
openshift-2249ba3d08d1e6c55bf008609c9e4eace16bd917.tar.bz2
openshift-2249ba3d08d1e6c55bf008609c9e4eace16bd917.tar.xz
openshift-2249ba3d08d1e6c55bf008609c9e4eace16bd917.zip
Implement container_runtime playbooks and changes
This commit refactors some duplicate code, removes usage of set_fact where not needed, and reorganizes container_runtime role to use include_role.
Diffstat (limited to 'playbooks/container-runtime')
-rw-r--r--playbooks/container-runtime/config.yml6
-rw-r--r--playbooks/container-runtime/private/config.yml28
l---------playbooks/container-runtime/private/roles1
3 files changed, 35 insertions, 0 deletions
diff --git a/playbooks/container-runtime/config.yml b/playbooks/container-runtime/config.yml
new file mode 100644
index 000000000..f15aa771f
--- /dev/null
+++ b/playbooks/container-runtime/config.yml
@@ -0,0 +1,6 @@
+---
+- import_playbook: ../init/main.yml
+ vars:
+ skip_verison: True
+
+- import_playbook: private/config.yml
diff --git a/playbooks/container-runtime/private/config.yml b/playbooks/container-runtime/private/config.yml
new file mode 100644
index 000000000..67445edeb
--- /dev/null
+++ b/playbooks/container-runtime/private/config.yml
@@ -0,0 +1,28 @@
+---
+- hosts: "{{ l_containerized_host_groups }}"
+ vars:
+ l_chg_temp: "{{ openshift_containerized_host_groups | default([]) }}"
+ l_containerized_host_groups: "{{ (['oo_nodes_to_config'] | union(l_chg_temp)) | join(':') }}"
+ # role: container_runtime is necessary here to bring role default variables
+ # into the play scope.
+ roles:
+ - role: container_runtime
+ tasks:
+ - include_role:
+ name: container_runtime
+ tasks_from: package_docker.yml
+ when:
+ - not openshift_docker_use_system_container | bool
+ - not openshift_use_crio_only | bool
+ - include_role:
+ name: container_runtime
+ tasks_from: systemcontainer_docker.yml
+ when:
+ - openshift_docker_use_system_container | bool
+ - not openshift_use_crio_only | bool
+ - include_role:
+ name: container_runtime
+ tasks_from: systemcontainer_crio.yml
+ when:
+ - openshift_use_crio | bool
+ - openshift_docker_is_node_or_master | bool
diff --git a/playbooks/container-runtime/private/roles b/playbooks/container-runtime/private/roles
new file mode 120000
index 000000000..148b13206
--- /dev/null
+++ b/playbooks/container-runtime/private/roles
@@ -0,0 +1 @@
+../../roles/ \ No newline at end of file