diff options
Diffstat (limited to 'playbooks/container-runtime')
-rw-r--r-- | playbooks/container-runtime/config.yml | 4 | ||||
-rw-r--r-- | playbooks/container-runtime/private/build_container_groups.yml | 8 | ||||
-rw-r--r-- | playbooks/container-runtime/private/config.yml | 25 | ||||
-rw-r--r-- | playbooks/container-runtime/private/setup_storage.yml | 13 | ||||
-rw-r--r-- | playbooks/container-runtime/setup_storage.yml | 4 |
5 files changed, 41 insertions, 13 deletions
diff --git a/playbooks/container-runtime/config.yml b/playbooks/container-runtime/config.yml index f15aa771f..d7f3634ec 100644 --- a/playbooks/container-runtime/config.yml +++ b/playbooks/container-runtime/config.yml @@ -1,6 +1,8 @@ --- - import_playbook: ../init/main.yml vars: - skip_verison: True + skip_version: True + l_openshift_version_set_hosts: "all:!all" + l_openshift_version_check_hosts: "all:!all" - import_playbook: private/config.yml diff --git a/playbooks/container-runtime/private/build_container_groups.yml b/playbooks/container-runtime/private/build_container_groups.yml new file mode 100644 index 000000000..8fb7b63e8 --- /dev/null +++ b/playbooks/container-runtime/private/build_container_groups.yml @@ -0,0 +1,8 @@ +--- +# l_build_container_groups_hosts is passed in via prerequisites.yml during +# etcd scaleup plays. +- name: create oo_hosts_containerized_managed_true host group + hosts: "{{ l_build_container_groups_hosts | default('oo_all_hosts:!oo_nodes_to_config') }}" + tasks: + - group_by: + key: oo_hosts_containerized_managed_{{ (openshift_is_containerized | default(False)) | ternary('true','false') }} diff --git a/playbooks/container-runtime/private/config.yml b/playbooks/container-runtime/private/config.yml index 67445edeb..d5312de15 100644 --- a/playbooks/container-runtime/private/config.yml +++ b/playbooks/container-runtime/private/config.yml @@ -1,26 +1,35 @@ --- -- hosts: "{{ l_containerized_host_groups }}" +# l_scale_up_hosts may be passed in via prerequisites.yml during scaleup plays. +# l_etcd_scale_up_hosts may be passed in via prerequisites.yml during etcd +# scaleup plays. + +- import_playbook: build_container_groups.yml + +- hosts: "{{ l_etcd_scale_up_hosts | default(l_scale_up_hosts) | default(l_default_container_runtime_hosts) }}" 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. + l_default_container_runtime_hosts: "oo_nodes_to_config:oo_hosts_containerized_managed_true" roles: - role: container_runtime tasks: - - include_role: + - import_role: + name: openshift_excluder + tasks_from: enable.yml + vars: + r_openshift_excluder_action: enable + r_openshift_excluder_enable_openshift_excluder: false + - import_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: + - import_role: name: container_runtime tasks_from: systemcontainer_docker.yml when: - openshift_docker_use_system_container | bool - not openshift_use_crio_only | bool - - include_role: + - import_role: name: container_runtime tasks_from: systemcontainer_crio.yml when: diff --git a/playbooks/container-runtime/private/setup_storage.yml b/playbooks/container-runtime/private/setup_storage.yml index 97226d6b2..586149b1d 100644 --- a/playbooks/container-runtime/private/setup_storage.yml +++ b/playbooks/container-runtime/private/setup_storage.yml @@ -1,14 +1,21 @@ --- -- hosts: "{{ l_containerized_host_groups }}" +# l_scale_up_hosts may be passed in via prerequisites.yml during scaleup plays. +# l_etcd_scale_up_hosts may be passed in via prerequisites.yml during etcd +# scaleup plays. + +- import_playbook: build_container_groups.yml + +- hosts: "{{ l_etcd_scale_up_hosts | default(l_scale_up_hosts) | default(l_default_container_storage_hosts) }}" vars: - l_chg_temp: "{{ openshift_containerized_host_groups | default([]) }}" + l_default_container_storage_hosts: "oo_nodes_to_config:oo_hosts_containerized_managed_true" + l_chg_temp: "{{ hostvars[groups['oo_first_master'][0]]['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: + - import_role: name: container_runtime tasks_from: docker_storage_setup_overlay.yml when: diff --git a/playbooks/container-runtime/setup_storage.yml b/playbooks/container-runtime/setup_storage.yml index 98e876b2c..17ff11cfd 100644 --- a/playbooks/container-runtime/setup_storage.yml +++ b/playbooks/container-runtime/setup_storage.yml @@ -1,6 +1,8 @@ --- - import_playbook: ../init/main.yml vars: - skip_verison: True + skip_version: True + l_openshift_version_set_hosts: "all:!all" + l_openshift_version_check_hosts: "all:!all" - import_playbook: private/setup_storage.yml |