Do not use 'null' when trying to locate vars files

This generates warnings in the ansible log

Change-Id: I317d6db32783ef5d63ac6a2554dcb983871a96a5
This commit is contained in:
Jonathan Rosser 2019-05-03 17:13:03 -06:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 8a4e202407
commit 6b33973241
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ lxc_container_enable_resolved: true
# "{{ ansible_distribution }}-{{ ansible_distribution_version }}-container.yml"
# or by providing the full path to a local file containing all of the variables
# needed to prepare a container.
lxc_user_defined_container: null
#lxc_user_defined_container: null
# Dictionary of settings for containers
properties: {}

View File

@ -62,7 +62,7 @@
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- "{{ lxc_user_defined_container }}"
- "{{ lxc_user_defined_container | default([]) }}"
- "{{ hostvars[physical_host]['ansible_distribution'] | lower }}-{{ hostvars[physical_host]['ansible_distribution_version'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_distribution'] | lower }}-{{ hostvars[physical_host]['ansible_distribution_major_version'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_os_family'] | lower }}-{{ hostvars[physical_host]['ansible_distribution_major_version'] | lower }}.yml"