From b6190a17b578de72147e481b0eea00aca59adc2f Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 21 Apr 2017 13:30:53 -0400 Subject: Remove jinja template delimeters from when conditions In ansible 2.3 "[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ g_glusterfs_hosts is not defined }}" --- .../common/openshift-cluster/evaluate_groups.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'playbooks/common/openshift-cluster/evaluate_groups.yml') diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml index 6aac70f63..2fd2fb36e 100644 --- a/playbooks/common/openshift-cluster/evaluate_groups.yml +++ b/playbooks/common/openshift-cluster/evaluate_groups.yml @@ -7,31 +7,31 @@ tasks: - fail: msg: This playbook requires g_etcd_hosts to be set - when: "{{ g_etcd_hosts is not defined }}" + when: "g_etcd_hosts is not defined" - fail: msg: This playbook requires g_master_hosts or g_new_master_hosts to be set - when: "{{ g_master_hosts is not defined and g_new_master_hosts is not defined }}" + when: "g_master_hosts is not defined and g_new_master_hosts is not defined" - fail: msg: This playbook requires g_node_hosts or g_new_node_hosts to be set - when: "{{ g_node_hosts is not defined and g_new_node_hosts is not defined }}" + when: "g_node_hosts is not defined and g_new_node_hosts is not defined" - fail: msg: This playbook requires g_lb_hosts to be set - when: "{{ g_lb_hosts is not defined }}" + when: "g_lb_hosts is not defined" - fail: msg: This playbook requires g_nfs_hosts to be set - when: "{{ g_nfs_hosts is not defined }}" + when: "g_nfs_hosts is not defined" - fail: msg: The nfs group must be limited to one host - when: "{{ (groups[g_nfs_hosts] | default([])) | length > 1 }}" + when: "(groups[g_nfs_hosts] | default([])) | length > 1" - fail: msg: This playbook requires g_glusterfs_hosts to be set - when: "{{ g_glusterfs_hosts is not defined }}" + when: "g_glusterfs_hosts is not defined" - name: Evaluate oo_all_hosts add_host: @@ -86,7 +86,7 @@ ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" ansible_become: "{{ g_sudo | default(omit) }}" with_items: "{{ g_master_hosts | default([]) }}" - when: "{{ g_nodeonmaster | default(false) | bool and not g_new_node_hosts | default(false) | bool }}" + when: "g_nodeonmaster | default(false) | bool and not g_new_node_hosts | default(false) | bool" changed_when: no - name: Evaluate oo_first_etcd @@ -94,7 +94,7 @@ name: "{{ g_etcd_hosts[0] }}" groups: oo_first_etcd ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - when: "{{ g_etcd_hosts|length > 0 }}" + when: "g_etcd_hosts|length > 0" changed_when: no - name: Evaluate oo_first_master @@ -103,7 +103,7 @@ groups: oo_first_master ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" ansible_become: "{{ g_sudo | default(omit) }}" - when: "{{ g_master_hosts|length > 0 }}" + when: "g_master_hosts|length > 0" changed_when: no - name: Evaluate oo_lb_to_config -- cgit v1.2.3 From 717c36fde2639f6f3cc7bf534052e1df0479c2fe Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Thu, 27 Apr 2017 09:31:41 -0400 Subject: Don't double quote when conditions --- .../common/openshift-cluster/evaluate_groups.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'playbooks/common/openshift-cluster/evaluate_groups.yml') diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml index 2fd2fb36e..4331bc88d 100644 --- a/playbooks/common/openshift-cluster/evaluate_groups.yml +++ b/playbooks/common/openshift-cluster/evaluate_groups.yml @@ -7,31 +7,31 @@ tasks: - fail: msg: This playbook requires g_etcd_hosts to be set - when: "g_etcd_hosts is not defined" + when: g_etcd_hosts is not defined - fail: msg: This playbook requires g_master_hosts or g_new_master_hosts to be set - when: "g_master_hosts is not defined and g_new_master_hosts is not defined" + when: g_master_hosts is not defined and g_new_master_hosts is not defined - fail: msg: This playbook requires g_node_hosts or g_new_node_hosts to be set - when: "g_node_hosts is not defined and g_new_node_hosts is not defined" + when: g_node_hosts is not defined and g_new_node_hosts is not defined - fail: msg: This playbook requires g_lb_hosts to be set - when: "g_lb_hosts is not defined" + when: g_lb_hosts is not defined - fail: msg: This playbook requires g_nfs_hosts to be set - when: "g_nfs_hosts is not defined" + when: g_nfs_hosts is not defined - fail: msg: The nfs group must be limited to one host - when: "(groups[g_nfs_hosts] | default([])) | length > 1" + when: (groups[g_nfs_hosts] | default([])) | length > 1 - fail: msg: This playbook requires g_glusterfs_hosts to be set - when: "g_glusterfs_hosts is not defined" + when: g_glusterfs_hosts is not defined - name: Evaluate oo_all_hosts add_host: @@ -86,7 +86,7 @@ ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" ansible_become: "{{ g_sudo | default(omit) }}" with_items: "{{ g_master_hosts | default([]) }}" - when: "g_nodeonmaster | default(false) | bool and not g_new_node_hosts | default(false) | bool" + when: g_nodeonmaster | default(false) | bool and not g_new_node_hosts | default(false) | bool changed_when: no - name: Evaluate oo_first_etcd @@ -94,7 +94,7 @@ name: "{{ g_etcd_hosts[0] }}" groups: oo_first_etcd ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - when: "g_etcd_hosts|length > 0" + when: g_etcd_hosts|length > 0 changed_when: no - name: Evaluate oo_first_master @@ -103,7 +103,7 @@ groups: oo_first_master ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" ansible_become: "{{ g_sudo | default(omit) }}" - when: "g_master_hosts|length > 0" + when: g_master_hosts|length > 0 changed_when: no - name: Evaluate oo_lb_to_config -- cgit v1.2.3