Commit Graph

17817 Commits (40b7dffea8a2486be324f135cc615c7d00a06ffe)

Author SHA1 Message Date
Daniel Moore c342866016 HAProxy: add support for draining connections in maintenace mode (#25887)
* HAProxy: Support waiting for nodes to drain before maint mode

A common task when working with a HAProxy-managed node is to first "drain" it
and then place it into maintenance mode (to be repaired or redeployed).
(Draining such a node consists of preventing new connections from being
established while waiting for active sessions to expire/close.)  This commit
creates a new `drain' parameter for Ansible's HAProxy module, which, when set to
`yes` in conjunction with `state: disabled` and `wait: yes`, causes the module
to attempt to set a node to drain, wait for it to finish draining, and put the
node into maintenance mode.  The action is recorded as a success if these steps
are completed before a maximum wait timeout is reached.

Implements: https://github.com/ansible/ansible-modules-extras/issues/521

Acknowledgments: This is based on user krislindgren's pull request #21420

* Correct how drain option is handled

Previously the `drain` parameter would have no effect, since the `disabled`
state would still immediately place backend servers into maintenance mode.
7 years ago
Thomas Krahn 8e6c0ca599 ipa_group: Fix issue 25660 (#26282) 7 years ago
Ondra Machacek d0bb2a41d4 cloud: ovirt: add developer README.rst (#22685)
* cloud: ovirt: add developer README.rst

* Copy edits
7 years ago
Dag Wieers 61d2201a2d win_get_url: Add use_proxy, headers and timeout (#26612)
* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation

* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation
7 years ago
Jordan Borean b84a48caef win_msi: deprecated in favour of win_package (#28741) 7 years ago
Jordan Borean a695f30411 Added powershell SID utils for shared common code (#27091)
* Added powershell SID utils for shared common code

* rebased from upstream and fixed up module util after change
7 years ago
Jordan Borean adabefd016 win_package: rewrite, check mode, tests, more check options (#27470)
* rewrite of win_package to enable win_msi deprecation

* fix some minor doc issues

* Removed exe tests

* dag's changes seem to be missing, re-add them

* fixed yaml for return values
7 years ago
Dag Wieers 91e2319806 win_shortcut: Support environment variables/UNC paths (#27089)
This was a regression.
Integration tests needs to be adapted too.
7 years ago
Artem Zinenko 1c958af88b [28017] Integration tests for win_rabbitmq_plugin (#28118)
* Check registry to find RabbitMQ installation path

* Integration tests for win_rabbitmq_plugin

* Added himself to BOTMETA.yml

* Skipped running tests on Windows 2008 SP2
7 years ago
pari- 468e71bf71 npm: fix idempotence (#22238)
* npm: fix idempotence

* Better idempotency fix

More intelligently add --production rather than depending on hard coded order in args list
Cleanup boilderplate imports and license
PEP8 fixes
7 years ago
Brian Coca f9b3f4f934 make groups magic var dependant on inventory (#28677)
* make groups magic var dependant on inventory

it was overtly restricted by 'host'
minor fixes to test_var_manager.py, need to test other values also

* pepe hates extra blank line
7 years ago
Brian Coca de6ba4daff add toggle to controle inventory parse as error (#28729)
* add toggle to controle inventory parse as error

also rearranged new inventory options into it's own ini section

* updated with inventory features

also minor fixes/consolidation on deprecated/removed modules

* tweaked settings
7 years ago
Nathaniel Case 862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
7 years ago
Trishna Guha 0a8ec4ddef fix nxos_igmp_interface output (#28735)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Michael De La Rue fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
7 years ago
Trishna Guha c36c34ef7e fix nxos parse response KeyError (#28602)
* fix nxos parse response

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* use get() method instead
7 years ago
Brayneded 335e804c0c Add junos_vrf vrf-table-label support (#28727)
* Added VRF Table Label Support

* Added table_label docs and set as default=true
7 years ago
Mike Wiebe 3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
7 years ago
Brian Coca f5743396dc skip all hidden keys, allow exclude list 7 years ago
Will Thames 63df0adc17 [cloud] Update RDS parameter group for boto3 (#25345)
* Update RDS parameter group for boto3

* Update to boto3
* Update to latest ansible standards
* Remove choices list for valid engines (See #19221 for context)
* Allow tagging
* Return some useful information, and document that information

* Add tests for rds_param_group

* Improve testing of rds_param_group

* Add purge_tags option for rds_param_group

* Fix remaining broken rds_param_group tests

* Ensure the group name is lowercased. Fixes integration tests when run on OSX
7 years ago
Joerg Kastning f08c29924e Added folder and datacenter to the examples (#25221)
* Added folder and datacenter to the examples

From #22644 it seems that the parameter 'folder' is mandatory. While both are required parameters they should be used in the examples.

* Removed 'required: True' from folder documentation

I reverted the documentation of the folder option to be a not required one. This way it stays consistent with the definition of the function.
7 years ago
Reid Wahl 3c65c2bfaf Fixes #20752: Prevent AIX get_vgs_facts from failing on offline lvols (#28701) 7 years ago
Abhijeet Kasurde 3e20acbd79 Refactor code for find_host_by_cluster_datacenter (#26859)
Fix adds refactor of code for find_host_by_cluster_datacenter
API in vmware_host and vmware_resource_pool.
Also, adds strict check for cluster and datacenter object find.
Testcase for vmware_resource_pool.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Pat McClory 5065bf169d Fix bug where ansible_lvm facts silently fails if a PV isn't in an VG (#28684)
If a PV hasn't been added to a VG i.e.:

[pmcclory@box ~]$ sudo pvs --noheadings --nosuffix --units g
  /dev/xvdb       lvm2 ---- 10.00 10.00
  /dev/xvdv1 vg0  lvm2 a--u 24.99     0

Than ansible_facts.ansible_lvm will be unset after running setup module.

The issue is that the module splits on whitespace, which causes an
indexing error when the VG column is empty.

Fix is to add the separator field and safely split on that.
7 years ago
René Moser c1be5b2389 openssl_certificate: consistent param namings (#28521) 7 years ago
Katerina Koukiou 1c9c16a101 cloud: ovirt: Add option to import SD with sd_type != block storage type (#28593) 7 years ago
Ondra Machacek b9600281d6 ovirt_hosts: Add upgrade_check action (#28437)
* ovirt_hosts: Add upgrade_check action

* Fix pep8 issue
7 years ago
Reid Wahl f787be3597 Fixes #22335: Adds filename extension to tempfile for Vault 7 years ago
Adrian Likins 1f962bd937 Fix config value type for VAULT_IDENTITY_LIST (#28678)
Was using the 'value_type' key, but didn't get updated
to the new 'type' key in merge.

Fix playbooks cli so it uses VAULT_IDENTITY_LIST as well.
7 years ago
Radu Epure 54c295699e [cloud] Add DBName to RDS Facts if it exists (#27121)
* + Add DBName in RDS Facts if it's not null

* - remove 2 offending lines for automatic tests

* Syntax change for shorter code and improved readability
7 years ago
Ondra Machacek 5be37018a2 cloud: ovirt: present state shouldn't change state if not needed (#28214)
This PR fixes: https://github.com/ansible/ansible/issues/27382
7 years ago
Felipe Garcia Bulsoni 791a029203 Added support to HPE Network Set resources (#28614)
- Added unit tests
7 years ago
Felipe Garcia Bulsoni 978c64afc5 Support retrieving Facts about Fibre Channel resource of HPE OneView (#28608)
* Added FcNetworkFactsModule to query FC Network Resources in HPE OneView

- Added unit tests

* Removing unnecessary quotes from example and documentation
7 years ago
Dag Wieers a1876bac9c pkg5_publisher: Fix on failed, PEP8 compliancy (#26019) 7 years ago
Dag Wieers 9b31ca8d16 Small cleanup in return values (#28693) 7 years ago
Anil Kumar Muraleedharan eee6da857f Update CNOS.py to fix error in image download on devices (#28589)
* Update CNOS.py to fix error in image download on devices

* Fixing Bug on Swaping of character indexes of error strings
7 years ago
Mike Rostermund 550c00a745 snmp_facts: Fix typo in example docs (#28689) 7 years ago
Brian Coca 95eaa246aa added keyed_group construction (#28578)
* added keyed_group construction

also added strict config to allow skipping bad templating
more precise error msgs
to_native better than to_text
fixed truthyness
added safe names

* allow keyed expressions to return lists

* PEPE should eat less, he is getting fat
7 years ago
Dag Wieers 1afbe29642 Remove transport_test for some connection types (#28450)
So we are removing the transport_test for the listed connection types,
because they fail to take into account bastion or proxy servers for
testing the transport.

The result of removing this, is that modules using this facility will do
a complete round-trip attempt, running a module, which is a bit heavier but correct.

This fixes #23774
7 years ago
Dag Wieers 357119f3b7 xml module: Improve documentation (#28667)
Missing bits and pieces, clarifications and examples.

This fixes #27951
This fixes #28119
This fixes cmprescott/ansible-xml#59
7 years ago
Peter Sprygada ebf529f8b8 correctly map to connection_user from remote_user in play_context (#28676)
This change will map the remote_user prop to connection_user if it is
not aleady set.  It also adds a var mapping to ansible_connection_user
in the inventory to override the local user if needed.  This is
primarily used by the network_cli connection plugin today.

fixes #26120
7 years ago
George Nikolopoulos 869eee0762 Deprecate citrix/netscaler module (#28280)
* Deprecate citrix/netscaler module

* 	renamed:    netscaler.py -> _netscaler.py

* Fix legacy files list
7 years ago
George Nikolopoulos 8d14f9d578 Lowercase enabled, disabled option values (#27764) 7 years ago
George Nikolopoulos c01dd6470c Add disable operation for netscaler_servicegroup (#28327) 7 years ago
George Nikolopoulos 2281a6676b Add enable, disable operation in netscaler_service (#28321) 7 years ago
Nathaniel Case fbeb3b9ac5 Nxos ping (#28665)
* Update documentation & results, clean up code

* Change numeric results to int/float
7 years ago
Ivan Bojer 9b8abc8a7f panos_sag: static address group (#28041)
* - Create a static address group object in the firewall used for policy rules.

* PEP8 changes

* add function to check for devicegrp name

* fix exception handling

* PEP8 fixes

* update metadata_version
7 years ago
Evgeny Fedoruk 71313ce04d Module for uploading templates into vDirect server (#27570)
* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server

* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server
7 years ago
Peter Sprygada ed23424b32 reverts 28599 7 years ago
René Moser cc3bb0a043 cloudstack: cs_instance: warn for changes not applicable to running VMs. (#28664) 7 years ago
Andrew Makousky 9190598096 Set task status correctly for vmware_guest shutdown and reboot. (#26515) 7 years ago
Dag Wieers 11c9756d9c xml module: Make user interface much more restricted (#28657)
So the xml module has a lot of parameters that combined together do
specific things. however it does not really describe which parameters
are required together, or which ones are required.

This PR fixes that situation and makes it impossible to provide
confussing parameters combinations.

Also, `pretty_print` was used as a flag to modify the output, but also
as an action to reformat the file (without other change). This is
problematic the way it was designed. This fixes that too.

This fixes #28194
7 years ago
Peter Sprygada 75293d83ca configures address-families when vrf is created (#28615)
* configures address-families when vrf is created

fixes #26725

* fix up unit test cases
7 years ago
Jacob McGill a03a1cde88 ACI Tenant SPAN Src Grp to Dst Grp: Add new module to support managin… (#28645)
* ACI Tenant SPAN Src Grp to Dst Grp: Add new module to support managing Tenant SPAN Source Group and Dest Group Bindings

* Fix docstring errors

* Fix Metadata version

* Fix Shippable issues
7 years ago
Jacob McGill 6401478883 ACI Tenant SPAN Src Grp: Add new module to support managing Tenant SP… (#28644)
* ACI Tenant SPAN Src Grp: Add new module to support managing Tenant SPAN Source Groups

* Fix docstring errors

* Fix Metadata version

* Fix Shippable issue
7 years ago
Jacob McGill 05a17164e3 ACI EPG: Update module to use new URL Method (#28647) 7 years ago
Jacob McGill eaea574e3b ACI Tenant EP Retention Policy: Add new module to support managing En… (#28642)
* ACI Tenant EP Retention Policy: Add new module to support managing End Point Retention Policies

* Fix docstring errors

* Fix Metadata version
7 years ago
Jacob McGill bac617acef ACI Taboo Contract: Update module to use new URL Method (#28639) 7 years ago
Jacob McGill 8b641688e9 ACI Tenant Action Rule Profile: Update module to use new URL Method (#28641) 7 years ago
Jacob McGill a12ff4468d ACI SPAN Dest Group: Update module to use new URL Method (#28643) 7 years ago
Jacob McGill 8a966a48c8 ACI VRF: Update module to use new URL Method (#28646) 7 years ago
Jacob McGill f7a466cbb4 ACI Intf Policy Port Security: Update module to use new URL Method (#28638) 7 years ago
Jacob McGill f9036133bb ACI Tenant: Update module to use new URL Method (#28640) 7 years ago
Jacob McGill 9c564de765 ACI L3Out Route Tag: Update module to use new URL Method (#28637) 7 years ago
Jacob McGill a6614a132d ACI Intf Policy Port Channel: Update module to use new URL Method; add support for ctrl (#28636) 7 years ago
Jacob McGill 1bec0e5753 ACI BD: Update module to use new URL Method (#28625)
* ACI BD: Update module to use new URL Method

* fix docstring errors
7 years ago
Jacob McGill 2e61760659 ACI Contract Subject: Add new module to support managing Contract Sub… (#28620)
* ACI Contract Subject: Add new module to support managing Contract Subjects in ACI

* Fix Metadata

* Fix Metadata version
7 years ago
Jacob McGill e434c291ca ACI Intf Policy MCP: Update module to use new URL Method (#28635) 7 years ago
Jacob McGill fa6da960db ACI Intf Policy LLDP: Update module to use new URL Method (#28634) 7 years ago
Jacob McGill 6109a6c093 ACI Filter: Update module to use new URL Method (#28630) 7 years ago
Jacob McGill f5f2a2fac2 ACI Intf Policy L2: Update module to use new URL Method (#28633) 7 years ago
Jacob McGill 25d1ef3493 ACI Intf Policy FC: Update module to use new URL Method (#28632) 7 years ago
Jacob McGill 85ca2234fd ACI Filter Entry: Update module to use new URL Method (#28631) 7 years ago
Jacob McGill 0577bf688c ACI EPG to Contract: Update module to use new URL Method (#28628) 7 years ago
Jacob McGill a4087841a8 ACI EPG to Domain: Update module to use new URL Method (#28629) 7 years ago
Jacob McGill d186c9eda2 ACI EPG Mon Policy: Update module to use new URL Method (#28627) 7 years ago
Jacob McGill 9582e7e549 Ap (#28626)
* ACI Ap: Update module to use new URL Method

* ACI Ap: Update module to use new URL Method
7 years ago
Jacob McGill 0b1ea2be9b ACI BD Subnet: Update module to use new URL Method (#28624) 7 years ago
Jacob McGill dc232737ba ACI BD to L3Out: Update module to use new URL Method (#28623) 7 years ago
Jacob McGill 28f76166d0 ACI Contract: Update module to use new URL Method (#28622) 7 years ago
Jacob McGill 037ef743c3 ACI Contract Subject to Filter: Update module to use new URL Method (#28621) 7 years ago
Nicolas Porcel ba420c47cd synchronize: Use private_key and ssh_user with delegate_to (Fixes #16215) (#21686) 7 years ago
Jacob McGill 061fe51e9a ACI AEP: Update module to use new URL Method (#28619)
* ACI AEP: Update module to use new URL Method

* ACI AEP: Update module to use new URL Method

* ACI AEP: Update module to use new URL Method
7 years ago
Jacob McGill ddd3e6fb91 ACI: Update ACIModule to dynamically build URLs (#28618) 7 years ago
Dag Wieers 2634ef955a xml module: Better change detection, improved tests (#28460)
This PR includes:

- Improvements to change-detection by comparing 2 objectified XML trees
- Implement better integration tests by comparing 2 files using copy
7 years ago
banzo 3302248616 [cloud] Amazon Redshift module cluster deletion fix (#25164)
* Fix typo (#25161)

* Fixed cluster deletion: added final snapshot management

This adds 2 new options to the module API (only for the "delete" command):

* skip_final_cluster_snapshot: skip a final snapshot before deleting the cluster
* final_cluster_snapshot_identifier: identifier of the final snapshot to be created before deleting the cluster

Ref: http://boto.cloudhackers.com/en/latest/ref/redshift.html

* Fixed cluster deletion: added final snapshot management

This adds 2 new options to the module API (only for the "delete" command):

* skip_final_cluster_snapshot: skip a final snapshot before deleting the cluster
* final_cluster_snapshot_identifier: identifier of the final snapshot to be created before deleting the cluster

Ref: http://boto.cloudhackers.com/en/latest/ref/redshift.html

* add version_added information

* Review corrections:

* used required_if instead of checking parameters compatibility inside the code
* renamed aliases to be more explicit

Also added an example for the "delete" command

* Review corrections correction - make "delete" command specific parameters mandatory only when the command is "delete"

* updated doc with aliases

* Fix YAML docs syntax

* Set default to match API for skip_final_cluster_snapshot.
7 years ago
Dag Wieers 7a182fc43e xml module: Add backup to pretty_print too (#28604) 7 years ago
Peter Sprygada b34cfd03b3 implements missing code to handle before and after arguments (#28612)
fixes #21683
7 years ago
Nathaniel Case 07cd4fda0e Remove module_utils.shell (#28560)
* Get rid of module_utils.shell

* There is no way this actually raises ShellError
7 years ago
Peter Sprygada ac6892efe4 set the play_context connection_user before mapping magic variables (#28599)
This change moves when the connection_user is set in the play_context to
set it before the magic variables are mapped.  If the connection_user
is not set before the mapping, the connection_user will be incorrectly set
for local connections

fixes #26120
7 years ago
Joel Kaasinen fc7301671e [cloud] Add check mode for cloudformation module (#23483)
* cloudformation: dummy check mode

* cloudformation: use changesets to implement check mode

* cloudformation: wait at most 5min for change set

* cloudformation: handle stack creation and deletion in check mode

* cloudformation: standardize output format in check mode

msg is a string, meta is a list

* cloudformation: use same naming convention in get_changeset as create_changeset

also add comment about code duplication between said functions

* Remove unused imports

* PEP8 whitespace fix

* Fix CI, convert success=True check to for/else
7 years ago
Sloane Hertel cf1a9d4d22 New module: Add ec2 Vpn Connection module and tests (cloud/amazon/ec2_vpc_vpn) (#24385)
* Add VPN module and unittests

* remove unnecessary imports

* fix documentation

* raise custom exception rather than passing module everywhere

* remove recordings

Rerecord tests

Fix docs

Ensure vpn_connection_id is a list of strings when checking if it exists

* fix check mode

* Rerecord tests

* remove superfluous code and comments and make exception handling uniform

fix docs

* Fix ec2_vpc_vpn documentation

* make ec2_vpc_vpn compatible with python 2.6 and make check mode logic more succinct

* fix comparison of list of dicts

* Fix typos and docstrings

make requested changes for imports

make code clearer

* Fix copyright and metadata version.
7 years ago
CsilLAB 8d3546af60 Update eos_config documentation. (#28512)
Added note to documentation about Jinja2 file used as src.
7 years ago
Felipe Garcia Bulsoni fb6ed8d76c EthernetNetworkModule for HPE OneView (#28336)
* Adding module to manage ethernet network on HPE OneView

* Adding unit tests to EthernetNetwork module

* Added OneViewModuleException custom exceptions to module

- Removed exception imports from hpOneView
- Updated unit tests

* Fixing mock import inside ethernet network module unit test

* Fixing issues found in METADATA by CI

* Updated paths to use solution name instead of vendor name

* Fixed documentation, removed redundant if and improved readability

* Updated _bulk_present to use and return `result`, same way as _present

* Changed __ to _ in private methods following ansible style

* Fixed some example inconsistencies and turned states doc into a list

* Added adriane-cardozo to list of maintainers
7 years ago
Simon Dodsley 000ccc838a Set protection group enabled by default with option to disable (#28582) 7 years ago
Fabio Alessandro Locati c850bf15d0 windows/win_command: improve examples (#20465)
* windows/win_command: improve examples

* Improve description

* Improvements

* minor updates based on PR feedback
7 years ago
Ganesh Nalawade 55fa4d54aa Add tested against junos version for junos modules (#28598)
* Add tested against junos version for junos modules
7 years ago
AlexZolotarenko 69bf5331b4 Fix incorrect command-line parameters for Solaris (#22865)
* Fix incorrect command-line parameters for Solaris

* Update mount.py
7 years ago
Trishna Guha 10467efaba Tested against VYOS version (#28562)
* Tested againset VYOS version

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix duplicate dict key error vyos_command

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers 11b50671ba win_robocopy: Check-mode support, improved return code and docs (#25410)
* win_robocopy: Cleanup logic, check-mode support

* win_robocopy: Cleanup logic, check-mode support

This PR includes:

- Improved check-mode support
- Clean up documentation
- Clean up code structure
- Add warnings in special cases

* minor fix for typo
7 years ago