ansible/test/units
Pilou 5fc9f3d219 module_common: handle None value for templar (#36651)
* module_common: set required parameter templar

Fix the following error (related to b455901):

  $ ./hacking/test-module -m ./lib/ansible/modules/system/ping.py -I ansible_python_interpreter=/usr/bin/python
  Traceback (most recent call last):
    File "./hacking/test-module", line 268, in <module>
      main()
    File "./hacking/test-module", line 249, in main
      (modfile, modname, module_style) = boilerplate_module(options.module_path, options.module_args, interpreters, options.check, options.filename)
    File "./hacking/test-module", line 152, in boilerplate_module
      task_vars=task_vars
    File "ansible/lib/ansible/executor/module_common.py", line 910, in modify_module
      environment=environment)
    File "ansible/lib/ansible/executor/module_common.py", line 736, in _find_module_utils
      shebang, interpreter = _get_shebang(u'/usr/bin/python', task_vars, templar)
    File "ansible/lib/ansible/executor/module_common.py", line 452, in _get_shebang
      interpreter = templar.template(task_vars[interpreter_config].strip())
  AttributeError: 'NoneType' object has no attribute 'template'

* module_common.modify_module: templar is required

(cherry picked from commit 7908f78fa6)
2018-04-18 10:01:31 -07:00
..
cli galaxy unit tests: add missing arg (#33766) 2018-01-04 09:16:56 -08:00
config additional configmanager tests 2017-10-13 20:25:12 -04:00
contrib Update vmware_inventory (#26308) 2017-07-18 07:20:23 -04:00
errors test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
executor module_common: handle None value for templar (#36651) 2018-04-18 10:01:31 -07:00
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock avoid caching invetnory sources in loader (#38242) 2018-04-18 09:59:35 -07:00
module_utils nso_config break cycles in dependency sorting (#36828) (#36838) 2018-02-28 11:33:18 +00:00
modules nxos_igmp and nxos_hsrp fix (#38513) 2018-04-10 01:51:41 -04:00
parsing Fix 'New Vault password' on vault 'edit' (#35923) (#38003) 2018-04-09 14:57:34 -07:00
playbook Fix redundant yaml error blurbs on ModArgs parse errors (#36923) 2018-03-29 15:23:32 -07:00
plugins Reduce recursion within group methods 2018-04-18 09:32:30 -07:00
template Backport #37881 for 2.5.1 (#37937) 2018-03-28 11:04:44 -05:00
utils test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
vars Miscellaneous pylint fixes. 2017-09-13 01:53:08 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
ansible.cfg Fix ansible-test config management. 2017-10-04 12:52:36 -07:00
conftest.py Fix bugs in ansible-test units command. (#24044) 2017-04-27 11:21:11 +08:00
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 2017-06-14 11:08:34 -04:00