Commit graph

17445 commits

Author SHA1 Message Date
Pierre-Louis Bonicoli
b556def4d3 Update DOCUMENTATION metadata 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
ac05645bce Remove commented statements 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
f761fc1d1f rhn_channel: fix py3 compatibility (use six)
and remove unused import
2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
5f62a973da docker_secret: fix broken import 2017-08-12 10:16:05 -07:00
Pilou
feff6abd72 os_client_config: fix broken import (#26839)
* os_client_config: fix broken import
* remove wildcards and add boilerplate
2017-08-12 10:07:49 -07:00
Nick Ward
f52a022022 Python3 compatability for elb_application_lb and elb_target_group 2017-08-12 09:01:29 -07:00
Toshio Kuratomi
9a7e23569e Fix wildcard imports, remove get_exception, add boilerplate
Amazon modules that don't have open PRs against them
2017-08-12 07:43:46 -07:00
Toshio Kuratomi
7cd81b802d Fix wildcard imports, remove get_exception, add boilerplate
Fixed for monitoring modules
2017-08-12 03:13:53 -07:00
Sloane Hertel
aca1950150 iam certificate facts (duplicate): add iam_cert_facts as alias for iam_server_certificate_facts (#25387)
* add iam_cert_facts as alias for iam_server_certificate_facts
* remove from legacy files
2017-08-12 01:44:39 -07:00
Artem Zinenko
6058cb736d rabbitmq_plugin for Windows (#28017)
* Fixes #28016: rabbitmq_plugin for Windows

* Disable documentation check for rabbitmq_plugin.ps1

* Renamed rabbitmq_plugin -> win_rabbitmq_plugin

* Fixed the documentation after review

* Fixed 'RETURN' section

* Fixed docs for original module

* Added dots to original module docs.
2017-08-12 10:35:16 +02:00
Toshio Kuratomi
ac56a2f138 Remove wildcard imports and get_exception calls
Fixed module_utils
2017-08-12 00:48:53 -07:00
T. Miller
93e1caccb7 ini_file: Match tabs before options (#28102) 2017-08-12 09:17:25 +02:00
Peter Sprygada
5ee7862793 update telnet module (#28100)
* accepts list of prompts to expect
* updates doc strings
2017-08-11 23:50:01 -04:00
Brian Coca
40d29936a4 telnet action plugin (#27983)
* draft telnet action plugin

docs in module

* updated per feedback

* fixed imports

* pep8 fixes

* added meta import even though its useless
2017-08-11 22:46:26 -04:00
Toshio Kuratomi
039383d90f Fix symbolic mode usage in unarchive with zip files
Fixes #21090
2017-08-11 19:01:41 -07:00
Toshio Kuratomi
a3132e5dd6 Optimize template (#28044)
* Optimize template

* In fixing template to handle diff correctly #24477, I introduced more
  round trips to the remote end which slowed things down  The new code now
  uses one fewer round trips than the old code.
* Reimplement a large part of template by calling the copy action plugin
  instead of doing it in template's code.  This reduces the code in
  template and gives us one place to fix bugs and optimize.
* Add a follow parameter to template that mirrors the follow parameters
  for file and copy.
* Fix copy's diff handling (probably broken in my rewrite for in 2.4
  development)
* Adjusted when copy creates tmp dirs to rduce round trips in copy and
  template.

Fixes #27956
2017-08-11 17:50:49 -07:00
Jacob McGill
8b92369678 Update aci_tenant to support check_mode (#28090) 2017-08-11 18:51:49 -04:00
Jacob McGill
c04349088e update aci module util with methods to support check_mode and idempotency (#28089) 2017-08-12 00:27:29 +02:00
Jason Lingohr
3d29f79e74 Documentation fixes. (#28047)
* Documentation fixes.

* Update win_route.py
2017-08-11 23:41:58 +02:00
chriskarel
991918e9d2 Fix idempotency for Unix permissions in zip files. (#24580)
* Fix idempotency for Unix permissions in zip files.

This fix prevents the unarchive module from reporting 'changed' when a zipfile contains items with Unix permissions that differ from the system default.

* Update zip unarchive tests.

Additional tests for the unarchive module with zip files:
- Test file in zip archive with non-default permissions
- Test file added to zip archive with Windows permissions

* Additional fix for mixed win/unix archives.

  Turns out my original fix fails under some mixed archives, as setting the umask to zero can be applied to those files.  This creates a per-file umask variable, so a mix of permission types don't cause problems.

* CI Checks

CI checks for archives with:
* non default Unix permissions
* Windows permissions


* Workaround for BSD differences.

Using Zipinfo due to lack of support in BSD unzip.
Permissions handling is also different in BSD -- always applies UMASK to file permissions.

* Added checks for creating directories and SSH keys for existing users.
2017-08-11 12:36:46 -07:00
Sloane Hertel
3cb1c38ecc [cloud] Allow S3 module to correctly delete objects by groups of <= 1000 (#28068) 2017-08-11 15:30:50 -04:00
Brian Coca
d89dd75769 validate include_role args (#28077)
* validate include_role args

* nicer error msg

* removed unused static

* updated as per feedback

* pepe ATE
2017-08-11 15:21:12 -04:00
Jacob McGill
21dbde0abe fix issue with trailing white space when logging into asa (#28073) 2017-08-11 12:30:57 -04:00
Trishna Guha
aef4e3d8fa fix nxos_snapshot (#27993)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-11 12:16:37 -04:00
Peter Sprygada
17a259a163 fixes command to be sent over nxapi for nxos_file_copy (#28029)
fixes #27347
2017-08-11 12:14:52 -04:00
Patrick Ogenstad
089226e372 Fixes for broken asa_config module (#27218)
* Fixes for broken asa_config module

* strip() prompt before checking
2017-08-11 11:42:42 -04:00
Sloane Hertel
40eb349ac6 [cloud] Make ec2_asg more resilient using AWSRetry around boto3 calls (#27598)
* Add AWSRetry to ec2_asg

* Paginate describing ASGs and launch configurations

pass connection to delete_asg

Fix a couple little bugs

* Use boto3's pagination build_full_result()
2017-08-11 11:30:23 -04:00
Thomas Stringer
e4cd899363 Add support for Azure 2.0.0 (#27920)
* Adapt azure_rm_resource_group to azure 2.0.0 + azure Cli support

* Fix exceptions in Azure ARM plugins

* update azure_rm_networkinterface documention to reflect required params

* change state param to not required for docs in azure_rm_subnet

* fix import to reflect azure==2.0.0 changes

* add aliases and fix docs for azure_rm_storageblob

* add resource_group_name alias to azure_rm_storageaccount_facts

* fix import bug due to change in azure==2.0.0

* fix args bug and enum modules issue

* update docs to reflect azure==2.0.0

* pin management clients to a specific api_version

* update docs to reflect the new azure-ansible-base python package

* add fallback for older api resource group listing

* rework azure dependencies installation

* refactor path joining to a cross-plat solution
2017-08-11 08:22:02 -07:00
Michael Price
1b9d9376e2 Refactor E-Series Hosts module to use module_utils (#20893)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
2017-08-11 11:05:52 -04:00
Brandon Schlueter
0e334ca821 Don't compare group_vars paths with bytestrings (#27922)
* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
2017-08-11 10:21:20 -04:00
Nathaniel Case
0464a21a85 Fix nxos_snmp_contact, others (#28000)
* Fix nxos_snmp_contact

Fixes #27714

* Fix nxos_snmp_community

Fixes #27711

* Fix nxos_install_os

Fixes #27604

* Update nxos_ntp_auth

Fixes #27521

* Fix nxos_igmp_snooping

Fixes #27501
2017-08-11 10:12:43 -04:00
Sloane Hertel
1de91a9aa0 [cloud] Convert s3 module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
2017-08-11 09:34:33 -04:00
Michele Zuccala
7d1308b0d8 [cloud] ovirt: add headers param to auth (#27881)
* Add filter param to ovirt module auth

* Update docs to include new filter param

* Fix broken YAML

* Replace filter param with headers
2017-08-11 09:31:20 -04:00
giovannisciortino
49209bfcc5 blockinfile: add --diff support in check mode (#27997) 2017-08-11 07:58:45 +02:00
Rich Murphey
88ccaf106b use of multiple chocolatey package names (#28046)
* use of multiple chocolatey package names

It might be helpful to users, to clarify whether/when <name:> must specify a single package.

Users who are familiar with chocolatey may be accustomed to installing multiple packages in a single invocation of 'choco install'.

I believe win_chocolatey currently accepts multiple package names when state: is latest or present.
For instance, this appears to work currently:

  - win_chocolatey:
      name: >-
        pscx
        windirstat
      state: latest

However, when state: is absent, uninstall is not performed if multiple package are specified.
The chocolate.log output suggests that chocolatey is treating the multiple packages as an 'exact' name of a single package name:
2017-08-10 19:04:04,087 2424 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" list --local-only --exact pscx windirstat
2017-08-10 19:04:04,087 2424 [DEBUG] - Received arguments: list --local-only --exact pscx windirstat

I find the current behavior helpful in terms of accepting multiple package names, even if uninstall must be treated differently.
It might be helpful to show an example of how multiple uninstalls can be handled by looping over them. 

  - win_chocolatey:
      name: "{{ item }}"
      state: absent
    with_items:
      - pscx
      - windirstat

* revise per Jordan Borean. remote colon (:) from text. revise formating.

* Update win_chocolatey.py
2017-08-11 12:36:14 +10:00
Nathan Hyde
241d38077f Use ChocolateyInstall env variable after installation (#27812)
* Use ChocolateyInstall env variable after installation

Fixes #19725 Custom install locations specified by the ChocolateyInstall
env variable in win_chocolatey

After an initial install of chocolatey, use the ChocolateyInstall
environment variable when assigning $script:executable .

* Improve process of locating "choco.exe" post-initial install

Implement feedback for locating choco:

* Check if choco.exe is in PATH, if there use this
* If not in path and ChocolateyInstall var is available, use that
* Otherwise, use the equivalent of Windows Special Folder CommonApplicationData for locating chocolatey.
  (Chocolatey install (v0.10.7) uses CommonApplicationData when ChocolateyInstall is not set.)
2017-08-11 11:28:13 +10:00
Dave
4cec83471c win_get_url.ps1 - enable TLS1.1/TLS1.2 if they're available but disabled (#26833) 2017-08-11 11:00:34 +10:00
Nick Chandler
22533c0932 New module: Add module or managing Windows Active Directory users (windows/win_domain_user) (#24075)
* Initial win_domain_user module support

* Add return information

* Update return values

* Add try/catch for PS module import

* Improve win_domain_user module

* Fix bad merge

* Fix pep8 failure

* Actually fix pep8 failure

* Update win_domain_user.py to meet standards

* Add check_mode support for win_domain_user

* Updated documentation before merge
2017-08-11 10:23:09 +10:00
Peter Sprygada
edc3507c98 restore the ability to issue commands over junos cli (#28025)
* restore the ability to issue commands over junos cli

* add warn message for invalid arguments

* fix issue when checking if provider transport is set
2017-08-10 17:57:32 -04:00
Jordan Borean
5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
2017-08-11 07:57:07 +10:00
Jordan Borean
44ed891290 win_mapped_drive: new module (#27020)
* win_mapped_drive: new module

* Rebased from upstream and updated copyright text
2017-08-11 07:54:18 +10:00
Jordan Borean
e46adece48 win_user_right: add module with tests (#26276)
* win_user_right: add module with tests

* fixed up name of module in docs

* forgot the test module

* fixed up whitespace

* changes made to win_user_right based on feedback

* moved away from using secedit to Win32 with P/Invoke

* tidied up copyright for documentation
2017-08-11 07:52:07 +10:00
Ganesh Nalawade
3b0e9ded91 Fix fallback and boolean check in argspec (#27994)
Fixes #27978

*  Add missing assignment for param key in fallback handling
*  Add check for frozenset type
*  Unit testcase
2017-08-10 12:10:18 -07:00
Philip Gough
fee42a01d9 Redhat subscription proxy support (#22544) 2017-08-10 20:26:57 +02:00
David Newswanger
d0485779e8 nxos_smu: fix Structured output unsupported error in nxapi (#27976)
* fixed structured output unsupported error
2017-08-10 14:12:15 -04:00
Ricardo Carrillo Cruz
e8f1c1511c Implement purge on eos_vrf (#28013) 2017-08-10 19:59:32 +02:00
Martin Krizek
1c4e491eac yum: do not hide yum's errors (#27696) 2017-08-10 13:57:08 -04:00
Rémi REY
7974ad34f1 add playbook runtime stat in the logstash callback stats (#25785) 2017-08-10 13:43:21 -04:00
Raphael Nestler
ac0202fba1 win_file: Remove 'Create a file' example (#28009)
Fixes #28005
2017-08-10 13:30:37 -04:00
Peter Sprygada
145895dcf0 updates examples and documentation (#24211)
includes better examples of valid and invalid usage of the lines
argument

fixes #22828
2017-08-10 13:09:53 -04:00
Peter Sprygada
d8b005ec65 updates the prompt regexp for prompt handling in sros (#28015)
* thanks to @jurajama for tracking this down and providing the fix
* fixes #24192
2017-08-10 12:59:49 -04:00
Brian Coca
2015835759 updated author with github id 2017-08-10 11:42:49 -04:00
Dag Wieers
8451d945aa Add new maintainer 2017-08-10 17:11:55 +02:00
Luke Armstrong
fd18ade465 Documentation - modules/files/unarchive (#27998)
Last example is incorrect and will not run without throwing an error.
2017-08-10 10:32:08 -04:00
Juan Manuel Parrilla
2cfb30fc91 Fixes #24414, Added support for a ETCD folders (#24432) 2017-08-10 07:44:05 -06:00
Adrian Likins
220db9cdd2 Better vault pass prompt behav on EOF, more unit tests (#27981) 2017-08-10 09:34:57 -04:00
Adrian Likins
82f550e8cd Add prompt formats for 2.3 compat ask-vault-pass (#27974)
The prompt_formats dict didn't get the 'prompt_ask_vault_pass'
item added for interactive --ask-vault-pass, which
caused "KeyError: u'prompt_ask_vault_pass'"

Fixes #27885
2017-08-10 09:34:16 -04:00
Valentin Krasontovitsch
cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
2017-08-10 09:25:56 -04:00
Brian Coca
13d2eb6568 fix incorrect joingin of command for chpasswd
fixes #24638
2017-08-10 09:23:13 -04:00
Peter Sprygada
c4da61239d stops trying to filter out commands from config (#28002)
* stops trying to filter out commands from config

fixes #24874

* fix up pep8 issues and remove offending function
2017-08-10 09:18:44 -04:00
Nathaniel Case
ed8a5af3dc nxos_bgp: Fix idempotence for event-history (#27329)
* Fix idempotence for event-history

* `event-history detail` defaults to `False`, the rest to `size_small`
2017-08-10 08:55:43 -04:00
Lukas Bednar
29891bff19 ovirt_templates: fixed typo in doc (#27883) 2017-08-10 08:32:36 -04:00
Lukas Bednar
a48a7eecc8 ovirt_templates: added option to name imported disk as a template (#27902)
* ovirt_templates: added option to name imported disk as a template

* ovirt_templates: added version_added to new attribute

* ovirt_templates: added alias for image_name and example

* added alias glance_image_disk_name for image_name
* example how to import image from glance as template
* improve description of template_image_disk_name
2017-08-10 08:32:25 -04:00
Abhijeet Kasurde
f7321a87ca Pep8 fixes for rabbitmq modules (#24590)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-10 11:57:11 +02:00
Ricardo Carrillo Cruz
7e2169f6d5 Add aggregate functionality to eos_vrf (#27915)
* Add aggregate functionality to eos_vrf

* Add tests for eos_vrf aggregate option

* Remove test2 and test3 vrfs at the beginning of the eos_vrf tests

* Pull all vrfs

With aggregate, we need to get all VRFs and we then compare with
desired VRFs, instead of assuming it will be just one.
2017-08-10 10:54:13 +02:00
Dag Wieers
eee09565b1 utilities modules: PEP8 compliancy (#27741) 2017-08-10 09:36:28 +01:00
Simon Dodsley
f30589c91d purefa_volume: Fix typo in required_if (#27921) 2017-08-10 09:34:45 +02:00
Marc Sensenich
38d026b1db New Module: Notification module for Office 365 Connector Cards (#27636)
* New Module: Notification module for Office 365 Connector Cards (notification/office_365_connector_card)

* Updates per review

* Added connection check when in check mode
2017-08-10 04:04:49 +02:00
Philippe Dellaert
920cd7bb1c New module: Waiting for VMware tools to become available (#27236)
* Adding VMware tools module
Functionality: Waits for VMware tools to become available (running
state)

* Adding base integration test preparations
Until govcsim supports actual guest tool status, the tests are disabled

* Cleanup and better getvm method

* Updating Changelog

* Adding required metaclass and future import

* Rename to vmware_guest_tools_wait

* Cleanup of documentation

* Fixing review remarks
2017-08-10 03:50:58 +02:00
giovannisciortino
064c3b837f Fixes #27836: get_url check if directory exists (#27852) 2017-08-10 09:57:19 +10:00
Dag Wieers
6bfedc9fe5 Various fixes (#27889)
This PR includes:
- Removal of get_exception (sadly)
- Avoid deprecating 'state' parameter with aci_rest
- Small fix for querying using aci_rest

Signed-off-by: @bcoca
2017-08-10 01:51:13 +02:00
mzizzi
380c43de4e cloudformation_facts: describe all stacks by default
* cloudformation_facts describe all stacks by default

* cloudformation_facts jittered backoff / retries

* cloudformation_facts stack_name use default arg_spec

* cloudformation_facts bugfix broken notification_arns output

* cloudformation_facts add simplified "stack_tags" output

* CloudFormationServiceManager.describe_stacks default args
2017-08-10 09:06:40 +10:00
Zac Medico
501fc7a248 template: fix KeyError: 'undefined variable: 0 (#27972)
* template: fix KeyError: 'undefined variable: 0

For compatibility with the Context.get_all() implementation
in jinja 2.9, make AnsibleJ2Vars implement collections.Mapping.
Also, make AnsibleJ2Template.newcontext() handle dict type
for the 'vars' parameter.

See: d67f0fd4cc
Fixes: https://github.com/ansible/ansible/issues/20494

* add units/template/test_vars

* intg tests for jinja-2.9 issues like 20494

test cases here are based on
https://github.com/ansible/ansible/issues/20494#issue-202108318
2017-08-09 18:50:53 -04:00
James Hogarth
7ec34b4cb2 ISSUE 25470 - update patch from review details 2017-08-09 13:38:16 -07:00
James
fc274bda8a ISSUE 25470 - junit report failure on changes
This commit provides an environment option to change the behaviour so
that it's possible to declare any changes shoudl be considered a junit
failure.

This is useful when carrying out idempotent testing to ensure that
multiple runs are safe and any changes should be considered a test
failure.

In a CI test of an ansible role the practice would be to run the role
once without this to configure the test system, and tehn to run a second
time including this environment vairable so that the CI engine
processing the junit report recognise any changes to be a test fail.
2017-08-09 13:38:16 -07:00
David Moreau-Simard
b35c749268 Add a sensu_client module
This provides a sensu_client module in order to be able to dynamically
configure a Sensu client.

It takes a different approach than the existing Sensu modules such as
sensu_check but is hopefully a much more flexible and simple way of
handling configurations.
2017-08-09 16:36:39 -04:00
David Moreau-Simard
7a56e5d45d Add sensu_handler Ansible module
This provides a sensu_handler module in order to be able to dynamically
configure a Sensu handler.
2017-08-09 16:34:20 -04:00
Kamil Cholewiński
b5414088a3 Add ConfigMap support to kubernetes module (#21014) 2017-08-09 16:03:35 -04:00
Nathaniel Case
a78f3faa6c nxos_bgp_neighbor_af does not want required_together (#26370)
* nxos_bgp_neighbor_af does not want required_together

* fixup tests

* Fix max_prefix_* issues

* Require address-family

* Fix idempotency for next_hop_third_party

* Fix idempotency for allowas_in*

* Fix idempotency for *_in and *_out

* Reorder command generation again

`default` is first, then `max-prefix`, then booleans
2017-08-09 15:54:34 -04:00
Peter Sprygada
4fb114174b fixes Traceback generated by nxos_igmp module (#27869)
* fixes Traceback generated by nxos_igmp module

* update module code to reflect review comments

* doh!...remove q
2017-08-09 15:52:37 -04:00
Colin Nolan
db50650365 Adds support for all Consul 0.8 ACL rule scopes (#25800)
* Added in support for 'agent' and 'node' types.

* Tidies and moves `consul_acl` module closer to PEP8 compliance.

* Switched from using byspoke code to handle py2/3 string issues to using `to_text`.

* Made changes suggested by jrandall in https://github.com/ansible/ansible/pull/23467#pullrequestreview-34021967.

* Refactored consul_acl to support scopes with no pattern (and therefore a different HCL defintion).

* Corrects whitespace in Consul ACL HCL representation.

* Fixes Consul ACL to return the HCL equivalent JSON (according to the Consul docs) for the set ACLs.

* Repositioned import to align with Ansible standard (!= PEP8 standard).

* Adds Python 2.6 compatibility.

* Fixes PEP8 issues.

* Removes consul_acl.py as it now passes PEP8.

* Follows advice in the "Documenting Your Module" guide and moves imports up from the bottom.

* Tidies consul_acl module documentation.

* Updates link to guide about Consul ACLs.

* Removes new line spaces from error message string.

* Provide better error message if user forgets to associate a value to a Consul ACL rule.

* Minor refactoring of Consul ACL module.

* Fixes bug that was breaking idempotence in Consul ACL module.

* Detects redefinition of same rule.

* Adds test to check the Consul ACL module can set rules for all supported scopes.

* Fixes return when updating an ACL.

* Clean up of Consul ACL integration test file.

* Verify correct changes to existing Consul ACL rule.

* Adds tests for idempotence.

* Splits Consul ACL tests into cohesive modules.

* Adds test for deleting Consul ACLs.

* Test that Consul ACL module can set all rule scopes.

* Fixes issues surrounding the creation of ACLs.

Thanks for the comments by manos in https://github.com/ansible/ansible/pull/25800#issuecomment-310137889.

* Stops Consul ACL's name being "forgotten" if ACL updated by token.

* Fixes incorrect assignment when a Consul ACL is deleted.

* Fixes value of `changed` when Consul ACL is removed.

* Fixes tests for Consul ACL.

* Adds interal documentation.

* Refactors to separate update and create (also makes it possible to unit test this module).

* Improves documentation.

* Completes RETURN documentation for Consul ACL module.

* Fixes issue with equality checking for `None` in ACL Consul.

* Fixes Python 2 issue with making a decision based on `str` type.

* Fixes inequality check bug in Python 2.

* Adds tests for setting ACL with token.

* Adds support for creating an ACL with a given token.

* Outputs operation performed on Consul ACL when changed.

* Fixs issue with test for creating a Consul ACL with rules.

* Corrects property used to set ACL token in python-consul library.

* Fixes tear-down issue in test that creates a Consul ACL using a token.
2017-08-09 15:21:12 -04:00
Lucas Melchior
756b510414 fixed formatting for maven_artifact synopsis 2017-08-09 14:43:29 -04:00
Eduardo Suarez-Santana
9339b0f4a7 Fix lookup into search paths when undefined.
A fileglob may issue a warning `Unable to find xxxx in expected paths` when `ansible_search_path` is not defined, because it loops over the characters in the string instead of looping over a list of one element.
2017-08-09 14:07:40 -04:00
QijunPan
9e3ae8a0cb Delete unused module_utils/cloudengine.py (#25054)
* Delete unused cloudengine.py
rename cloudengine to ce.

* remove unused cloudengine.py
2017-08-09 12:32:45 -04:00
Willem van Ketwich
82765637b9 AWS EC2 ASG - Replace ELBs correctly and remove existing ELBs when specified as an empty list (#27830)
* fixes for edge cases - load_balancers has not been specified - don't want to delete existing elbs, wanted elbs aren't a superset of has_elbs (eg. 1 elb existing, adding another), specifying load_balancers: [] to delete existing elbs
2017-08-09 11:56:30 -04:00
saichint
14186af558 Fix for nxos_ospf idempotent issue (#27913) 2017-08-09 11:25:35 -04:00
Andrej Svenke
ef55530d67 ecs_attribute: new module. (#20618)
ecs_attribute: fixed docs.

ecs_attribute: changed state to 'present' by default.

ecs_attribute: pep8 fix.

ecs_attribute: improved attribute iteration.

ecs_attribute: fixed absent EC2_REGION error message.

ecs_attribute: fixed exception handling on invalid attribute (e.g. 2+2).

ecs_attribute: pep8 fix.

ecs_attribute: docs and python3 fixes.

ecs_attribute: fixed class declaration for python 2-3 compatibility.
2017-08-09 11:06:24 -04:00
flowerysong
e2b2ba6bc7 hashi_vault: fix token logic again (#27863)
The token is not mandatory, and there are more ways of setting it than
passing it in as a module arg.
2017-08-09 10:53:30 -04:00
Adrian Likins
767cd82e42 Fix module failure with pacemaker_cluster: state=cleanup (#27846)
* Fix module failure with pacemaker_cluster: state=cleanup

If state=cleanup was used, set_cluster() was being called
with 'cleanup' state which it doesn't handle. Instead
use existing clean_cluster() method.

Fixes #27799

* get and return cluster_state on state=clean as well
2017-08-09 10:43:16 -04:00
Anil Kumar Muraleedharan
52a8ed55ee Update cnos.py to remove unused method checkServerForImage (#27767) 2017-08-09 10:16:13 -04:00
Will Rouesnel
1685338603 get_url: Use atomic_move with get_url rather then shutil.copyfile
This brings get_url inline with the other internal file handling modules,
and allows replacement of in-use files.
2017-08-09 10:09:03 -04:00
Nathaniel Case
01dda25e0f fix nxapi transport in nxos_snmp_location (#27849)
* fix nxapi transport in nxos_snmp_location

* Appease Shippable
2017-08-09 09:44:02 -04:00
Nathaniel Case
c1bf74283e Network load_config: Capture configuration output and display as warnings (#27851)
* Capture configuration output and display as warnings

* Don't break on nxapi

nxapi errors very loudly instead, so no need to muck about with warnings
2017-08-09 09:43:04 -04:00
Dag Wieers
2af759e9f9 vmware_vm_facts: Improve example and docs (#27898)
This fixes ansible/ansible-modules-extras#2475
2017-08-09 09:41:30 -04:00
schunduri
3241b7116e Cisco ACI New Module PR (#26836)
* New ACI Tenant module

*  New module requirements added.

* Placed from __future__ import to be the first line

* Interpreter line added
2017-08-09 07:08:44 -06:00
s-hertel
875c8e4f3e ensure stickiness expiration is an int before comparison 2017-08-08 22:30:50 -07:00
Ganesh Nalawade
1f7e04d958 Fix junos_lldp integration test failure (#27936) 2017-08-09 10:23:41 +05:30
Dag Wieers
6874ba23ff New module: Support manipulating XML files (#25323)
* Import original unmodified upstream version

This is another attempt to get the xml module upstream.
https://github.com/cmprescott/ansible-xml/

This is the original file from upstream,
without commit 1e7a3f6b6e2bc01aa9cebfd80ac5cd4555032774

* Add additional changes required for upstreaming

This PR includes the following changes:

- Clean up of DOCUMENTATION
- Rename "ensure" parameter to "state" parameter (kept alias)
- Added EXAMPLES
- Remove explicit type-case using str() for formatting
- Clean up AnsibleModule parameter handling
- Retained Python 2.4 compatibility
- PEP8 compliancy
- Various fixes as suggested by abadger during first review

This fixes cmprescott/ansible-xml#108

* Added original integration tests

There is some room for improvement wrt. idempotency and check-mode
testing.

* Some tests depend on lxml v3.0alpha1 or higher

We are now expecting lxml v2.3.0 or higher.
We skips tests if lxml is too old.

Plus small fix.

* Relicense to GPLv3+ header

All past contributors have agreed to relicense this module to GPLv2+, and GPLv3 specifically.

See: https://github.com/cmprescott/ansible-xml/issues/113

This fixes cmprescott/ansible-xml#73

* Fix small typo in integration tests

* Python 3 support

This PR also includes:
- Python 3 support
- Documentation fixes
- Check-mode fixes and improvements
- Bugfix in check-mode support
- Always return xmlstring, even if there's no change
- Check for lxml 2.3.0 or newer

* Add return values

* Various fixes after review
2017-08-08 20:21:03 -07:00
CyberArk BizDev
923445a484 CyberArk User Management (#27519)
* Initial submit for CyberArk User management module
2017-08-08 18:34:40 -07:00
Michael Price
760015fc6d Refactor E-Series Volume to use module_utils (#20901)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
2017-08-08 14:51:02 -06:00