mirror of https://github.com/ansible/ansible.git
Properly handle user selection of `None` as vars_files (#31313)
* Properly handle user selection of `None` as vars_files In a playbook, if a user has a playbook like: ``` - hosts: localhost connection: local vars_files: tasks: - .... ``` Then `vars_files` will be none, and cause a `TypeError` in vars-manager when it tries to iterate over them. To avoid this, I changed the getter to either send back the vars files from the user, or an empty list when the user passed `None`. * Only replace None with an empty list, not all falsey values * Catch error when vars_files isn't iterable * Move whole `for` loop into try/except and catch TypeError * Line lengthpull/31461/head
parent
ef72eda172
commit
958ad7726a
Loading…
Reference in New Issue