Do not use bare variables in ansible conditionals

This change avoids the following warning:

[DEPRECATION WARNING]: evaluating 'uwsgi_services' as a bare variable, this
behaviour will go away and you might need to add |bool to the expression in the
future.

Change-Id: I647b703d548b543d35cac5a08eb4a32afdf5a064
This commit is contained in:
Jonathan Rosser 2020-05-12 17:02:39 +01:00
parent 0619a2b0a3
commit 331c798f45
1 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@
- name: Gather variables for each operating system
include_vars: "{{ item }}"
when: uwsgi_services
when: uwsgi_services | length > 0
with_first_found:
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml"
@ -24,16 +24,16 @@
- name: Gather variables for installation method
include_vars: "{{ uwsgi_install_method }}_install.yml"
when: uwsgi_services
when: uwsgi_services | length > 0
tags:
- always
- import_tasks: uwsgi_install.yml
when: uwsgi_services
when: uwsgi_services | length > 0
tags:
- uwsgi-install
- import_tasks: uwsgi_post_install.yml
when: uwsgi_services
when: uwsgi_services | length > 0
tags:
- uwsgi-config