Commit Graph

27160 Commits (4f25435cd2e354dad2e6cb165a867eda3ac9dd78)

Author SHA1 Message Date
Pilou 4f25435cd2 Handle openstacksdk < 0.10.0: fix AttributeError (#50285)
* openstacksdk < 0.10.0: fix AttributeError

`openstack.version.__version__` expression raises an `AttributeError`
exception when openstacksdk < 0.10.0 is used. `openstack.version` is
now imported as a module, which works for all openstacksdk versions.

Error was:

    The full traceback is:
    Traceback (most recent call last):
      File "$HOME/.ansible/tmp/ansible-tmp-1545612308.8-46792777824159/AnsiballZ_os_security_group.py", line 113, in <module>
        _ansiballz_main()
      File "$HOME/.ansible/tmp/ansible-tmp-1545612308.8-46792777824159/AnsiballZ_os_security_group.py", line 105, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "$HOME/.ansible/tmp/ansible-tmp-1545612308.8-46792777824159/AnsiballZ_os_security_group.py", line 48, in invoke_module
        imp.load_module('__main__', mod, module, MOD_DESC)
      File "/tmp/ansible_os_security_group_payload_keFTIJ/__main__.py", line 163, in <module>
      File "/tmp/ansible_os_security_group_payload_keFTIJ/__main__.py", line 115, in main
      File "/tmp/ansible_os_security_group_payload_keFTIJ/ansible_os_security_group_payload.zip/ansible/module_utils/openstack.py", line 121, in openstack_cloud_from_module
    AttributeError: 'module' object has no attribute 'version'

* Add missing space & dot in error message

* Always require openstacksdk >= 0.12
5 years ago
Raimund Hook 6c74e29618 Add dns_domain into os_network.py (#56453)
* Add dns_domain into os_network.py

* Added changelog fragment for PR 56453

* fixed linting issue (lib/ansible/modules/cloud/openstack/os_network.py)
5 years ago
Dominik Holler bc50a52ee2 Handle binding:vnic_type as optional (#55526)
According to the OpenStack Networking API
the attribute binding:vnic_type of a port is optional.
This change enables the os_port module to handle
binding:vnic_type as optional.
5 years ago
Brian Coca f96529d20e
warn on systemd globs (#56645)
* warn on systemd globs
* added note to docs

  fixes 55476
5 years ago
Fred-sun dad62500af Update azure_rm_devtestlabvirtualnetwork relate document (#56893) 5 years ago
Mariusz Mazur f65df9189e kubevirt_vm: simplify previous change + update comments (#56897) 5 years ago
Yury V. Zaytsev d88d71e4b1 route53_zone: return existing zone id in check mode (#56702)
* Returns zone ID for existing zone or `null`
* route53_zone: add module unit tests
* route53_zone: add compatibility with Python 2.6 to the unit tests
* route53_zone: address pycodestyle warning (add blank line)
5 years ago
David Parrish 6ebfe413b0 Spelling typo (#56878)
Changed 'creatd' to 'created'
5 years ago
Brian Coca 4adb7cfb5f
Always keep subset data for callbacks (#56881)
results were only being preserved during no_log
  fixes #56704
5 years ago
Thomas ten Cate 3b16036ce2 Keep machinectl from parsing options of cmd (#56572)
This is needed on machinectl versions prior to v231 (d6c3537ea9 to be precise).

Fixes #56571
5 years ago
Gonéri Le Bouder 8cee127ee4 vmware_host_datastore: ability to target a ESXi
Until now, the module was only able to interact with vcenter. This
commit adds the ability to directly target an ESXi without the
`esxi_hostname` parameter.
5 years ago
Fred-sun 206806265d Modify azure_rm_devtestlabschedule related document (#56819) 5 years ago
Ondra Machacek 8168c965bc kubevirt_vm: Fix checking of VM update (#56846) 5 years ago
Ondra Machacek fa6d328b8f kubevirt: Fix RS and presets template parameters (#56865) 5 years ago
Martin Krizek 7b9d7e6b5c yum: handle "_none_" value for proxy (#56725)
* yum: handle "_none_" value for proxy

Fixes #56538

* Fix sanity check
5 years ago
Sam Doran 8f4f3750fe
Ensure uri module always returns status even on failure (#56240)
- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
5 years ago
Brian Coca 22b9525aa9
Preserve ssh error (#56460)
* Preserve ssh error

* more details on fail

* removed redundant caption to errors
5 years ago
Andrew Gaffney 7f0bf0a98a
Config toggle for duplicate dict key warnings (fixes #56799) (#56805) 5 years ago
Brian Coca 1da47bfa8c
Prevent vars premature templating (#56117)
Avoid premature vars templating
  * added tests
  * avoid 'is template' warning in vars, since we want them for latter templating
5 years ago
Gonéri Le Bouder 3095df099d vmware_vmkernel: no error on state=absent
The `network.type` parameter is set to default on default on `static`.
As a consequence, the network parameter is always defined as `dict`.

This patch ensures we don't check the value of the network configuration
if we want to delete the interface.
5 years ago
Abhijeet Kasurde 26d38dd642 VMware: Add folder param in vmware_datastore_cluster
* Make datacenter as alias and optional
* Add folder param to place datastore cluster in specific folder
* Updated examples
* Updated tests

Fixes: #48010

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Nathaniel Case cebb363fcc eos_l2_interface handle "Interface does not exist" (#56787)
* Quick and dirty attempt to handle eapi error

* Well this should probably change

* Hopefully this works correctly?

* Fix check_rc handling with httpapi

* Add tests that should hopefully cover the error

* Fix warnings

* Improve tests
5 years ago
Gonéri Le Bouder 5005c353ef VMware: vcenter_folder: print full path of the new folder (#55237)
Print the full path of the freshly created folder in the output string.
5 years ago
Bill Dodd 0d842ff539 redfish: refactor service_root variable (#56198) 5 years ago
Julien Palard 64b30b172e docs: cron: fix for example raises a warning. (#56701)
The following one:

    The value 2 (type int) in a string field was converted to '2'
5 years ago
MyronFanQiu 2a9b9d63ba Show access keys for azure_rm_storageaccount (#56612) 5 years ago
tknipper11 54aa6f3921 ACI CDP Interface Policy Module Creation (#54818)
* initial commit

* Fix typo in integration test which caused an assertion to fail

* Updated integration testing

* Fix Ansible Sanity Errors

* Changed version added to 2.8 from 2.9

* added from __future__ import absolute_import, division, print_function
__metaclass__ = type
5 years ago
RobW3LGA bb50fc3889 construct_deep_url() (#53475)
* Updates aci.py with the ability to add ACI objects to any depth

Changes start at line 411 (construct_deep_url() and supporting functions). One minor change to line 633 (the original construct_url()) to provide for testability:  ...join(sorted(self.child_classes)) vs ...join(self.child_classes)

I am also attaching two test files. One characterizing the existing construct_url() and the matching test set for construct_deep_url() to support my efforts and proof of parity

* Two PyTest files to support construct_deep_url

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Correcting previous upload to incorrect folder

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Deleting for file name change per Matt Clay

* Deleting for file name change per Matt Clay

* Correcting file names per Matt Clay

@mattclay Thanks again for your continued guidance and patience. Please cancel the previous (incorrect) request

* Wrong location for test file

* Wrong location for test file

* First attempt to comply with suggestions

lib/ansible/module_utils/network/aci/aci.py:517:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:534:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:558:161: E501 line too long (210 > 160 characters)

* First attempt to comply with suggestions

test/units/module_utils/network/aci/test_aci_construct_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_deep_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_construct_url.py:0:0: use "\n" for line endings instead of "\r\n"
test/units/module_utils/network/aci/test_aci_deep_url.py:0:0: use "\n" for line endings instead of "\r\n"
Shortened test function names (less descriptive)

* Second attempt to comply with suggestions

* Second attempt to comply with suggestions

* Third attempt to comply with suggestions

* Third attempt to comply with suggestions

* Pro Tip: Convert from 'CRLF' to 'LF' in VSCode

It's on the status bar to the right

* Added setup() support for tests

* Continued corrections to support testing

* Added two mocks to support testing

I could not find where to place fakes/mocks, so please let me know if the current location is incorrect

* Adding tmpdir property to mock_basic.py

* Added last blank line to mock_basic.py

To pass sanity test

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py
5 years ago
Felix Fontein 391a1042c2 openssl_pkcs12: fix crash due to wrong path used for loading key in check mode (#56808)
* Used wrong path for private key.

* Add changelog.
5 years ago
Brian Coca eb9009c4f4 added missing version_added 5 years ago
Paddy Newman 57e42842b0 Add a new "log_folder" option to the log_plays callback plugin. (#56717)
* Add a new "log_folder" option to the log_plays callback plugin.

A a new option for the log_plays callback plugin which allows the user to
control where the callback where creates log files.

The option can be set via the ANSIBLE_LOG_FOLDER environment variable or in the
Ansible configuration file, e.g.:

[callback_log_plays]
log_folder = /path/to/my/log/folder
5 years ago
Matt Martz 8bb3274711
Improvement on setting VALID_INCLUDE_KEYWORDS on HandlerTaskInclude (#56801) 5 years ago
Fred-sun 584a32e028 modify azure_rm_devtestlabpolicy relate document (#56770) 5 years ago
Fred-sun 4680ed4525 modify azure_rm_devtestlabenvironment relate document (#56769) 5 years ago
Fred-sun 22d2c6282a Update azure_rm_cosmosdbaccount related module document (#56624)
* update azure_rm_cosmosdbaccount_facts document
5 years ago
Fred-sun 16fb3ffbda modify azure_rm_devtestlabcustomimage's document (#56763) 5 years ago
Fred-sun 71ec184688 modify document (#56762) 5 years ago
Kevyn Pérez 96d2dd3241 Adding example for add host to groups (#56756)
updates the documentation for the virtualbox plugin
5 years ago
Yunge Zhu 831d3c7b62 add azure_rm_keyvault_info (#55497) 5 years ago
Sloane Hertel cea7151a5b The InventoryData class does not have a get_vars method and InventoryManager's get_vars never appears to have been used (#56804) 5 years ago
Brian Coca 8fe9618c84
preserve underlying block building error (#56465)
fixes #56462
5 years ago
Brian Coca 69b2d7e0f3 fix collection adjacent loading with --playbook-dir (#56194)
* added inventory adjacent test
5 years ago
Dag Wieers 4f89c1d508
Revert "ACI: Implement encoded query_string" (#56783)
This reverts commit 1690af04fe.
5 years ago
Nathan Swartz e4239d9424 Fix workload profileId indexing in netapp_e_volume module (#56747) 5 years ago
Andrey Klychkov f9108e23e7 postgresql_db: bugfix 56703 (#56734) 5 years ago
Fred-sun f824a13952 remove azure_rm_cdnprofile quote (#56695) 5 years ago
Abhijeet Kasurde 459776eb82
VMware: Add folder option for vmware_dvswitch (#56707)
* Added folder param
* Mark datacenter as optional parameter
* Updated docs
* Updated tests

Fixes: #54986

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Will Thames 4065692e13 k8s minor bug fixes (#56168)
Ensure `wait_condition`s with `Status: Unknown` actually
complete

Return k8s object after wait rather than k8s object before
wait when object is patched.
5 years ago
Jake Scaltreto 3e8ca0285f lookup: consul_kv: Add datacenter parameter (#56647) 5 years ago
Kevin Subileau d8c1f67862 win_file_version: fix typos (#56751)
##### SUMMARY
Minor fixes in error messages


##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
win_file_version

##### ADDITIONAL INFORMATION
5 years ago