Commit Graph

37123 Commits

Author SHA1 Message Date
5839f07e0f yaml callback fails on python3
When the URI module returns complex JSON objects, the YAML callback
fails while trying to represent these objects.  The problem arises
because the filter method returns an iterator in Python 3, rather than a
str object.  Therefore, the str method expandtabs() is not available,
and the callback fails with the following error:

[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.yaml.CallbackModule object at 0x7f7c7ed8aa20>): 'filter' object has no attribute 'expandtabs'

Issue can be replicated by running this playbook:

- hosts: localhost
  gather_facts: false
  tasks:
    - uri:
        url: https://jsonplaceholder.typicode.com/posts

ansible-playbook tmp.yml -v
2018-04-02 11:41:00 -04:00
423b0e0f58 Improve details and events results for ecs_service_facts (#37983)
* Use AnsibleAWSModule to simplify AWS connection
* Add Exception handling, pagination, retries and backoff
* Allow events to be switched off
* Allow details to be obtained without having to specify services
2018-04-02 11:26:23 -04:00
50761bef0a changes description to match module (#31364) 2018-04-02 11:24:15 -04:00
a73e2a924b Add OpenNebula one_image module (#37831) 2018-04-02 16:58:39 +02:00
697c301f04 fix nxos_aaa_server issues (#38117) 2018-04-02 07:56:06 -04:00
b4debfad9a Add NSX-T Logical Switch support in vmware_guest (#37979)
* Add NSX-T Logical Switch support in vmware_guest

* Update vmware_guest.py

add space after % operator
2018-04-02 05:35:13 -04:00
0cdba9ff70 add instanceUuid (also called PersistentId) in vmware utils (#37127) 2018-04-02 01:49:39 -04:00
93fc99c576 Making clearer that the module has to be executed twice, and that the second run needs the data of the first (#37884). (#38135) 2018-03-31 10:07:00 -04:00
28ce3c2329 doc: inventory: nmap: fix version added (#38157) 2018-03-31 11:45:12 +02:00
b06dfbec54 cs_user: fix E325 (#38158) 2018-03-31 11:44:04 +02:00
8b98c29afd Remove the deprecated tls-sni-02 challenge method. (#38137) 2018-03-31 03:17:12 -04:00
45e4dfda3d doc: fix grammar (#38145) 2018-03-30 18:32:29 +02:00
9a21f9b2db ovirt_host_networks: Fix of bond assignment (#38054)
* ovirt_host_networks: Fix of bond assignment

* ovirt_host_networks: Fix bond modes

* ovirt_host_networks: Fix incorrect prefix documentation
2018-03-30 07:56:11 -04:00
477a602fdf ovirt_hosts: Fix failed_state after PM fence (#38102) 2018-03-30 07:55:17 -04:00
1c00a14c31 fix typo (#38131) 2018-03-30 03:46:53 -04:00
126a41327c Update docs to highlight lookup plugins for templating
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:33:02 +02:00
3973eb4c30 Added an example using a templated payload file
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:27:45 +02:00
16cf51926d VMware: vmware_portgroup teaming policy support (#36778)
This fix adds support for specifying teaming policy in
vmware_portgroup module.

Fixes: #36773

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-29 23:03:45 -04:00
fd96bcd22f Use correct action in warning about missing name 2018-03-29 18:10:00 -04:00
5e2f215dd7 Nmap inventory (#32857)
* nmap inv plugin draft

* more accurate regex

* fix format
2018-03-29 17:16:36 -04:00
a4c82d5842 Update EdgeOS modules to be community supported (#38112) 2018-03-29 15:59:46 -05:00
27c47f75ad #29334 handle maven local repo (#36159) 2018-03-29 16:16:46 -04:00
ee06f57f0d [ec2_vpc_nacl] revert suboptions for ingress and egress module parameters (#38071) 2018-03-29 16:16:01 -04:00
800dad5bdf uri: Add redirect tests for none, safe, urllib2 and all (#37068)
This is required if we want to ensure that #36809 doesn't cause any
important behavioral changes.

This PR changes the uri module to support follow_redirects=urllib2

It also adds a better error message when the connection closes before
any data was returned.
2018-03-29 14:54:42 -04:00
fea8c84a17 Fix returned landscape value when using python3 2018-03-29 11:44:05 -07:00
7908f78fa6 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
2018-03-29 13:54:48 -04:00
e10724fadb dedupe the --rsh options in favor of user supplied (#38096) 2018-03-29 09:32:27 -05:00
6f2cb28bb9 fix nxos_vlan issues (#38008) 2018-03-29 06:26:33 -04:00
2ad7d79985 additional fixes to function app test 2018-03-29 00:10:43 -07:00
66b389a00d show version brief does not work on iosxr virtual (#37609)
* show version brief does not work on iosxr virtual

* ci failures fix
2018-03-29 12:33:41 +05:30
73d3ed85ef Fix apt tests (#37922)
* Fix apt tests

* Enable the test in CI

* Additional fixes not discovered locally

* Don't break mysql tests and fix for 14.04 upgrade

* Remove not needed when cond

* Add shebang to fix-udev script

* Remove workaround in favor of rebuilding containers

* Remove leftover script
2018-03-29 08:20:10 +02:00
0efbb702b9 fixes bug: puppet module is no longer updating persistent external facts (#38026) 2018-03-29 14:54:44 +10:00
7ea05a2d56 synchronize: fix the mixture of quoting and passing of lists to run_command (#38020)
* switch to six.moves.shlex_quote

* remove the unncessary quotes on rsh
2018-03-28 18:45:49 -07:00
a19a21d715 Add --include and --omit options to ansible-test coverage report (#38061)
* Support --include and --omit with ansible-test coverage report

* Code format change
2018-03-28 18:42:57 -05:00
9b1e97424e Update Ubuntu image SHAs for ansible-test. 2018-03-28 16:11:24 -07:00
0128022654 Add OpenNebula one_vm module (#37825)
* Add OpenNebula one_vm module

* `one_vm` - module for managing VM instances instances on OpenNebula

* Add integration tests
2018-03-28 23:32:03 +02:00
cb5e594c13 Fix building from ubuntu1404 Dockerfile 2018-03-28 14:17:31 -07:00
e5d44934e7 changes default WAPI version to 2.1 (#37578) 2018-03-28 18:27:17 +01:00
98b29f8ad6 [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests
2018-03-28 12:53:35 -04:00
9dfb665e43 issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)
* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-28 17:13:54 +01:00
7324f49829 fixes example address parameters (#37765) 2018-03-28 17:11:24 +01:00
447b342662 apt: use --auto-remove with dist-upgrade (#37594) 2018-03-28 12:18:36 +02:00
4688a09aa8 Update team_netapp (#38015)
Replace gouthampacha with amit0701

amit0701 will help maintain these modules
alongside hulquest lmprice and broncofan.
2018-03-28 10:33:35 +01:00
612d0d6634 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
2018-03-28 10:21:43 +01:00
710db82930 flattened: doc: Typo in lookup example (#38006) 2018-03-28 08:25:40 +02:00
29c8d9b923 Update xml.py (#38019)
Fix a trivial typo 

 label: docsite_pr
2018-03-28 07:47:28 +02:00
371317b553 don't create vmware vm on ESX in maintenance mode (#37124)
* don't create vmware vm on ESX in maint mode

update vmware_guest not to try to create VM on ESXi host in maintenance mode

* update as requested
2018-03-27 23:12:43 -04:00
454096ca59 Fixes #37700 Azure image can be created with tag (#37981)
* image can be create or add

* update tags

* can remove all tags

* Update azure_rm_common.py
2018-03-27 23:10:29 -04:00
d065cce021 VMware: Use RFC 952 compliant hostname while customization (#38005)
VMware throws error if hostname provided by user is not RFC 952
compliant. Added minor documentation fixes.

Fixes: #24225, #27096

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-27 22:49:22 -04:00
0ee275ca64 Add Meaningful Cloudfront Identity during creation of cloudfront distribution (#37914) 2018-03-28 10:38:16 +10:00