Commit graph

407 commits

Author SHA1 Message Date
Sloane Hertel
a3e8917b73 [s3_bucket] Handle error paginating object versions when bucket does not exist (#49396) 2018-12-04 15:42:14 -05:00
Toshio Kuratomi
a8fbfe1844 Warn if empty string is present in synchronize's rsync_opts 2018-12-04 12:05:45 -08:00
Sam Doran
6200d32c0d Use IndexError in exception (#49488) 2018-12-04 14:12:00 -05:00
Sam Doran
40a5f7bfdf Add better error when k=v syntax is used with YAML in tasks (#41754)
* Add error message for k=v and YAML in a single task

Find the correct line, column, and position for k=v errors since they are different than the position reported initially.

Document bug in quoting syntax check.

* Change tense or error message

Since the error still exists, switch to present tense rather than past tense.

* Remove double spaces after periods in error messages.

http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html

* Add changelog fragment

* Add tests for new error message

* Fix tests

* Add clarifying comments to unit test
2018-12-04 12:32:02 -05:00
Richard Levenberg
5cb39d0d57 Use System.Xml.XmlDocument.Load rather than Get-Content to avoid (#49206)
encoding errors when writing out XML

removing executable bit

refactor tests to handle sanity checking
2018-12-04 15:19:38 +00:00
Jon Bergli Heier
9c02ade536 rabbitmq_binding: Add support for state=absent (#48599)
* rabbitmq_binding: Add support for state=absent

* Add integration tests for rabbitmq_binding

* Update testcases

* Add changelog fragment
2018-12-04 12:42:18 +00:00
Abhijeet Kasurde
1b04571ea0
VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-04 10:11:29 +05:30
sdirbach
e2f85b3f6c Implement test case prefix to filter test cases (#40174)
* Implement test case prefix to filter test cases

* Cut line to not exceed 160 chars

* Replace tabs with spaces

* Add version_added field

* Include changelog file
2018-12-03 18:41:44 +00:00
Akshay Gaikwad
597e449afe Support for pids_limit parameter in docker_container module (#49319)
* Support for pids_limit parameter in docker_container module

This add pids_limit parameter support in docker_container module

Fixes #43337

Signed-off-by: Akshay <akshay@localhost.localdomain>

* Add changelog for pids_limit parameter

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Remove unnecessary lines of code

The map is needed if the names are different.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Update pids_limit option tests

It also run for docker-py < 1.10.0

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2018-12-03 11:22:43 +00:00
sdirbach
840ab706ee Implement hide task arguments feature (#40176)
* Implement hide task arguments feature

* Add version_added field

* Include changelog file
2018-12-03 09:22:51 +00:00
Felix Fontein
b0c7efcc6b ACME: add diff to acme_account, account_public_key to acme_account_facts, and general refactoring (#49410)
* Only one exit point.

* Refactoring account handling.

* Add diff support for acme_account.

* Insert public_account_key into acme_account_facts result and into acme_account diff.

* Add changelog.
2018-12-02 18:40:14 +01:00
Brian Coca
fc71cde7d3
Yaml inventory more tolerant (#48883)
* make yaml inv more tolerant to comments
* add tests for bad inventory processing

fixes #47254
2018-11-30 22:04:39 -05:00
Filippo125
238786c0d3 zabbix inventory: options to read per each host and set ansible_ssh_host (#44107) 2018-12-01 01:49:57 +01:00
Brian Coca
8c43ce491e unsafe cleanup 2018-11-30 13:07:00 -08:00
Adam Miller
378cc9668c dnf module load/init dnf pkg mgr plugins properly (#49278)
* dnf module load/init dnf pkg mgr plugins properly

Fixes #45940

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-11-30 10:00:33 -08:00
Martin Krizek
c78c8d389f
Last loaded handler with the same name wins (#49249)
* Last loaded handler with the same name wins

* Add comment explaining reversed
2018-11-30 16:30:27 +01:00
Martin Surovcak
87a9ada188 fix module argument to be boolean (#47134) 2018-11-30 10:43:29 +00:00
Lex Rivera
aa484c0835 Fix GCE and scaleway VM detection (#47193)
* Fix Google cloud engine & Scaleway VM detection
2018-11-30 10:38:43 +00:00
Matt Martz
77befcf5d7
Do not allow addressing an import from handlers via notify. Fixes #48936 (#49317) 2018-11-29 13:50:07 -06:00
Dusan Matejka
a9aa1053a8 zabbix_template: fixed idempotency issues (#49188) 2018-11-29 20:38:32 +01:00
Ryan Brown
af6427bf40 VPC peer module unhandled exception on bad peering ID (#45306)
* Improve error handling for VPC peer module when a bad peering-id is specified

* changelog
2018-11-29 08:54:16 -05:00
Ryan Brown
7f7c059a04 ec2_asg: Retry Autoscaling Group delete calls when scaling activity is in progress (#46124)
* Retry delete calls when scaling activity is in progress

* changelog
2018-11-29 08:42:55 -05:00
Felix Fontein
b842b1b97e ACME: improve error handling (#49266)
* Improve error handling: when parse_json_result is False, still return the error message.

* Remove content body from info dict.

* Add changelog.
2018-11-29 09:00:39 +01:00
Adam Miller
81540bd754 require git when trying to use it in ansible-galaxy cli (#49212)
* require git when trying to use it in ansible-galaxy cli

Previously we weren't setting `required=True` when calling
`get_bin_path` and the path would return `None`, this would cause
a traceback when attempting to ' '.join() to create a string
representation of the failed command for error output

Fixes #49200

Signed-off-by: Adam Miller <admiller@redhat.com>

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-11-28 13:28:21 -05:00
Brian Coca
ae2467ddbc Merge pull request #49080 from bcoca/better_invp_skip
more precise pluing skip msg and now in higher verbosity level
2018-11-27 15:30:14 -08:00
Martin Krizek
d4568d97d4 Fix using vault encrypted data with jinja2_native (#49025)
Fixes #48950
2018-11-27 16:44:22 -05:00
Martin Krizek
abdf46803b
Warn about falling back to jinja2_native=false (#49063) 2018-11-27 18:11:42 +01:00
Matt Davis
8c1f701e6e
split PS wrapper and payload (CVE-2018-16859) (#49142)
* prevent scriptblock logging from logging payload contents
* added tests to verify no payload contents in PS Operational event log
* fix script action to send split-aware wrapper
* fix CLIXML error parser (return to -EncodedCommand exposed problems with it)
2018-11-26 15:28:21 -08:00
Brian Coca
89b7e10436 updated var docs (#48957)
* updates var docs, fixes #48949

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
2018-11-26 16:08:39 -06:00
Martin Krizek
48ffd8789f
Properly handle FieldAttribute.default if callable (#48992)
* Properly handle FieldAttribute.default if callable

Fixes #48673

* Add changelog...

* Add integration test

* Add aliases file
2018-11-26 18:14:46 +01:00
Felix Fontein
9caaf7b109 docker_container: fix init option idempotency with old docker-py versions (#49078)
* Don't check options for idempotency which are not supported.

This check should be superfluous if every option would adhere to
the convention that options not specified should have value None.
Unfortunately, some options (such as init) which correspond to
container properties have an explicit default set.
2018-11-26 13:53:01 +00:00
Will Thames
31ccb3c29d Diff mode returns yaml diffs in yaml callback plugin (#48794)
* Diff mode returns yaml diffs in yaml callback plugin

* Add changelog for yaml diff mode
2018-11-22 18:03:25 +00:00
Will Thames
960ebd981f k8s append_hash (#48830)
* Add append_hash functionality to k8s module

append_hash adds a hash based on the contents of a ConfigMap
or Secret to the name - this enables immutable ConfigMaps and
Secrets.

* Provide k8s_config_resource_name plugin

The k8s_config_resource_name filter plugin provides a means of determining
the name of ConfigMaps and Secrets created with append_hash

* Add changelog fragment

* fix failing tests

* Update openshift version needed for append_hash
2018-11-22 08:14:43 +00:00
Jordan Borean
a568bbed3c
win_mapped_drive - refactor module and docs (#48642)
* win_mapped_drive - refactor module and docs

* Updated code to work with become and split tokens

* use win_credential_manager instead of cmdkey

* updated credential manager module name

* harden the system token impersonation process
2018-11-22 08:12:41 +10:00
Rémy Léone
959395f4b4 Fix getheaders regression with open_url in Scaleway dynamic inventory (#48671)
* Fix regression

* Improve changelog fragment
2018-11-21 09:06:21 -06:00
Matt Martz
9773a1f289
Add a Singleton metaclass, use it with Display (#48935)
* Add a Singleton class, use it with Display

* update six import

* Move remaining failes to display singleton

* Fix rebase issues

* Singleton improvements

* Add code-smell for 'from __main__ import display'. ci_complete

* s/self/cls/g

* Add docs for no-main-display

* Address linting issues

* Add changelog fragment. ci_complete

* Implement reentrant lock for class instantiation in Singleton

* Add Display singleton porting guide
2018-11-20 17:06:51 -06:00
Matt Martz
64bb54dab4 Catch per loop label templating exceptions. Fixes #48879 (#48896) 2018-11-20 15:29:44 -05:00
Michael Rose
0886c20d19 influxdb_user - Allows updates to user privileges (#46667)
* influxdb_user - Allows updates to user privileges

* influxdb_user - Updated documentation for admin roles
2018-11-20 20:08:39 +01:00
Jordan Borean
9b0dd5224b
win_security_policy - add warning when using this module ot edit rights (#48850) 2018-11-20 09:21:28 +10:00
Brian Coca
68301f890a fix cache 'update' method to be 'mapping' compatible
- also simplify the update functions
 - fix methods and allwow backwards compat with plugins overriding 'update'
2018-11-19 14:18:18 -05:00
Adam Miller
4a06e95671 dnf to support modularity module appstream specs
Fixes #48743

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-11-19 10:13:07 -08:00
Brian Coca
652da82558 fix bug in config mgr
- use function that creates config slots as needed
2018-11-19 11:46:17 -05:00
Brian Coca
87e44a7ed1
better handling of bad type in config (#48821)
* better handling of bad type in config

 fixes #22468, fixes #22476
2018-11-19 11:45:45 -05:00
Felix Fontein
891687284f docker_* modules: improve diff (#48546)
* Add difference tracking tool

* Improve --diff mode for docker_container.

* Improve diffs of sets by ordering the sets.

* Rewrite imports, get rid of HAS_DOCKER_PY_x variables and use docker_version instead.

* Rename container -> active (more generic).

* Add --diff for docker_volume. Change old diff output.

* Add --diff for docker_network. Change old diff output.

* Add --diff for docker_swarm_service.

* Add changelog.

* Add entry for porting guide on docker_network and docker_volume.
2018-11-19 09:59:54 +00:00
jhawkesworth
361acd3547 win_say: Port to use CSharpUtil AnsibleBasic (#48361)
* port win-say to use CSharpUtil AnsibleBasic and add warning when requested voice not found

* win_say: fixes following code review: use C# style properties consistently; prefix changelog fragments

* fix invalid yaml in change log fragment

* win_say: fixes following code review: use generic module parameter validation where possible

* remove redundant setting of Result.changed to false, simplified some logic for readability.

* fix serialisation issue when message text is drawn from a file; allows tests to be run not in check mode and fix up some test descriptions
2018-11-19 07:07:12 +10:00
Will Thames
aaf29c785f Provide Kubernetes resource validation to k8s module (#43352)
* Provide Kubernetes resource validation to k8s module

Use kubernetes-validate to validate Kubernetes resource
definitions against the published schema

* Additional tests for kubernetes-validate

* Improve k8s error messages on exceptions

Parse the response body for the message rather than returning
a JSON blob

If we've validated and there are warnings, return those too - they
can be more helpful

```
"msg": "Failed to patch object: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},
       \"status\":\"Failure\",\"message\":\"[pos 334]: json: decNum: got first char 'h'\",\"code\":500}\n",
```
vs
```
"msg": "Failed to patch object: [pos 334]: json: decNum: got first char 'h'\nresource
        validation error at spec.replicas: 'hello' is not of type u'integer'",
```

* Update versions used

In particular openshift/origin:3.9.0

* Add changelog for k8s validate change
2018-11-16 12:44:59 +00:00
Xaroth
87d10b9b78 Include dependency role names in role_names. (#46483)
* -Change: Include dependency role names in `role_names`.
-Add: `play_role_names` magic variable to include only explicitly named roles (formerly `role_names`).
-Add: `dependent_role_names` magic variable to include all dependency names for all roles.

* -Change: use the ansible_ prefix for new magic variables.
-Change: keep `role_names` as a deprecated variable, using the old functionality.

* -Add: changelog fragment for the role_names rework.

* -Add: Tests for the role_names (and ansible_*role_names) special variables

* -Fix: resolve erroneous documentation snippet that was introduced after rebasing.

* -Fix: explicitly sort to ensure list comparison works in test.
2018-11-15 10:01:29 -05:00
René Moser
c7c3ca1c41 cs_template: fix KeyError on state=extracted (#48675)
* cs_template: fix KeyError on state=extracted

* add changelog
2018-11-15 13:38:42 +00:00
Martin Krizek
907ff2f26c Add new meta task end_host (#47194)
* Add new meta task  end_host
2018-11-14 09:46:25 -05:00
Brian Coca
24593f2ffb avoid spurious warnigns on unique filter
fixes #46189
2018-11-14 09:33:43 -05:00