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 }}" --- roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py | 2 +- roles/openshift_certificate_expiry/tasks/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/openshift_certificate_expiry') diff --git a/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py b/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py index 5f102e960..2dd107a89 100644 --- a/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py +++ b/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py @@ -35,7 +35,7 @@ Example playbook usage: become: no run_once: yes delegate_to: localhost - when: "{{ openshift_certificate_expiry_save_json_results|bool }}" + when: "openshift_certificate_expiry_save_json_results|bool" copy: content: "{{ hostvars|oo_cert_expiry_results_to_json() }}" dest: "{{ openshift_certificate_expiry_json_results_path }}" diff --git a/roles/openshift_certificate_expiry/tasks/main.yml b/roles/openshift_certificate_expiry/tasks/main.yml index 139d5de6e..a415b5914 100644 --- a/roles/openshift_certificate_expiry/tasks/main.yml +++ b/roles/openshift_certificate_expiry/tasks/main.yml @@ -13,12 +13,12 @@ src: cert-expiry-table.html.j2 dest: "{{ openshift_certificate_expiry_html_report_path }}" delegate_to: localhost - when: "{{ openshift_certificate_expiry_generate_html_report|bool }}" + when: "openshift_certificate_expiry_generate_html_report|bool" - name: Generate the result JSON string run_once: yes set_fact: json_result_string="{{ hostvars|oo_cert_expiry_results_to_json(play_hosts) }}" - when: "{{ openshift_certificate_expiry_save_json_results|bool }}" + when: "openshift_certificate_expiry_save_json_results|bool" - name: Generate results JSON file become: no @@ -27,4 +27,4 @@ src: save_json_results.j2 dest: "{{ openshift_certificate_expiry_json_results_path }}" delegate_to: localhost - when: "{{ openshift_certificate_expiry_save_json_results|bool }}" + when: "openshift_certificate_expiry_save_json_results|bool" -- cgit v1.2.1 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 --- roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py | 2 +- roles/openshift_certificate_expiry/tasks/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/openshift_certificate_expiry') diff --git a/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py b/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py index 2dd107a89..577a14b9a 100644 --- a/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py +++ b/roles/openshift_certificate_expiry/filter_plugins/oo_cert_expiry.py @@ -35,7 +35,7 @@ Example playbook usage: become: no run_once: yes delegate_to: localhost - when: "openshift_certificate_expiry_save_json_results|bool" + when: openshift_certificate_expiry_save_json_results|bool copy: content: "{{ hostvars|oo_cert_expiry_results_to_json() }}" dest: "{{ openshift_certificate_expiry_json_results_path }}" diff --git a/roles/openshift_certificate_expiry/tasks/main.yml b/roles/openshift_certificate_expiry/tasks/main.yml index a415b5914..b5234bd1e 100644 --- a/roles/openshift_certificate_expiry/tasks/main.yml +++ b/roles/openshift_certificate_expiry/tasks/main.yml @@ -13,12 +13,12 @@ src: cert-expiry-table.html.j2 dest: "{{ openshift_certificate_expiry_html_report_path }}" delegate_to: localhost - when: "openshift_certificate_expiry_generate_html_report|bool" + when: openshift_certificate_expiry_generate_html_report|bool - name: Generate the result JSON string run_once: yes set_fact: json_result_string="{{ hostvars|oo_cert_expiry_results_to_json(play_hosts) }}" - when: "openshift_certificate_expiry_save_json_results|bool" + when: openshift_certificate_expiry_save_json_results|bool - name: Generate results JSON file become: no @@ -27,4 +27,4 @@ src: save_json_results.j2 dest: "{{ openshift_certificate_expiry_json_results_path }}" delegate_to: localhost - when: "openshift_certificate_expiry_save_json_results|bool" + when: openshift_certificate_expiry_save_json_results|bool -- cgit v1.2.1