Commit graph

44968 commits

Author SHA1 Message Date
Brian Coca
a7837edcf2
some logging fixes (#56311)
* some logging fixes

  fixes #25757, #25758, #25761
  alternative to #41859 and #25765

* better color handling, courtesy of alikins
2019-05-24 16:43:47 -04:00
Martin Krizek
484c023316
ansible-test: prefer shlex.quote (#56823) 2019-05-24 22:10:33 +02:00
Martin Krizek
3b9478ade0 Migrate away from pipes.quote (#56785)
* Migrate away from pipes.quote

* Fix sanity
2019-05-24 15:48:41 -04:00
Andrey Klychkov
86354ff1fb postgresql: remove depricated lib (#56641) 2019-05-24 15:08:16 -04:00
Brian Coca
27dcf8aaab
Not native, but text (#55676)
* use to_text instead of to_native
* cleaned up some imports and other pyflakisms
* fix missing lib messages
2019-05-24 14:49:04 -04:00
Martin Krizek
6e66ea9f78 Properly detect is_chroot fact on XFS for non-root (#56899)
Fixes #56437
2019-05-24 14:23:46 -04:00
Wojciech Wypior
fca2a4c68b adds ltm policy to bigip facts (#56926)
facts no longer return changed but queried status in results
2019-05-24 10:12:43 -07:00
Brian Coca
30210e7de0
added tests for log_plays (#56811)
* added tests for log_plays

* grep for warning

* Update tests to work with ansible-test.
2019-05-24 12:24:31 -04:00
Tayeb Ben Achour
f76556e56d Update package.py (#56731)
The "-" does not work as expected if I want to get a specific version of a package. After replacing the dash with the equal sign. the task passed successfully.
Depends on package manager - adds example so we show both syntaxes.
2019-05-24 11:01:48 -05:00
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
2019-05-24 10:27:47 -05:00
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)
2019-05-24 10:27:20 -05:00
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.
2019-05-24 11:22:16 -04:00
Jonathan Bride
db6407d6bf Correct typo in playbooks_intro.rst (#56919)
Typo in code block line: ansible-lint veryify-apache.yml should be
ansible-lint verify-apache.yml
2019-05-24 09:53:00 -05:00
Brian Coca
f96529d20e
warn on systemd globs (#56645)
* warn on systemd globs
* added note to docs

  fixes 55476
2019-05-24 10:52:36 -04:00
Anatoly Kamchatnov
9a563f8947 Windows FAQ: fix reference (#56909) 2019-05-24 09:39:49 -05:00
Fred-sun
dad62500af Update azure_rm_devtestlabvirtualnetwork relate document (#56893) 2019-05-24 09:35:36 -05:00
Mariusz Mazur
f65df9189e kubevirt_vm: simplify previous change + update comments (#56897) 2019-05-24 07:24:28 -04:00
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)
2019-05-24 16:28:55 +05:30
David Parrish
6ebfe413b0 Spelling typo (#56878)
Changed 'creatd' to 'created'
2019-05-24 09:22:15 +05:30
Nathaniel Case
7834da41ff
Move eos l3 test IP addresses to documentation ranges (#56726) 2019-05-23 21:22:27 -04:00
Sam Doran
50b1a66649 Update instructions for running module directly (#56883)
The internals of AnsiballZ changed silghtly
2019-05-23 17:20:29 -05:00
Matt Martz
9c5b72147e
Validate types before asserting lengths (#56882) 2019-05-23 16:51:28 -05:00
Gonéri Le Bouder
6bb21c3db0 vmware: test-refactoring
- In order to keep the integration with `ansible-test`, we prefer to avoid any
  interaction with the Ansible inventory file.
- split up the prepare_vmware_tests/defaults/main.yml in two
  configuration files: one for vcsim and one for a real environment
- remove all the access to hostvars
- directly interact with the ESXi to mount/umount the datastore
  https://github.com/ansible/ansible/pull/56516
- record the virtual machine folder in the environment configuration
- vmware_guest_move: Use https://github.com/ansible/ansible/pull/55237
2019-05-23 17:40:19 -04:00
Brian Coca
4adb7cfb5f
Always keep subset data for callbacks (#56881)
results were only being preserved during no_log
  fixes #56704
2019-05-23 17:15:04 -04:00
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
2019-05-23 16:01:40 -04:00
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.
2019-05-23 16:01:22 -04:00
Alicia Cozine
fc94d79c47
CLI docs include license not copyright (#56871) 2019-05-23 14:53:07 -05:00
Sviatoslav Sydorenko
ab96d22b61
📝 Add a GitHub-specific security policy note
PR #56866

It'll show up at
https://github.com/ansible/ansible/security/policy
and will help us guide users to the proper docs page

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2019-05-23 21:48:58 +02:00
Fred-sun
206806265d Modify azure_rm_devtestlabschedule related document (#56819) 2019-05-23 13:59:44 -05:00
Ondra Machacek
8168c965bc kubevirt_vm: Fix checking of VM update (#56846) 2019-05-23 14:26:58 -04:00
Ondra Machacek
fa6d328b8f kubevirt: Fix RS and presets template parameters (#56865) 2019-05-23 14:26:21 -04:00
Sandra McCann
f9b43a0f68 Copyright fix for 2018 (#56860)
* update copyright in footer

* remove extraneous copyright from cli commands
2019-05-23 13:10:22 -05:00
Sandra McCann
3129fc0b17 Update RHEL repo for Ansible 2.8 (#56859) 2019-05-23 11:31:12 -05:00
Martin Krizek
7b9d7e6b5c yum: handle "_none_" value for proxy (#56725)
* yum: handle "_none_" value for proxy

Fixes #56538

* Fix sanity check
2019-05-23 10:41:17 -04:00
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
2019-05-23 10:17:17 -04:00
Brian Coca
22b9525aa9
Preserve ssh error (#56460)
* Preserve ssh error

* more details on fail

* removed redundant caption to errors
2019-05-23 10:03:35 -04:00
Andrew Gaffney
7f0bf0a98a
Config toggle for duplicate dict key warnings (fixes #56799) (#56805) 2019-05-23 08:42:44 -05:00
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
2019-05-23 09:42:19 -04:00
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.
2019-05-23 09:27:00 -04:00
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>
2019-05-23 09:12:10 -04:00
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
2019-05-23 17:02:46 +05:30
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.
2019-05-23 16:21:22 +05:30
Bill Dodd
0d842ff539 redfish: refactor service_root variable (#56198) 2019-05-23 10:57:22 +02:00
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'
2019-05-23 10:54:29 +02:00
Jordan Borean
124400f319 win_get_url: ignore defender false positive in tests (#56812) 2019-05-22 23:16:47 -07:00
MyronFanQiu
2a9b9d63ba Show access keys for azure_rm_storageaccount (#56612) 2019-05-23 10:26:51 +08:00
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
2019-05-23 00:47:44 +02:00
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
2019-05-23 00:46:43 +02:00
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.
2019-05-22 23:34:42 +02:00
Brian Coca
eb9009c4f4 added missing version_added 2019-05-22 17:04:36 -04:00