1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/playbook
Ryan Brown 958ad7726a 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 length
2017-10-09 11:27:50 -04:00
..
role Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
__init__.py better error on bad playbook encoding 2017-09-14 08:53:15 -07:00
attribute.py
base.py Allow any_errors_fatal to be set in playbook - fixes #30691 (#30839) 2017-10-04 12:52:27 -07:00
become.py
block.py Fix conditional inheritance on dynamic includes (tasks and roles) (#30178) 2017-09-13 11:33:43 -05:00
conditional.py
handler.py
handler_task_include.py
helpers.py Fixing two bugs with import_role (#30398) 2017-09-14 22:04:20 -05:00
included_file.py Correctly create include_role blocks when using loops (#30372) 2017-09-14 15:56:12 -05:00
loop_control.py
play.py Properly handle user selection of None as vars_files (#31313) 2017-10-09 11:27:50 -04:00
play_context.py restore connection options from cli 2017-10-04 23:14:26 -07:00
playbook_include.py
role_include.py avoid include_Xs conflating vars with options (#30954) 2017-09-27 19:53:10 -04:00
taggable.py
task.py Allow any_errors_fatal to be set in playbook - fixes #30691 (#30839) 2017-10-04 12:52:27 -07:00
task_include.py avoid include_Xs conflating vars with options (#30954) 2017-09-27 19:53:10 -04:00