Commit graph

29146 commits

Author SHA1 Message Date
Felix Fontein
62c0cae29a
docker_container: fix idempotency for network IP addresses (#62928)
* Specifying IP addresses needs API version 1.22 or newer.

* Simplify code.

* Use IPAMConfig.IPv*Address instead of IPAddress and GlobalIPv6Address.

* Add changelog.

* Fix syntax errors.

* Add integration test.

* Don't rely on netaddr.

* Normalize IPv6 addresses before comparison.

* Install netaddr, and use it.
2019-09-30 10:47:02 +02:00
Michael Scherer
75c4e9ec05 Fix _validate_csr_subject and _validate_csr_signature (#62790)
On python 3, if there is no explicit "return True", the
function call will be seen as "False", thus failling the module
2019-09-29 16:17:38 +02:00
Felix Fontein
fd627e3b78
docker_container: document some of the unexpected behaviors. (#62325) 2019-09-29 14:52:47 +02:00
Andreas Olsson
75dfe6c88a nsupdate: Use authoritative server for zone lookup (#62329)
Using a regular recursive resolver to lookup the zone name might not
work when the zone in question belong to a private/internal
domain. The authoritative server being used on the other hand will
definitely know about the zone(s) it's serving.

This approach is also consistent with the nsupdate module already
querying the specified authoritative server for TTL values.

The reason for the implementation having to loop until finding a
direct match is to account for different SOA responses triggered by
CNAMEs and DNAMEs. The previously used `dns.resolver.zone_for_name()`
function does the same.

Resolves #62052
2019-09-28 19:34:28 +02:00
psharkey
ee91714eb2 New module: Add module to collect Amazon AWS IAM user info (cloud/amazon/iam_user_info) (#23382)
* AWS: new module iam_user_info

Signed-off-by: psharkey <psharkey@cleo.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

Rename from iam_user_facts to iam_user_info.

Rename and target 2.10.

Fixing docs.

* Adding iam_user_info integration test.

Removing unnecessary tasks.

Fixing yamllint failure test/integration/targets/iam_user_info/defaults/main.yml:5:1: empty-lines: too many blank lines (1 > 0).

* name paramter is optional

* Switch to use AnsibleAWSModule.

* Convert to using fail_json_aws

* Rework asserts to inspect ARN.

* Move integration tests from iam_user_info to iam_user.

* Fix pep8 problems.

* ec2_argument_spec not needed with AnsibleAWSModule.

* Switch to use helper in AnsibleAWSModule.

* Add iam_user_info to the aws group.

* Add support for pagination and backoff.

* Check improper parameter usage first.

* Adding test cases for multiple users.

* Rmoving unneeded line.

* Remove unneeded imports.

* Switch to catch BotoCoreError.

* Adding tests for exception coverage.

* Compare user info directly with values from created user.
2019-09-28 22:00:59 +10:00
bverschueren
c3eceb3a0d support creating an image from a volume (#59574)
* support creating an image from a volume

* leave filename/volume optional

* enforce volume/filename mutual exclusivity

* bump version_added to 2.10 for volume option

* add changelog fragment
2019-09-27 14:29:34 +02:00
Nathaniel Case
8b9c2533b5
Remove check_args from nxos (#62625)
* Remove check_args from nxos

* Clean up check_args from nxos
2019-09-26 15:02:09 -04:00
Nathaniel Case
89abfcdb18
Remove check_args from eos & ios (#62623)
* Remove check_args from eos & ios

* Clean up check_args from eos & ios

* Missed ios_vrf
2019-09-26 15:01:53 -04:00
Pablo Escobar Lopez
de515522b6 allow option docker_storage_driver=overlay2 (#62874) 2019-09-26 11:34:49 -04:00
Sam Doran
2375fd0990 find - clarify description of 'contains' (#62445) 2019-09-26 11:33:14 -04:00
Nicholas Amorim
d4064a965b Improved docs on docker_swarm_service (#62712)
* Improved docs on docker_swarm_service

Co-Authored-By: Piotr Wojciechowski <23406016+WojciechowskiPiotr@users.noreply.github.com>

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-09-26 11:30:59 -04:00
JonnyG365
798c5a55fa Update win_dsc.py (#62863) 2019-09-26 10:38:14 -04:00
leManu
f8fcf7fcbb facts: detect FreeBSD jails guest (#62857)
* facts: detect FreeBSD jails

* PEP8 fix
2019-09-26 10:08:33 -04:00
John F Leach
992b81e8fc Added suffix note to process_name_exact parameter (#62849)
##### SUMMARY
<!--- Your description here -->


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2019-09-25 22:49:41 +01:00
Bill Dinger
cae4255a16 Fix broken link to powershell resources (#62845)
##### SUMMARY
The previous link (https://docs.microsoft.com/en-us/powershell/dsc/builtinresource ) is a 404 . MS has a new link https://docs.microsoft.com/en-us/powershell/dsc/resources/resources  with the same content

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2019-09-25 21:19:11 +01:00
Dag Wieers
2995ae4ffd
Fix MSO examples (#62835)
Fix reported issues with the examples.
2019-09-25 18:29:36 +02:00
Varun Chopra
7dfd994a7e win_partition - Fix handling of maximum partition size (#58225)
* Fix handling of maximum partition size

* Added changelog fragment
2019-09-25 11:51:26 -04:00
Varun Chopra
3b409f2f50 win_format - Add allocation_unit_size (#56966)
* Fix allocation_unit_size

* Some final changes and added tests

* Cleanup...

* Fixes issues on 2012/R2

* Update tests for 2012/R2

* Suggested changes
2019-09-25 08:58:30 -04:00
Jordan Borean
322e225830
Fix issue when setting an empty pass to no_log param (#62804)
* Fix issue when setting an empty pass to no_log param

* Fix typo
2019-09-24 21:45:53 -04:00
Simon Dodsley
8a4c8ae20a Add checks for Cloud Block Store (#62068) 2019-09-24 15:11:15 -04:00
Majeed Mirza
28d30a04aa SoftLayer: Added flavor option (#56036)
* Added flavor option

Added flavor option to allow for use of SoftLayer flavor templates when creating new virtual machines.

See here for examples of ordering a vm with the flavor parameter:
https://softlayer-python.readthedocs.io/en/latest/api/managers/vs.html

To see flavor options use:
`slcli vs create-options`

* Update sl_vm.py

* Update sl_vm.py

* fixed version
2019-09-24 11:18:49 -04:00
sky-joker
3299f29f7c update example document for zabbix_action module (#62667) 2019-09-24 11:15:33 -04:00
Felix Fontein
1520eba0a7 package_facts: improve return value documentation (#62725)
* Improve documentation for package_facts.

* Add sample return value.
2019-09-24 11:14:49 -04:00
Martin Nečas
3b2b418aad ovirt_host update force doc (#62491)
* ovirt_host update force doc

* update doc message
2019-09-24 11:06:49 -04:00
Olli Helenius
190b8fcd1c hcloud_volume: clarify volume size units (#62771) 2019-09-24 10:52:14 -04:00
Dag Wieers
7fa1e4f70f Fix sanity checks (#62782)
This PR fixes all new ACI sanity issues.
2019-09-24 09:00:00 -04:00
Jordan Borean
d4ec9422a3
Add proper error when trying to run on older PS versions (#62634) 2019-09-24 08:43:14 -04:00
Xu Yuandong
7711524718 ce_sflow: update to fix bugs. (#59349)
* update to fix bugs.

* remove params which is not supported.

* update to remove some .

* update to remove some redundant code.

* update for missing import.

* Update ce_sflow.py

* Update ce_sflow.py

* Update ce_sflow.py

* Update ce_sflow.py

* Update ce_sflow.py

* Update ce_sflow.py
2019-09-24 05:49:42 -04:00
Pilou
278398555d package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) 2019-09-24 10:03:56 +02:00
Dag Wieers
7d344d00ef
Fix whitespace issue in filter (#62768)
This fixes a reported issue.
2019-09-24 02:05:13 +02:00
David
a2846613b8 Apcon modules (#62028)
* Add APCON modules

* Fix cli regex

* revise for passing sanity tests

* Add unit test for apcon_command module
Remove apconos_config.py apconos_update.py apconos_cert.py for now

* Fix for santiy test

* test

* Ignore action-plugin-docs test

* Add apcon_command module

* conflict solved

* merge

* Fix for sanity test

* Revise integration test

* Mark integration test unstable

* Remove integration test temprorily

* 1. Ignored privilege escalation;
2. Ignored get_configure command;
3. Removed doc_fragments;
2019-09-23 16:42:17 -04:00
Felix Fontein
fbf182c369
Improve type documentation. (#62178) 2019-09-23 16:26:13 +02:00
Akira Yokochi
03b4d8f2a7 fixes option names in examples (#62706) 2019-09-23 09:19:38 -04:00
Xu Yuandong
d6ef7c8530 module_utils-network-cloudengine: fix get_nc_next. (#62587)
* fix get_nc_next.

* add a changelog fragment.

* upadte for  changelgo fragment.

* merge two prs, one depens another.

* merge two prs, one depens another.

* update changelog.
2019-09-23 15:13:42 +02:00
Ganesh Nalawade
bd8097ea91
Fix ios terminal regex for privilege escalation (#62479)
Fixes https://github.com/ansible/ansible/issues/61726

*  On some ios versions the passwrod prompt for enable
   command differs. Modify the regex to work with multiple
   password prompt patterns
   1) password:
   2) Password:
   3) Local_Password:
   4) Enter Local Password:
2019-09-23 15:14:47 +05:30
Andreas Olsson
cb76be17d6 cloudflare_dns: Stick do RFC 2606 example domains (#62718)
It's not nice to use other people's domains in your examples.
2019-09-23 10:20:03 +02:00
Andreas Olsson
fc6a37fe54 cloudflare_dns: Rename account_api_token parameter (#62707)
Name change triggered by the new parameter _api_token_ (8cabf1c) being
a bit too similar to the old name _account_api_token_. At the same
time _account_api_key_ is actually a better name for the original
parameter, in it mapping closer to the terminology used by Cloudflare.

Keeping _account_api_token_ as an alias for backward compatibility.
2019-09-21 23:03:23 +02:00
Konstantin Alekseev
8cabf1c1d8 Support cloudflare API Tokens. (#62043)
API Tokens provide a new way to authenticate with the Cloudflare API.
They allow for scoped and permissioned access to resources.
2019-09-21 16:55:53 +02:00
Felix Fontein
c6dcf78f53 ACME modules: make compatible to Buypass ACME v1 CA, and fix bug in ACME v1 account update (#61693) 2019-09-21 16:53:15 +02:00
Felix Fontein
2e5137078d
docker_login: fix Python 3 problem in #60381 (#62621)
* Fix Python 3 problem: run_command() returns native strings, not byte strings.

* Add changelog.
2019-09-21 15:13:31 +02:00
Felix Fontein
a7b239708e acme_* modules: deprecate acme_version default, announce that ACME v1 support will be deprecated eventually (#61667) 2019-09-21 15:01:29 +02:00
Mark Chappell
40660e7f6e iam_role : support managing max session duration and deleting the instance profile it creates (#62014)
* iam_role: Add support for managing MaxSessionDuration

* iam_role: Add support for deleting the IAM Instance Profiles we created

* iam_role: migrate all boto failures to fail_json_aws for consistency

* iam_role: test validity of path so we can throw a more understandable error

* iam_role: (integration tests) Split iam_role integration tests from sts_assume_role tests

- Make the iam_role tests more comprehensive
- Add tests for iam_role_info

* iam_role: (integration tests) Make some of our pauses optional

If the tests appear to be flakey we may need to enable standard_pauses
2019-09-20 13:26:29 -07:00
Sam Doran
987265a6ef
Account for empty strings when splitting the host pattern (#62442)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
2019-09-20 16:03:51 -04:00
Evgeni Golov
8d0c193b25 allow before/after diff to be NoneType (#62582)
when creating or deleting an object (e.g. via an API), before/after can
be `None` (or at least represented as such by the used library). to
avoid modules havig to do

    diff={'before': before or '', 'after': after or ''}

let's just convert `None` to an empty string that can be diffed properly
2019-09-20 15:47:18 -04:00
Will Thames
bb0fa0a622 k8s: apply no longer the default behaviour (#62632)
There are too many lingering uncertainties about the correctness of
apply behaviour. All tests seem to suggest it works, and it's definitely
performed well in real world application, but it may be a breaking
and unexpected change to default to apply

We will let apply bed in during 2.9 and allow people to opt in, we
may default to it in future (or not)
2019-09-20 08:22:42 -07:00
Major Hayden
cced1a3cd1 ec2_vpc_subnet: Rename resource_tags > tags (#62663)
Most of the AWS module documentation refers to `tags` and not
`resource_tags`. This patch updates the documentation to match
other AWS module documentation. 😉

Signed-off-by: Major Hayden <major@redhat.com>
2019-09-20 15:36:11 +01:00
Sandra McCann
170b4e63ff fixed options (#62605) 2019-09-20 09:08:47 -05:00
chashtag
7cfcf18a8c Update ovirt_vm.py (#62425)
* Update ovirt_vm.py
2019-09-20 09:40:14 -04:00
Mario Lenz
0c66e7ef10 VMware: Remove mentions of enable_vsan from vmware_cluster_ha example (#62616)
* VMware: Remove mentions of enable_vsan from vmware_cluster_ha example
* Add changelog fragment
2019-09-20 12:03:20 +05:30
Will Medlar
6541bb0315 pids: Search for process name matches in the cmdline (#59318)
* Also search for process name matches in the cmdline
* Return integer pids
* Use correct variable name
* Fix linter concerns
2019-09-20 12:00:25 +05:30