summaryrefslogtreecommitdiffstats
path: root/roles/docker/defaults
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-10-27 13:47:08 -0400
committerSteve Milner <smilner@redhat.com>2017-10-27 13:47:08 -0400
commitee6adf9e9a520cc5873bf9f36924ae9aa4c47c7c (patch)
tree2698069247c0f3729477162f154be8982fe04dde /roles/docker/defaults
parent39514f8e43056d70812c3095759f5bb6155cc88c (diff)
downloadopenshift-ee6adf9e9a520cc5873bf9f36924ae9aa4c47c7c.tar.gz
openshift-ee6adf9e9a520cc5873bf9f36924ae9aa4c47c7c.tar.bz2
openshift-ee6adf9e9a520cc5873bf9f36924ae9aa4c47c7c.tar.xz
openshift-ee6adf9e9a520cc5873bf9f36924ae9aa4c47c7c.zip
docker: Create openshift_docker_is_node_or_master variable
This can be used in place of: inventory_hostname in groups['oo_masters_to_config'] or \ inventory_hostname in groups['oo_nodes_to_config'] While the previous version works, this change helps with the tasks are run during AMI creation. Code written by Kenny Woodson @kwoodson.
Diffstat (limited to 'roles/docker/defaults')
-rw-r--r--roles/docker/defaults/main.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml
index 3f0752f4c..fe938e52b 100644
--- a/roles/docker/defaults/main.yml
+++ b/roles/docker/defaults/main.yml
@@ -29,3 +29,6 @@ r_crio_os_firewall_deny: []
r_crio_os_firewall_allow:
- service: crio
port: 10010/tcp
+
+
+openshift_docker_is_node_or_master: "{{ True if inventory_hostname in (groups['oo_masters_to_config']|default([])) or inventory_hostname in (groups['oo_nodes_to_config']|default([])) else False | bool }}"