ansible/ansible — pull request #3934 by ferringb (2013-08-23 22:10:38+00:00)
Title: Pile 'o fixes for set_fact, missing filters, broken defaults, and nonworking test setup.

These fixes were previously sent broken down into individual topics, although they had a common initial base; per a request on one of them, all of this should be collapsed down, thus doing so here.

With these changes, the following now properly fail if in undefined var mode.

- hosts: all
task:
- debug: msg="missing filter is missing {{ansible_inventory_hostname|missing_filter}}"
- set_fact: this_now_fails="{{ undefined_var }}"

Note; these fixes *require* the first two revs in this PR:
1) first fixes defaults so that integer values are always integers. This breaks later test code, and is broken for users who make a forgivable typo ('1' is effectively the same as 1 in ansible.cfg for ssh timeout for example)
2) Runner.__init__ was tweaked so it binds the defaults it access at runtime, rather than at parse/compile time. The previous tests for undefined var behaviour were working by luck, despite trying to adjust those settings at testing time; the new tests I added require the behaviour to work fully, hence having to fix this.