Commit graph

30343 commits

Author SHA1 Message Date
Ali 4733af3376
Added support for GitHub Enterprise to github_deploy_key module (#59564) 2020-02-16 17:33:06 +00:00
Christian Köberl 569f0cf808
azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729)
* azure_rm_rg_info: fix KeyError: 'ansible_facts'

Fix facts for using old azure_rm_resourcegroup_facts, closes #66727

* fix intendation
2020-02-16 17:03:31 +01:00
Sylvia van Os ff0576802f
Support changing fetch_url settings for Rendeck modules (#66357) 2020-02-16 15:07:36 +01:00
CWollinger 274a07e7c7
Add module ipwcli_dns.py to manage DNS records on Ericsson IPWorks (#67135)
* Create ipwcli_dns.py

* add newline at the end

* Update after review and support AAAA

* Update lib/ansible/modules/net_tools/ipwcli_dns.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* add integration tests and change param user to username

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-02-16 15:05:44 +01:00
Michael Heap a43f76cbf9
Add mas module for installing applications via the Mac App Store (#19768)
* Add `mas` module for installing applications via the Mac App Store

Currently, only the `install` command is available, and you must provide IDs
when installing applications.

* mas module: Update metadata

Brings the metadata in line with the current style.

* mas module: General refactor, support more states

- `check_mode` is now fully supported
- Support for states `absent` and `latest` (using `mas uninstall` and `mas upgrade`)
- Support for a list of apps to manage
- Remove return value as other packaging modules don’t support it either
- Return msg with details on the changes on success
- Code was refactored to be easier to read and maintain

* mas module: Add upgrade_all option

* mas module: Fix linting errors

* mas module: Implement review feedback

Co-authored-by: Lukas Bestle <account-github@lukasbestle.com>
2020-02-15 19:44:20 +00:00
Ronnie P. Thomas 807f4ea658
Don't send JOIN and PART commands if channel is not set (#62334)
Currently, the irc module is sending JOIN and PART commands even if the channel
key is not set in the irc module. This causes the module to send JOIN and PART
commands to the #None channel. This module can send PRIVMSGs to either a
channel or a list of nicks, so sending JOIN and PART doesn't make sense in
cases where channel is undefined. The same goes for the TOPIC command, which is
used to set a topic for channels.

This patch ensures that the JOIN, PART and TOPIC commands are only sent if the
channel is defined.
2020-02-15 12:39:28 -05:00
tottoto cc86748109
Fix url handling in lxd_container and lxd_profile module (#66097)
* Fix url handling in lxd_container module

* Fix url handling in lxd_profile module
2020-02-15 12:39:05 -05:00
koenw eaf879a7a7
Fix uptimerobot stacktrace on decode (#66244)
* Fix uptimerobot stacktrace on decode

`req.read()` always returns bytes whereas the json module expects
strings.

I don't know how this worked before.

* Use `module_utils._text.to_native` instead of decode
2020-02-15 11:10:23 -05:00
Daniel Sternig 11483921f2
Added additional error handling inside the hcloud.py inventory plugin… (#66381)
* Added additional error handling inside the hcloud.py inventory plugin. Otherwise, errors may happen, if the HCloud API is not able to correctly identify the server image.

* Corrected the previous commit to not check for None on variables that are always set. Additionally, used image.description if image.name was not set, instead of the previously added default string.
2020-02-15 11:09:18 -05:00
Pilou 5aa60a5fa7
ovirt: don't ignore instance_cpus parameter (#64366) 2020-02-15 14:57:19 +00:00
Ilija Matoski e1a815381a
Thresholds need to be passed for the log alert type (#64851)
* Thresholds need to be passed for the log alert type

* removed whitespace from linting error
2020-02-15 14:56:16 +00:00
Mads Jensen f978b6c789
Use https for Ansible Slack icon. (#65625) 2020-02-15 14:53:18 +00:00
Emmanuel MICKIEWICZ 8647d0a873
Removing a cron file when the 'name' parameter is specified is now allowed (#57471). Added integration tests to validate new behavior. (#65640)
Also added user input validation to return a clear error when deleting an environment variables without specifying a name.
2020-02-15 14:52:36 +00:00
Phil fe6848badd
sefcontext: fix fatal failure for socket file type (#65690)
fix #65689
2020-02-15 14:51:06 +00:00
Timm Drevensek 9541377a20
Port keycloak to python3 (#66452) 2020-02-15 14:44:18 +00:00
bitchkat 6b017db05b
support rabbitmq 3.8.x in version check (#66855)
* support rabbitmq 3.8.x in version check

* Removed extraneous white space
2020-02-15 14:42:32 +00:00
Felix Fontein b1de5d43fc
openssh_keypair and openssl_privatekey: add regenerate option (#67038)
* Add regenerate option to openssh_keypair and openssl_privatekey.

* Add changelog.
2020-02-15 14:39:36 +00:00
Felix Fontein 55cb8c5388
docker_login: fix permissions for ~/.docker/config.json (#67353)
* Fix permissions for ~/.docker/config.json.

* Add changelog, remove debug output.
2020-02-15 14:38:58 +00:00
Lujeni 25181e1b70
mongodb_user: Ensure to close database connection (closes #59353) (#65665) 2020-02-15 09:10:27 -05:00
Jill R c9b38bd74e
ec2_snapshot and ec2_snapshot_info test suite (#65896)
* ec2_snapshot and ec2_snapshot_info test suite

* Add a fact to make tests easier to follow.
Test all return values, and add missing RETURN docs to module.
2020-02-15 13:21:23 +00:00
Milan Ilic 717b7fee9f
Update redis module to support memory size units (#66975) 2020-02-15 13:15:12 +00:00
Pascal Stauffer 24ce97a49b
open_iscsi: Set default port as string (#67270) 2020-02-15 13:06:16 +00:00
Andrew Klychkov 59bcc9f739
Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog
2020-02-15 13:03:53 +00:00
Tomer Brisker a4f5c2e993
Post reports to newer Foreman API endpoint (#64955)
The `/api/v2/reports` endpoint has been deprecated a long time ago and should
no longer be used. This changes to callback to use the correct API
endpoint and paramerter.
2020-02-15 13:01:27 +00:00
XuLei Ren 435bd91d2e
Add new command ClearSessions (#65600)
* Add ClearSessions command to clear all active sessions.

* Delete trailing whitespaces
2020-02-15 13:00:55 +00:00
Prasad Katti f21ee7f685
cloudformation - use mutually_exclusive for on_create_failure and disable_rollback (#65629)
* cloudformation - use mutually_exclusive for on_create_failure and disable_rollback

* cloudformation - remove unit test test_disable_rollback_and_on_failure_defined
2020-02-15 13:00:36 +00:00
Nick Lopez be1459af0f
use proxy settings for Redfish requests (#65998) 2020-02-15 12:58:27 +00:00
Mark Chappell 9edcda7ef7
Refactor iam_role to bring down the complexity score (#66027)
* Simplify BotoCore- / Client- Error try/except loops where we don't need different behaviour

* Refactor IAM Role manipulation to reduce complexity scores

* Missing permissions

* Add retry decorator by default

* compare_attached_role_policies is dead code, remove it
2020-02-15 12:57:52 +00:00
Markus Fischbacher 98bc53d3cb
zabbix_action - allowing string for esc_period (#66841)
* allowing string for esc_period

* add changelog fragment

* Update zabbix_action.py

* remove now unneeded test
2020-02-15 12:57:02 +00:00
Andrej Svenke f98874e4f9
ec2_asg: max_instance_lifetime and respect wait on replace (#66863)
* ec2_asg: max_instance_lifetime and respect wait on replace

* ec2_asg: max_instance_lifetime integration tests

* ec2_asg: address review comments
2020-02-15 12:56:39 +00:00
Bill Dodd fe2a8cb145
do not loop through chassis in manage_indicator_led() (#66044) 2020-02-15 12:49:18 +00:00
akatch 936bd83614
Fix duplicate log entries (and add item support for failures) (#66098) 2020-02-15 12:48:05 +00:00
ihard ad2428c176
fix hashi_vault lookup generates warning at LDAP authenticate #52131 (#67251) 2020-02-15 12:46:44 +00:00
Mark Chappell c36f03b3e1
Add AWSRetry decorator to ec2_vpc_nacl (#67204)
* Add AWSRetry decorator to ec2_vpc_nacl

* Also add a decorator to ec2_vpc_nacl_info to catch things like API rate limit errors.

* add double-removal integration tests to make sure things don't get too slow

* Fixup retry usage for _info

* Simplify changed logic when modifying a NACL

* tweak error message
2020-02-15 12:42:02 +00:00
René Moser bcd145c111
vultr: Fix retry max delay param ignored (#67437)
* vultr: Fix retry max delay param not taken

* add changelog
2020-02-15 12:40:03 +00:00
Jim Ladd a5af649a73
foreman: ansible_ssh_host should consider ip, ipv4, ipv6 (#67401) 2020-02-15 10:05:08 +00:00
Oliver Kastler 0760a7ec08
Fix for shared snapshot parameter (#60250)
* Fix for shared snapshot parameter

Fixing this bug:
`Unknown parameter in input: "IsShared", must be one of: DBInstanceIdentifier, DBSnapshotIdentifier, SnapshotType, Filters, MaxRecords, Marker, IncludeShared, IncludePublic, DbiResourceId`

* Updated documentation for shared snapshots

Tags can't get accessed for shared snapshots

* fixed indentation

* added test for shared snapshot

* fixed isPublic parameter to correct IncludePublic parameter

Co-authored-by: Oliver Kastler <oliver@realestate.co.nz>
2020-02-14 19:05:40 -07:00
Sam Doran 7ae34cef15
Fix role list regression (#67436)
Add the roles_path parent to the role_parser
object, so paths are passed to the list function

Add basic role list tests to prevent future regressions
2020-02-14 19:51:48 -05:00
Nirav Katarmal 5ea26b6e5a
Added nameAlias field (#67150)
* Added nameAlias field to all the supported ACI modules

* Changed nameAlias to name_alias

* Review changes
2020-02-15 01:50:37 +01:00
Vasili 9b28f1f5d9
Fix incorrect "Could not match supplied host pattern" warning (#66764) (#67432) 2020-02-14 15:50:52 -06:00
Jan Meerkamp 1d370bd189
VMware: vcenter_folder nested folder absent fix (#65283)
- no longer try to create folder which exists.
- correctly remove nested folders with absent.
2020-02-14 16:18:34 -05:00
Abhijeet Kasurde 7000c51c06 VMware: Add support for specify tag and category as dict
User can now specify tag and category using dict in vmware_tag_manager
module. This is useful when tag or category name contains colon.

Fixes: #65765

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-14 16:07:10 -05:00
Osman Ullah 33d5c68887
Add newline in description of win_file.state (#67427) 2020-02-14 15:30:35 -05:00
John McDonough 210e799375
UCS Emulator link to Doc Fragment use cs.co domain (#67434) 2020-02-14 15:20:17 -05:00
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* Add validate_collection_path function (#66441)

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
2020-02-14 14:00:00 -06:00
Gonéri Le Bouder 68620ced7f
vmware_host_firewall_manager: avoid ansible.netcommon dep (#67386)
We use `ansible.module_utils.compat.ipaddress()` just for trivial IP
validations that are not critical. This module will be ship in the
`ansible.netcommon` collection. If we continue this way, it means
the futur `community.vmware` will carry this extra dependency for
limited benefit.

This commit introduce a new `is_ipaddress()` that provide similar
feature.
2020-02-14 22:05:29 +05:30
Saúl Alonso 3fce39d610
Update azure_rm_aks.py (#66900) 2020-02-14 11:19:44 -05:00
Joost De Cock b763d79b75
Updated description of examples to avoid confusion (#67192) 2020-02-14 11:16:29 -05:00
Pradeep Gorthi 0680a91418
Updating broken link for UCS module (#67396) 2020-02-14 11:15:20 -05:00
Pradeep Gorthi 69e31a440c
Updating UCS Platform Emulator Link (#67400) 2020-02-14 11:13:00 -05:00