From 08f085dd28a32fffbd15d7f2d511fb12bd0fe947 Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Mon, 8 Jan 2018 11:24:24 -0500 Subject: Build containerized host group dynamically Currently, we are using some inventory variables to determine what host groups should be considered containerized. This is problematic and has several edge cases. This commit removes the variable l_containerized_host_groups and builds a dynamic group of hosts named 'oo_hosts_containerized_managed_true' based on the value of 'containerized' --- playbooks/container-runtime/private/build_container_groups.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 playbooks/container-runtime/private/build_container_groups.yml (limited to 'playbooks/container-runtime/private/build_container_groups.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..7fd60743c --- /dev/null +++ b/playbooks/container-runtime/private/build_container_groups.yml @@ -0,0 +1,6 @@ +--- +- name: create oo_hosts_containerized_managed_true host group + hosts: oo_all_hosts:!oo_nodes_to_config + tasks: + - group_by: + key: oo_hosts_containerized_managed_{{ (containerized | default(False)) | ternary('true','false') }} -- cgit v1.2.3