Commit Graph

8115 Commits (f3720c90e06f0a0f0abc3b5407dc944253ac2e43)

Author SHA1 Message Date
Matt Clay f6fbfeace8 Clean up use of `connection: local` in tests. 5 years ago
Matt Clay e105f5b436 Install rabbitmq from s3 in tests. 5 years ago
Sloane Hertel 11279a909d fix combine filter using undefined vars (#55840)
* Check variables are defined before using combine filter

* Add tests for the combine filter

* Remove dependencies that should already be installed

* relocate the function to recursively check for undefined vars

add another test

* changelog
5 years ago
Gonéri Le Bouder 0e83384dfd vmware: refactoring of vmware test roles -- part2 (#55724)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_datacenter`
- `vmware_datastore_cluster`
- `vmware_datastore_facts`
- `vmware_datastore_maintenancemode`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
5 years ago
Gonéri Le Bouder c8c0f8c51a vmware: refactoring of vmware test roles -- part1 (#55723)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_about_facts`
- `vmware_cluster`
- `vmware_cluster_facts`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
5 years ago
Matt Clay cb0ca89994 Fix integration test role syntax.
This does not fix the tests themselves, only the syntax (converting from playbooks to roles).
The aix_devices test fails due to use of unsupported state values.
5 years ago
Sam Doran b3ce3fc5eb
Restore ansible --version output (#55728)
* Add custom action class for version info
* Use args from CLI as prog for ArgumentParser object
* Make prog a required parameter of create_base_parser() and update all uses to pass in the newly required parameter.
* Add unit test for checking ansible --version
* Update other related unit tests
5 years ago
The Magician 164ceb599b Bug fixes for GCP modules (#55358) 5 years ago
The Magician 50b72ec2b5 Bug fixes for GCP modules (#55359) 5 years ago
The Magician 6193658608 Bug fixes for GCP modules (#55360) 5 years ago
The Magician ef3607f1e7 Bug fixes for GCP modules (#55361) 5 years ago
The Magician 4a371ec84e Bug fixes for GCP modules (#55362) 5 years ago
Kevin Breit 274f6e4818 Removed legacy Digital Ocean tasks (#51786) 5 years ago
Martin Krizek 8e82baba4a
zfs: deprecate key=value 'option' (#55699)
* zfs: deprecate key=value 'option'

Fixes #55318

* Not needed to ignore these anymore
5 years ago
Matt Clay 149336319a
Clean up local_action and delegate_to in tests. (#55835)
* Remove unnecessary delegate_to in tests.

* Remove incorrect delegate_to in tests.

* Remove unnecessary use of local_action in tests.

* Remove incorrect use of local_action in tests.

* Remove unnecessary use of local_action in tests.

* Remove incorrect use of local_action in tests.

* Remove unnecessary use of local_action in tests.

* Use delegate_to instead of local_action in tests.

* Use setup_remote_tmp_dir instead of TMPDIR.
5 years ago
Matt Clay 2feda390b5 Fix ansible-test target change classification. 5 years ago
Matt Clay 03b2986227 Fix order integration test.
Previously the test always passed due to invoking cleanup on failure.
5 years ago
Matt Clay 272bb8da7a Fix test_postgresql dependency analysis. 5 years ago
Toshio Kuratomi b71133eeb5 Use LooseVersion instead of StrictVersion as StrictVersion doesn't understand "rc1" 5 years ago
Matt Martz 2732cde031
Support using importlib on py>=3 to avoid imp deprecation (#54883)
* Support using importlib on py>=3 to avoid imp deprecation

* Add changelog fragment

* importlib coverage for py3

* Ansiballz execute should use importlib too

* recursive module_utils finder should utilize importlib too

* don't be dumb

* Fix up units

* Clean up tests

* Prefer importlib.util in plugin loader when available

* insert the module into sys.modules

* 3 before 2 for consistency

* ci_complete

* Address importlib.util.find_spec returning None
5 years ago
Gonéri Le Bouder 6d645c127f vmware: import prepare_vmware_tests
The vmware test roles do a lot of similar operation to prepare
the environment. This role will be used to reduce the amount of
duplicated code.

The role can prepare an environment on a baremetal environment, this
in addition to vcsim.

Original PR: https://github.com/ansible/ansible/pull/54882
5 years ago
Chris Van Heuveln a568e018be nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images (#55615)
* nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images

This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image rejects 'no default-metric' configs, so we're skipping the idempotence
tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7, 7.0(3)I2

* simplify check for I7
5 years ago
Chris Van Heuveln 4d46f44ff2 nxos_snmp_traps:sanity: skip idempotency tests for I7 image bug (#55618)
This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image fails to enable some snmp trap link configs causing an idempotency failure in the sanity, so we're skipping the idempotence tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7.
5 years ago
Chris Van Heuveln 7ac28b25ff nxos_nxapi:configure:6k: Add platform excludes to test yamls (#55663)
`N6K` should be present wherever `N5K` is included/excluded.
5 years ago
Chris Van Heuveln 4798368b13 nxos_bgp_neighbor_af:sanity:6k: skip soft-reconfig 'always' test (#55661)
N5K / N6K do not support the `always` keyword on the `soft-reconfig in` configuration.
5 years ago
Chris Van Heuveln 91d187f780 nxos_snmp_host:sanity:6k: Add platform excludes for sanity tests (#55664)
N6K should be present wherever N5K is included/excluded.
5 years ago
Yuwei Zhou 0d3d002505 add resource group test (#55688) 5 years ago
Lars Kellogg-Stedman 35fdae7485 spelling: temaplte -> template (#55665)
Correct a common mis-spelling of 'template' including in the return
value of the lib/ansible/modules/cloud/cloudstack/cs_template.py
module.
5 years ago
Yuwei Zhou e77260a4fb Enable azure manged disk test (#55681) 5 years ago
René Moser e0ea5bb512
tests: vultr: fix tests due to vultr API changes (#55621) 5 years ago
René Moser 1705ef5f26
vultr_server: fix idempotency for private network and IPv6 options (#55619)
* vultr_server: fix idempotency for private network and IPv6 options

* add changelog
5 years ago
Matt Martz db6cc60352
Migrate command line parsing to argparse (#50610)
* Start of migration to argparse

* various fixes and improvements

* Linting fixes

* Test fixes

* Fix vault_password_files

* Add PrependAction for argparse

* A bunch of additional tweak/fixes

* Fix ansible-config tests

* Fix man page generation

* linting fix

* More adhoc pattern fixes

* Add changelog fragment

* Add support for argcomplete

* Enable argcomplete global completion

* Rename PrependAction to PrependListAction to better describe what it does

* Add documentation for installing and configuring argcomplete

* Address rebase issues

* Fix display encoding for vault

* Fix line length

* Address rebase issues

* Handle rebase issues

* Use mutually exclusive group instead of handling manually

* Fix rebase issues

* Address rebase issue

* Update version added for argcomplete support

* -e must be given a value

* ci_complete
5 years ago
Xaroth a9f24e097f Add ansible_parent_role_names magic variable (#46687)
-Add: Test cases for ansible_parent_role_names and ansible_parent_role_paths
-Add: ansible_parent_role_names/paths variables for when a role is being included by another role.
5 years ago
Brian Coca 780ee45819
ensure inventory plugin loading rel to play (#51177)
Ensure inventory plugin loading rel to play

  fixes #51033

*  clarify paths
* now adding dirs funciton in loader
* better warnings
* each cli should handle adding dirs depending on context
5 years ago
Jordan Borean 66493e47cf
ansible-test: Use psrp for 2008 host ci_complete (#55273)
* ansible-test: Use psrp for 2008 host ci_complete

* reset Shippable info back to default
5 years ago
Hannes Ljungberg 14c60e6ec8 docker_swarm_service: Use str type for configs/secrets gid/uid (#55591)
* Change type of secrets gid/uid to str
* Add changelog fragment

Co-Authored-By: hannseman <hannes@5monkeys.se>
5 years ago
Fred-sun 97b336767c update main.yml (#55550) 5 years ago
David Passante 9421a7fddf cs_loadbalancer_rule: add cleanup on unit tests (#55387) 5 years ago
Sloane Hertel afb5e02c19 preserve same order as inventory manager when using host lookup (#55331)
* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code
5 years ago
Felix Fontein c8a15b9dbc crypto modules: use module_utils.compat.ipaddress when possible (#55278)
* Use module_utils.compat.ipaddress where possible.

* Simplify reverse pointer computation.

* Use dummy for unused variables.

* Remove from ignore list.

* Adjust fix.

* Fix text handling for Python 2.

* Add changelog.
5 years ago
Alex Stephen e298de0986 GCP deprecations (#53355)
* gcdns_record deprecation

* gcdns_zone deprecation

* gcp_forwarding_rule deprecation

* gcp_url_map deprecation

* gcspanner deprecation

* gcp_healthcheck deprecation

* porting guide

* test failures

* forgot to rename

* deprecating

* porting guide changes

* unit test fixes

* changing ignores
5 years ago
Rui Moreira 10b02e17b9 Dms endpoint module (#54660)
* - initial commit for the modules and tests

* initial implementation based on ec2_asg

* docstring implemtation and further methods initial implementation

* refactoring and pylint changes

* further implementation and integration tests

* added examples and parameter documentation

* removed files that were essentially templates

* added waiter for delete and updated the tests

* removed unit test

* fixed pep8 failure

* fixed pep8 failure

* fixed pep8 password field issue

* fixed pep8 password field issue

* fixed syntax issues

* fixed pep8 defaults

* password property documentation was breaking yaml

* fixed pep8 defaults

* fixed lack of defaults for wait parameter

* added default to boolean parameter

* pep8 fix

* fixed author entry

* adding type to wait parameter

* adding type to wait parameter

* fixed linting issues

* updated description and removed default from docs

* added metaclass
changed default for boolean

* changed declared defaults

* - fixe the delete function
- solved the yaml syntax issue

* added missing defaults for timeout, retry and removed the one for endpointtype as it should be None, becasue parameter is Required anyway

* fixed RETURN documentation issue

* trying to fix the import placement error

* trying to fix the doc error for missing params

* pep8 issues

* added endpoint aliases

* - added documentation

* pep8

* changed to unsupported tag

* changed no_log fact to yes in the integration tests

* added suggested changes to the integration tests

* - making severname use resource_prefix as well as a more generic domain
- removing test fact
5 years ago
Jordan Borean 62badd76a5
win_service - simply env test (#55498) 5 years ago
Matt Clay 01a3048b98 Switch gitlab_hook test to non-deprecated name. 5 years ago
Felix Fontein 12d26eceb1 docker modules: make sure everything works with older docker-py versions (#55258)
* General test improvements.

* Adjust tests to older docker-py versions.

* docker_swarm_server_info: work around problems with older docker-py versions

* Bump minimal docker-py version for options network_filters and disk_usage.

* More general test improvements.

* Correct usage of docker_image.

* Put files into output directory.

* Speed up test.

* Remove old check.
5 years ago
Anatoly Pugachev de3bd8b791 extends linux cpuinfo test unit with sparc64 data (#55394)
* added debian sparc64 ldom cpuinfo

* updated linux data test unit with sparc64 cpuinfo
5 years ago
Martin Krizek f8bebc61c8
ansible-test yamllint: fix UnicodeDecodeError (#55364)
* ansible-test yamllint: fix UnicodeDecodeError

* Conditional fix
5 years ago
Abhijeet Kasurde dcbfa60413
Change to fix issue found while cloning template with opaque network (#55375)
Fixing Format issues in yml files. Check have failed

Signed-off-by: pgbidkar <pbidkar@vmware.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Martz bd0792397b Fix uri tasks (#55403)
* Fix uri tasks

* Fix apt task to install firewalld

* Fix invalid option in package_facts - ci_complete
5 years ago
Jordan Borean fdf9df89f5
psrp - Fix raw and script tests for connection plugin (#55357)
* psrp - Fix raw and script tests for connection plugin

* Fix error propagation with raw in psrp

* uncomment test
5 years ago
Jordan Borean 49655a452d
psrp - fix test_command rc for win_reboot (#55354) 5 years ago
Jordan Borean 33c2a9cea7
win_whoami - Fix tests to work over psrp (#55352) 5 years ago
Jordan Borean 15c331cb48
win_feature - get tests working on psrp (#55353) 5 years ago
Matt Martz 07443a2bcd
Address 2.9 uri deprecations (#55330)
* Address 2.9 uri deprecations. Fixes #55310

* Add changelog fragment
5 years ago
Matt Martz 9f83139dcb
Don't register tests as filters (#55332)
* Don't register tests as filters. Fixes #55319

* Remove tests for deprecated functionality

* Remove no-tests-as-filters sanity tests

* Remove docs too

* Revert "Remove docs too"

This reverts commit 7daf457a74.

* Make no-tests-as-filters doc an orphan
5 years ago
Sam Doran b4e83642c8
Properly reset timezone in user test when it was originally n/a (#55389) 5 years ago
Martin Krizek 4ec8599c38 apt: remove deprecated installed/removed aliases (#55338)
* apt: remove deprecated installed/removed aliases

Fixes #55311
5 years ago
Dag Wieers 9495ddbc21
ACI: Cleanup deprecated boolean behaviour (#55207)
* ACI: Cleanup deprecated boolean behaviour

* Remove from sanity ignore list
5 years ago
Anatoly Pugachev b28c73af62 Fixes solaris (sunos) uptime in ansible facts module (#54626)
* correct uptime on solaris by using system boot_time instead of snaptime
* add unit test
5 years ago
Jordan Borean 04cae4134f
Bump deps for ntlm-auth and PSScriptAnalyzer (#55269) 5 years ago
Matt Clay a8955b0c7c Revert "Disable hcloud tests until issues are resolved."
This reverts commit 216cd86cb8.
5 years ago
Matt Clay 2ef4ba3b4d Fix ansible-test unicode error with redact option. 5 years ago
Andrey Klychkov f8c47262c4 postgresql SSL related tests (#55288)
* postgresql SSL tests

* postgresql SSL tests, added link to officiall doc
5 years ago
Felix Fontein cb5c57bcd5 openssl_csr: fix idempotency problems (#55142)
* Add test for generating a CSR with everything, and testing idempotency.

* Proper SAN normalization before comparison.

* Fix check in cryptography backend.

* Convert SANs to text. Update comments.

* Add changelog.
5 years ago
MyronFanQiu 91e808eed2 azure_rm_subnet: fix CI error for deleting the azure_tags (#55276) 5 years ago
Matt Clay 7599229310 Rebalance Azure tests. 6 years ago
Felix Fontein d64b17731d docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings.

* Add changelog.

* Improve message.

* Improve formatting and formulation of other messages.

* Add test for warning.

* Trying double escaping.
6 years ago
Matt Clay 216cd86cb8 Disable hcloud tests until issues are resolved. 6 years ago
Matt Davis 837ea4b39f tag off long-running azure_rm_virtualnetworkgateway tests 6 years ago
Toshio Kuratomi a1c8fc37e8 Remove modules which have ended their deprecation cycle
* Remove code but leave the metadata so that they can be listed as
  removed in documentation.
* Remove removed modules from validate-modules ignore
* Remove unittests for the removed nodules
* Remove links to removed modules and add list of removed moduels to the
  2.9 porting guide
6 years ago
Toshio Kuratomi e5a31e81b6 Add a script to generate a new porting guide
* porting-guide.py is allowed to be Python-3.6+ as it will only be run
  by release engineers
6 years ago
Matt Clay a4d0c24bbf
Fix ansible-test inventory and vars path handling. (#55186)
* Fix ansible-test inventory and vars path handling.
* Improve explanation for missing commit.
6 years ago
Brian Coca 9f87552f06
add option to display per host start to default (#53819)
* add option to display per host start to default
6 years ago
Nathan Dines 5eb3117822 Added the OnFailure option to the AWS CloudFormation module (#52431)
* Added the OnFailure option to the AWS CloudFormation module

* Added unit tests for CloudFormation `on_create_failure`
6 years ago
Brian Coca e40832df84
become mixin is no more (#54002)
* become mixin is no more
  since sudo/su keywords are removed in 2.9 .. no need to keep this code around
 * also don't need test for code that is removed
 * made preprocess_data on base noop
   its not used by anything anymore, but kept for backwards compat since other methods of same name are used
6 years ago
Bob Boldin 9ddde6b27f AWS: add ec2_transit_gateway_info module (#54460)
* AWS: add ec2_transit_gateway_info module

* move info module test to main module and ensure unique description for parallel tests

* add type designators to module options in documentation

* assign results and return instead of exit.  Add elements directive available with ansible 2.8

* assign results and return instead of exit

* get() method superfluous for module.params

* correct return type in documentation for ASN and format the sample for Tag correctly

* added random uid to test description - removing unstable alias

* change random uuid to resource_prefix to improve source of object identification in testing
6 years ago
Andrey Klychkov d790285e80 postgresql_idx: improved doc, tests, remove useless lines from code (#55131)
* postgresql_idx: improve doc

* postgresql_idx: improve doc, removed unuseless rows from code

* postgresql_idx: misc doc fix

* postgresql_idx: moved common params where they were

* postgresql_idx: moved common params where they were 2
6 years ago
anasbadaha 2cc91e26e0 Adding Support For Vxlan In Onyx Switches (#55081)
* Adding Support For Vxlan In Onyx Switches

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 Failures in onyx_vxlan.py

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 Failures in onyx_vxlan phase 2

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Shippable failures

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Samer's Comments on PR

Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
Swartz, Nathan 5e3a7ec1f5 Improve netapp_e_volume module and add unit tests.
netapp_e_volume was refactored for maintainability and its documentation
was improved for better clarity.
6 years ago
Hannes Ljungberg 23d0d225f4 docker_swarm_service_info: Read information about swarm services (#55008)
* Add docker_swarm_service_info module

* Remove unused import

* Limit to retrieving info about one service

* Add exists return value

* Add yaml 3-dash

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Document return value as jinja `none´

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Name is required
6 years ago
Zim Kalinowski 5145473451
adding facts for Azure HDINsight cluster (#55124) 6 years ago
Matt Davis 1dc8436ed9
module_utils fixes in collections (#55118)
* module_utils fixes in collections

* fixed Windows module_utils in collections
* fixed more Python module_utils cases (from X import module)
* "medium style" Ansiballz modules now work properly with collections (ie, non-replacer but also not using basic.py)
* added more tests
* split Windows/POSIX exec

* sanity
6 years ago
anasbadaha 9bd060292e Adding New Model for Configure Buffer Pool on Onyx Switches (#55082)
* Adding New Model for Configure Buffer Pool on Onyx Switches

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 Failures in onyx_buffer_pool.py

Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
Yunge Zhu ed1334fbe3
add wait_for_running option in azure_rm_rediscache module (#54976) 6 years ago
Chris Archibald e12846f540 Update na_ontap_export_policy_rule to allow multiple rules to be set at once. (#54801)
* update

* add unit tests
6 years ago
Madhura-CSI fe31b7eddb New module for azure virtual network gateway (#44411)
* module for azure vpn gateway

* updating vng
6 years ago
Sam Doran c2be342ce1 Add podman_image and podman_image_info modules (#55103)
* Add podman_image and podman_image_info modules

* Add integration test for podman_image_info

* Change parameter names per feedback

* Add integration tests for podman_image
6 years ago
René Moser e28d08a3c1
cloudscale_server: implement param server_groups (#54868) 6 years ago
Chris Archibald c51f840faa Allow for multiple LIFS instead of 1 at a time (#54800)
* upload unit tests
6 years ago
Felix Fontein 7d2e4dd2fd ufw: fix default (again) (#55004) 6 years ago
Ondra Machacek af528bed80 inventory_plugins: Add kubevirt inventory plugin
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Gaudenz Steinlin a290cb4a35 Add cloudscale.ch API inventory plugin (#53517) 6 years ago
René Moser 166a33ef4d
cloudscale: new module cloudscale_server_group (#54901) 6 years ago
Matt Martz e89f8bae86
Extend jinja2 nested undefined support to keys/indices (#55094) 6 years ago
咚咔 72fc11ff13 Fix read vaulted toml inventory (#54226) (#54235) 6 years ago
Karolis Tamutis 54384e7a12 Make test-module use default value for interpreter (#54053)
* Make test-module use default value for interpreter

* Changing from static interpreter path to sys.executable as per #54053

* A little ntegration test for #54053
6 years ago
Lukas Kämmerling 3f579eb68f hcloud: Fix testsuite (#55076) 6 years ago
Andrey Klychkov a971a0eb80 New module postgresql_slot: Add or remove slots from a PostgreSQL database (#55079)
* New module postgresql_slot

* New module postgresql_slot: fixed sanity

* New module postgresql_slot: fixes

* New module postgresql_slot: fixes

* New module postgresql_slot: fix sanity
6 years ago
Andrea Tartaglia 0303ea2bfa openssl_pkcs12: Add idempotency checks (#54633)
* Added idempotency logic to openssl_pkcs12

Also decoupled the 'parse' and 'generate' function from the file write
as they are now used in different places that do not need the file to be
written to disk.

* Added idempotency tests for openssl_pkcs12

Also adds a new test for pkcs12 files with multiple certificates

* Regenerate if parsed file is invalid

* pkcs12_other_certificates check was wrong

* Updated ca_certificates to other_certificates

ca_certificates is left as an alias to other_certificates;
friendlyname depends on private key, so it will be ignored while
checking for idempotency if the pkey is not set;
idempotency check only checks for correct certs in the stack

* use different keys for different certs

* Added other_certificates in module docs

* Added changelog and porting guide

* removed unrelated porting guide entry

* renamed ca_cert* occurrence with other_cert
6 years ago
Matt Clay 5b133f3455 Compat fix for ansible-core-ci on Python 3.7. 6 years ago
Dag Wieers 025e9afe58 Windows pslint: Re-enable PSPossibleIncorrectComparisonWithNull (#55065)
* pslint fixes

* Fix up remaining sanity issues

* now fix silly errors I made
6 years ago
Jordan Borean 58e076b64c
Increase async timeout for psrp connection test (#55068) 6 years ago
Dag Wieers e6935a285b Allow pslint as user (#55066) 6 years ago
Abhijeet Kasurde 98692ab350
VMware: Add check for valid VLAN id range (#55023)
Check allows vmware_dvs_portgroup to fail early if user
specified invalid range in VLAN id(s).

Fixes: #54927

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde a62adaefa9
test: regex_ testcases (#54972)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Clay 3d9a9ec73f
Mark hcloud_ssh_key test disabled. (#55064) 6 years ago
Micah Hunsberger 2b049238d6 win_firewall_rule only change arguments passed by user (#54297)
* win_firewall_rule only changes specified arguments
defaults are controlled by com object
integration test for built in rule

* removed ignore psaliases for win_firewall_rule

* direction and action are no longer required
program and service respect default values
documentation updated to reflect that defaults apply to rule creation
added test to disable a rule and verify other values have not changed

* fixed extra whitespace

* Move each description sentance to a new entry
6 years ago
Matt Clay 365db9057c Mark hcloud_server_facts tests unstable. 6 years ago
Matt Clay 85ae8f5258 Add Hetzner Cloud to CI integration tests. 6 years ago
Rémy Léone 16c4df439a Migrate Scaleway tests to integration tests 6 years ago
Jordan Borean ebd4462c23
Fix tests for the psrp connection plugin (#55061) 6 years ago
Matt Davis 97446f0eca
Revert "Add a force_replace_host flag to win_domain_membership (#53542)" (#55056)
This reverts commit 85d836171b.

As discussed in WWG IRC meeting, we don't want Get-ADObject to be a dependency of win_domain_membership, and we need to be able to authenticate to the DC in some configs. We can revisit this change a different way for 2.9.
6 years ago
Felix Fontein df72317b29 Don't complain if type() is used. (#54849) 6 years ago
Matt Clay 5285044a7a Update Paramiko install during tests on RHEL 8. 6 years ago
Sam Doran 3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
6 years ago
Matt Martz fbf2d5d2f4
Don't pollute include_variables (#54687)
* Don't pollute include_variables. Fixes #51667. Fixes #54618.

* Rename include_variables to include_args, so we can make the distinction about what they are

* Track args and vars separately

* oops

* oops again

* linting fix

* Add test
6 years ago
Hideki Saito 377fba3d76 Fix handling of inventory and credential options for tower_job_launch (#54967)
- Fixed issue #25017,#37567
- Add example for prompt on launch
- Add integration test for prompt on launch

Signed-off-by: Hideki Saito <saito@fgrep.org>
6 years ago
Andrey Klychkov 5cbac14469 New module postgresql_owner: change ownership and reassign all db objects owned by role to another (#54984) 6 years ago
Raymond Roelands 8edae1bc61 updated tests and changelog for 54516 (#54670)
* updated tests and changelog for 54516

* Handle errors if PG does not support partitioning.

* Check for PG > 10 in tasks

* Show changes for partitioned tables in ansible

* Added documentation in the tests

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Update test/integration/targets/postgresql/tasks/postgresql_privs.yml

Co-Authored-By: raymondroelands <raymondroelands@users.noreply.github.com>

* Added check for 0 tables after revoking rights

* Added test and moved tests
Added check mode test and moved test right after the change.

* Rebased postgresql_privs.py
6 years ago
Felix Fontein bb52390b04 luks_device: add basic check mode (#54477)
* Add basic check mode.

* One more early exit.

* Fix naming.

* Check that device is actually an existing device.
6 years ago
Yunge Zhu cb2972d647
refine role modules (#55021) 6 years ago
Felix Fontein 0a0a2e47e0 Add openssl_csr_info module (#54921)
* Add openssl_csr_info module.

* Make OpenSSL < 1.1 compatible.

* Simply remove signature algorithm.

* Adjust minimal version.

* Fallback code for some pyOpenSSL < 16.0 versions.
6 years ago
Matt Clay d5707088b9 Mark ufw integration test unstable.
The test fails when run in the group, but not by itself.
6 years ago
Varun Chopra 4651bcf561 Add win_format (#53925)
* Add win_format

* Some doc changes were missed

* Fixes for ansible-test, additional assertion for check mode

* Fix -WhatIf issues

* Support for idempotency and changes to integration tests

* Fix trailing whitespace

* Fixes from review, and added check for non-empty volumes

* Remove an extra line

* Structural changes

* Minor fixes for CI
6 years ago
Sam Doran 6761fc1475
Update distro unit test (#55003)
Remove test comparing output to platform.linux_distribution() since we are relying on distro.id() and are not concerned about matching the output of platform.linux_distribution()
6 years ago
Matt Clay 58f4947ffe Fix apache shutdown in subversion test. 6 years ago
Felix Fontein 7d27348356 ufw: fix default, direction is not necessary for it (#54799)
* Correct behavior so that direction isn't required for default.
* Add more tests.
* 'disabled' values cannot be changed.
* Include 'not specified' in messages.
6 years ago
Chris Archibald c6f12eea32 push fix (#54916) 6 years ago
Robert Osowiecki 1532e31ec0 Allow all of yum version compare operators (#54603)
* Allow all of yum version compare operators

* * yum: name="foo >= VERSION" integration test
* changelog fragment
6 years ago
Felix Fontein 221da3e8b1 Implement Ed25519, Ed448, X25519 and X448 support (cryptography backend). (#54947) 6 years ago
Felix Fontein 7a16703dff Add openssl_privatekey_info module (#54845)
* Add openssl_privatekey_info module.

* Addressing review feedback.

* Update docs.

* Update tests.

* Work around too broad sanity checks.

* ...

* Don't die when None is returned.

* Use OpenSSL to extract RSA and DSA key data.

* Extend tests.

* Make OpenSSL code compatible to OpenSSL < 1.1.

* Rewrite tests to use result dicts instead of result lists.

* Skip ECC for too old PyOpenSSL.

* Reformulate.

* Improve return_private_key_data docs.

* Rename path_content -> content.

* Add sample.

* Cleanup.

* Add key consistency check.

* Improve description.

* Adjust minimal version.

* Fallback code for some pyOpenSSL < 16.0 versions.

* Also support Ed25519 and Ed448 keys (or not).

* Add more consistency checks.

* Verify DSA keys manually.

* Improve DSA key validation.

* Forgot one condition.

* Make validation more robust.

* Move generic arithmetic code to module_utils/crypto.py.
6 years ago
Anil Kumar Muraleedharan f5d97205a0 The module fails on switchport. Check added to fix. (#54970) 6 years ago
Zim Kalinowski ea609c3492
adding plan and container settings to function app (#54830) 6 years ago
Felix Fontein b92281fe70 Simplify test include. (#54962) 6 years ago
William Leemans 993727ff5e New module: xfs_quota (#51654)
* New module: xfs_quota

* wildcard import resolution

* pep8 fixes

* validate-modules fixes

* pep8 and validate-module fixes

* removal of extra copyright info

* description capitalization and trailing dot

* Some more description

* type specification

* removal of notes

* reorder imports

* sorting

* starting with variable type

* removal of defaults

* results to dict

* results to dict

* complete condition

* removal of spaces for pep8 compliancy, removal of root check, addition of tests for failed xfs_quota commands indicating the need for elevation/capabilities

* lost result

* typo

* historical override removal

* report back values

* unexpected spaces removal

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* typo

* raw data, full data

* removal of several else: statements and indentation

* pep8

* typo

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* typo

* use bytes as base, not kilobytes

* be consistent

* integration tests

* lint

* empty lines

* Update lib/ansible/modules/system/xfs_quota.py

Co-Authored-By: bushvin <bushvin@users.noreply.github.com>

* updates

* ci group

* XFS not supported on osx

* XFS not supported by freebsd

* long lines and removal of xfs_quota dict in return

* RETURN values

* no more xfs_quota dict
6 years ago
Bruno Inec c637104078 Allow Netbox device modification (#53631)
* netbox_device: Allow device modification

* Add ability to update and existing device
* Allow check_mode
* Fail when device name is missing
* Fail when cannot resolve ID instead of taking ID 1 by default

* netbox_device: Add diff output

* netbox: Some refactoring

* Add diff output and check_mode to netbox_ip_address
* Deduplicate redundant code into netbox_utils

* netbox_utils: A few unit tests
6 years ago
Matt Clay a4c42ba687
Update the default test container to 1.7.0. (#54930)
* Update the default test container to 1.7.0.
* Run `pip check` after installing test requirements.
* Support older versions of pip.
* Remove obsolete pip error handler.
6 years ago
Anil Kumar Muraleedharan c2958df3a4 Removing provider from facts, command and config (#54623) 6 years ago
Matt Clay 4b3662605d Limit supervisor in tests to < 4.0.0.
Tests fail when using version 4.0.0.
6 years ago
Matt Clay ab7f810874
Only use Paramiko in tests when needed. (#54826) 6 years ago
Matt Clay c309570540 Start dbus when setting up postgresql tests. 6 years ago
Matt Davis 2b9b5f5bb7
fix rediscache/firewall tests (#54933)
* cleaned up tagging to prevent long-running tasks in CI
6 years ago
Lukas Kämmerling 22e1f33f5e Add rebuild server functionality (#54899) 6 years ago
Matt Clay dd09a9a9fd Install EPEL on RHEL using RPM from S3. 6 years ago
Matt Clay c846501829 Increase unit test timeout for --coverage. 6 years ago
Felix Fontein 65d7f0d17b Add openssl_certificate_info module (#54709)
* Add certificate_info module.

* Improve normalization.

* Add extension dump.

* Add support for basic_constraints and ocsp_must_staple.

* Update docs.

* Add serial number.

* Remove superfluous code.

* Fix formulation.

* Improve examples.

* Improve result docs.

* Forgot to add tests.

* Adjust when no fingerprints can be computed.
6 years ago
Jordan Borean 10a9cf59dd
Added win_http_proxy and win_inet_proxy (#54631)
* Added win_http_proxy and win_inet_proxy

* Fix up docs sanity issues

* removed duplicate doc entry

* Fix docs issues and fix for empty proxy

* Removed <-loopback> for win_http_proxy

* doc changes from review
6 years ago
Felix Fontein 14b3b3a95e openssl_certificate now has cryptography backend (#53924). (#54880) 6 years ago
Felix Fontein 8cba1f9397 docker_network: add IPAM driver options support (#54632)
* Tidying up.

* Adding ipam_driver_options parameter.

* Add tests.

* Add changelog.
6 years ago
Matt Clay f0480ab132
Fix timezone test for newer Fedora containers. (#54874) 6 years ago
Brian Coca bda541fa0d
fix missing attribs with dirct module execution (#53875)
* fix missing attribs with dirct module execution
* also make remote tmp handling smarter
 update tests
* set default if attrib does not exist
* add simple test
6 years ago
Andrey Klychkov 2fbac8948d postgresql_idx: added CI tests for check_mode, rewrite code related with check_mode, misc fixes (#54848)
* postgresql_idx: added CI tests, misc fixes

* postgresql_idx: fix sanity
6 years ago
Andrey Klychkov 3eff72e886 postgresql_user: fix doc formatting, added return value, aliases, misc code changes (#54768)
* postgresql_user: refactoring

* postgresql_user: removed line from ignore.txt

* postgresql_user: removed lines from ignore.txt

* postgresql_user: removed lines from ignore.txt, fixes

* postgresql_user: removed lines from ignore.txt, fixes

* postgresql_user: removed lines from ignore.txt, fixes
6 years ago
zhongjun2 d16452bc8f Added smn module (#54793) 6 years ago
Matt Clay 51829303d2 Rebalance Azure tests. 6 years ago
Matt Clay 414ac12ddd Add work-around for scp issue in tests. 6 years ago
Zim Kalinowski 69ca89858c
Renaming azure_rm_managed_disk for consistency (#54825) 6 years ago
Sam Doran 6ce9cf7741
Change default smart connection to ssh on macOS and remove paramiko from requirements.txt (#54738)
* Remove default use of paramiko connection plugin on macOS
    This fix was originally to work around a bug that caused a kernel panic on macOS
    that has since been fixed.
* Remove paramiko from requirements.txt
* Move paramiko checking to common place
* Drop the warnings obfiscation code
* Update pip installation instructions to reflect upstream instructions
* Fix tests on CentOS 6 (Python 2.6) that now show Python deprecation warnings
* Add changelog fragment
6 years ago
Matt Clay 9776037abe Disable failing azure_rm_webapp test. 6 years ago
Claes Nästén 339f6cfcd1 NSO modules now work as expected with NSO 5.X (#54766)
Update NSO modules for NSO 5.0 which change how prefix mapping is made
as a single prefix can have multiple meanings depending on device
being managed
6 years ago
Federico87 48e83c39ba ASA network/service object-group module (#52925)
* add asa_og module

* add test

* fix pep8

* fix some sanity pylint

* fix import error order

* fix import

* replace cmd() method

* rename file and class

* add mock for connection

* fix commands in  replace test function

* fix lines list

* update unit test

* fix 'and' logic for port-object command

* restore previous unit test; fix pep8 and remove debug

* other unit tests

* Add state present, absent, replace

* Update doc; add default for state

* update unit test with state present/absent

* fix typo in unit test

* fix pep8 too many blank lines

* fix show run for service object ASA Ver 8.x

* Add description field; fix bug for state present and absent

* Re-designed module structure for network, service and port objects

* update integration test for new module structure

* fix pep8

* update EXAMPLES and RETURN

* update units tests

* fix module typos in unit test

* removed provider from examples

* fix missing comma in replace test

* fix module name and remove provider

* update license

* remove register; update license; change import order; chage def state

* remove shebang

* fix doc default state

* change import order

* Update year in banner

* fix integration test as set of tasks

* remove arg_spec

* remove extends_documentation_fragment: asa

* Update DOC, remove unused import, change import order
6 years ago
Martin Krizek d15812fabf
Fix copy module to reset filesystem acls (#51868)
The controller's fixup_perms2 uses filesystem acls to make the temporary
file for copy readable by an unprivileged become user. On Python3, the
acls are then copied to the destination filename so we have to remove
them from there.

We can't remove them prior to the copy because we may not have
permission to read the file if the acls are not present. We can't
remove them in atomic_move() because the move function shouldn't know
anything about controller features. We may want to generalize this into
a helper function, though.

Fixes #44412

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Zim Kalinowski 4f0ad57934 renaming info -> facts (#54573) 6 years ago
Yunge Zhu a387b8e239
add vnet peering facts module (#53942) 6 years ago
Matt Clay 9e30300034 Add 6th Windows CI group. 6 years ago
Zim Kalinowski 73286ceca5 fixing azure_rm_devtestlab* test (#54716) 6 years ago
Zim Kalinowski 138fc11ee0 fixing role definition test (#54715) 6 years ago
Fred-sun 3694711a7e Update azure_rm_managed_disk.py --add zones (#53788) 6 years ago
Matt Clay c8f2becb7a Reduce testing of Ubuntu versions.
Removing:

- Ubuntu 14.04 with Python 2.7
- Ubuntu 16.04 with Python 3.5

Keeping:

- Ubuntu 16.04 with Python 2.7
- Ubuntu 18.04 with Python 3.6
6 years ago
Steve Bonds 524160d8d1 Fetching a test file, not the motd file (#54739) 6 years ago
Jordan Borean b13fa0d408
Ansible.Basic - event log perm fix and no_log improv (#54699)
* Ansible.Basic - event log perm fix and no_log improv

* Still log other failures
6 years ago
Jordan Borean 8b1b22ddc7
Bump dependency versions to avoid conflicts (#54443)
* Bump dependency versions to avoid conflicts

* Fix module code to support newer SDK packages

* Fix keyvault module are upgrading deps
6 years ago
Andrey Klychkov 40f65a54ec Postgresql privs reformat (#54717)
* postgresql_privs: fix doc format, pgutils

* postgresql_privs: added pgutils, ret value

* postgresql_privs: fix test

* postgresql_privs: fixes

* postgresql_privs: fixes

* postgresql_privs: fixed CI
6 years ago
Sam Doran 579e72573a Add BusyBox support to group module (#54689)
* Add BusyBox support to group module

* Use bytes when reading/writing to file
6 years ago
Matt Clay d01c1599b0 Remove redundant requirements from test. 6 years ago
Jordan Borean c40f41d519
win_credential - fix encoding for text based secrets (#54695)
* win_credential - fix encoding for text based secrets

* Fix py2 encoding issues
6 years ago
Christopher Schmitt cafd124288 Add ssh key facts for hcloud (#54518)
* Add ssh_key facts

* Fix documentation
6 years ago
Lukas Kämmerling 72f1e4b83a Add hcloud_volume_facts (#54666)
* Add hcloud_volume_facts

* Fix server name
6 years ago
Chris Archibald ec03ddd336 Multiple fixs for na_ontap_user (#54610)
* Fix ontap user for 9.1

* fix bugs:

* update unit tests
6 years ago
Łukasz Szczęsny bcdd1dc951 pamd: fix idempotence issue when removing rules (#54105) 6 years ago
Andrey Klychkov 48ec8d13a0 postgresql_lang module: fixed doc formatting, added aliases, pg_utils, added missing CI tests (#54672)
* postgresql_lang: fixed doc

* postgresql_lang: add pg_utils

* postgresql_lang: added return value - queries

* postgresql_lang: added CI tests

* postgresql_lang: restricted CI using CentOS

* postgresql_lang: fixed typos in CI comments
6 years ago
Vitalii Kostenko 2176b53a55 Add latest updates from FTD Ansible downstream repository. (#53638)
* Add latest updates from FTD Ansible downstream repository.
 - add a better implementation of the upsert operation;
 - add API version lookup functionality;
 - add filter which remove duplicated references from the list of references;
 - fix minor bugs.

* fix issues outlined by ansibot

* fix argument name for _check_enum_method
6 years ago
Hannes Ljungberg e58f23b73e docker_swarm: Return UnlockKey (#54490)
* Return UnlockKey

* Add changelog fragment

* Add method to check if a parameter exists in diffs

* Add method to get swarm unlock key

* Add option unlock_key

* Only return unlock key when created or changed

* Rename difference check

* Extend unlock key example

* Assert that unlock_key is a string

* Fix docker_swarm_info authors

* Don’t silence APIErrors

* Test unlock_key on unlocked swarm

* Catch APIError when retrieving unlock key

* Better return value description

* Lint

* Fix UnlockKey return value documentation

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Get unlock key safely

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Return None on empty UnlockKey

* Assert swarm_unlock_key is undefined if unqueried

* Add documentation about swarm_info unlock_key

* Add change log fragment for unlock_key option

* Revert "Add change log fragment for unlock_key option"

This reverts commit e3cb2325b5.

* Use generator expression instead

* Restart docker more decisively

* Use systemctl kill

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Try to restart docker daemon
6 years ago
Jakob Ackermann 21c8650180 openssh_cert: add serial_number param (#54653)
* [openssh_cert] cleanup the returned certificate info

- Drop the certificate path - it is already present in rc.filename.
- Drop the leading whitespace for all lines.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [openssh_cert] add support for a certificate serial number

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [openssh_cert] fix lint error

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [openssh_cert] drop explicit default value

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [openssh_cert] enforce the specified or missing serial number

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [openssh_cert] passing no explicit serial number ignores any present one

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
6 years ago
Lukas Kämmerling f99d1b3e47 Add hcloud_floating_ip_facts module (#54667) 6 years ago
Yunge Zhu 23670913ba
support application security group in network security group (#54584) 6 years ago
Zim Kalinowski c85e3e0794
Fix for function app settings (#54662) 6 years ago
Yunge Zhu 11e3cc3cab
add azure_rm_rediscache reboot/regenerate key (#54572) 6 years ago
Zim Kalinowski f9877fca18
Rename inconsistent azure_rm_virtualmachine_scaleset modules (#54579)
@yungezz yes, i remember. pls keep in mind that they are not broken
6 years ago
James E. King III 97e7266633 azure_rm_managed_disk additional disk types (#54644) 6 years ago
René Moser 01f63ee871
cloudstack: fix E326 (#54657)
* cloudstack: remove choice list for hypervisor param

* cloudstack: streamline network_type with returned value by the API

* cloudstack: remove E326

* add changelog fragment
6 years ago
Hannes Ljungberg 833512b07c docker_swarm: Add support for default_addr_pool and subnet_size (#54642)
* Add support for default_addr_pool and subnet_size

* Add changelog fragment

* Document options only used on init / join
6 years ago
Micah Hunsberger 26d9341891 Add new windows module: win_hosts (#46450)
* Add win_hosts module

added win_hosts module for easier manipulation of hosts entries in "%windir%\system32\drivers\etc\hosts" for windows systems

* Update win_hosts.py

* Add alias support to win_hosts module (#1)

* win_hosts supports aliases

added support for adding / removing aliases from a host entry, rather than adding a new entry

added ability for win_hosts to detect aliases:
`192.168.1.1 alias1 alias2 alias3`
```
win_hosts:
  host_name: alias2
  ip_address: 192.168.1.1
```
will result in `192.168.1.1 alias1 alias3`

also includes `replace` and `add` as options for `ip_action` (`replace` is default)

for example:
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
with
```
win_hosts:
  host_name: my_reused_alias
  ip_address: 192.168.1.3
  ip_action: add
```
the result will be
```
192.168.1.1 my_reused_alias
192.168.1.2 my_reused_alias
```
but with `ip_action=replace` the result would be
```
192.168.1.3 my_reused_alias
```

* fixed metadata version and version added

* fix line endings

* upload fixed line endings

try to upload the file with the fixed line endings

* aliases and canonical names are separate entities. added IPv4 and IPv6 validation

* only makes changes if "check_mode" is false

* improved behavior for duplicate aliases/entries.

* adding tests

* missing aliases file

* fix trailing whitespace and uses explicit paths

* Tweak tests to copy and restore original hosts file
6 years ago
Kevin Subileau 09979e899f win_nssm: refactor to fix issues, support check mode and add more features (#45693)
* win_nssm: rename cmdlets to use approved verbs, rename service name parameters

* win_nssm: improve code style and cmdlets ordering

* win_nssm: always escape all command line parameters with Argv-ToString

fix error when the service name contains quotes

* win_nssm: use Fail-Json instead of exceptions and remove global try/catch

* win_nssm: small refactoring, inline some functions

* win_nssm: refactoring - add a generic cmdlet to idempotently set any nssm service parameter

* win_nssm: refactoring - inline some functions

To make the code more malleable for future changes

* win_nssm: change application, stdout_file and stderr_file options type to path

* win_nssm: deprecates app_parameters, rename app_parameters_free_form to arguments, and add support for list of parameters

* win_nssm: add support of check mode

* win_nssm: add working_directory option

* win_nssm: add display_name and description options

* win_nssm: minor changes

* win_nssm: remove some sanity exclusions

* win_nssm: avoid using aliases and minor style fixes

* win_nssm: doc and ui improvements

* win_nssm: remove sanity exclusions

* win_nssm: minor revision

* win_nssm: deprecates dependencies, start_mode, user and password parameters and some choices of state in favor of win_service

* win_nssm: fix style

* win_nssm: add executable option to specify the location of the NSSM utility

* win_nssm: add missing parameter types

* win_nssm: add diff mode support

* win_nssm: avoid displaying depreciation warning if default value is assigned

* win_nssm: fix variable scope

* win_nssm: use the explicit -LiteralPath parameter name instead of -Path

* win_nssm: fix documentation

* win_nssm: add porting guide entries

* win_nssm: add changelog fragment
6 years ago
David Passante eff1f8851c cloudstack: streamline modules doc (part 6) (#54641)
* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* validate-module errors fixes
6 years ago
Wojciech Wypior 6a27e308dd BIGIP: deprecates TMOS v11.x support for GTM modules (#54543)
* deprecates TMOS v11 support for GTM modules

* correct version

* correct version
6 years ago
zhongjun2 5599b0484f cloud: huawei: Add new module hwc_network_vpc (#54102) 6 years ago
Felix Fontein 188903448a openssl_*: add backup option (#54294) 6 years ago
Felix Fontein 90c067e947 openssl_* modules: private key errors (#54088)
* Improve error handling, in particular with respect to private key loading problems.

* Add tests to validate that modules regenerate invalid input and don't crash.

* Don't crash when input is invalid.

* Create 'better' broken input.

* Fix paths.

* Simplifying pyOpenSSL error handling.
6 years ago
Matt Clay 9e1c99ed60
Enable ec2_transit_gateway test in CI. (#54619)
* Enable ec2_transit_gateway test in CI.

* Mark the test unstable.

The test sometimes attempts to delete the transit gateway while it
is in the pending state, which is not permitted.
6 years ago
Patryk D. Cichy 6b3246164c Enable adding VLAN IP ranges for Physical Networks (#54576) 6 years ago
Matt Clay e59c1854eb Remove invalid test alias. 6 years ago
Andrey Klychkov 349a0dccee New module postgresql_table - create postgresql table on remote host (#52077)
* New module postgresql_table - create postgresql table on remote host

* New module postgresql_table - fix tests

* New module postgresql_table - fix tests

* New module postgresql_table - fix tests

* New module postgresql_table - fix a typo

* New module postgresql_table - change columns and params to type str

* New module postgresql_table - fix columns type

* New module postgresql_table - added pg_quote_identifier

* New module postgresql_table - removed unused lib

* New module postgresql_table - query -> queries

* New module postgresql_table - test improvement

* New module postgresql_table - fixed tests for PG 9.0

* New module postgresql_table - fixes

* New module postgresql_table - fixes
6 years ago
David Passante b0d0a3a2f8 cs_service_offering: Implement customizable compute offers (#54597) 6 years ago
Dag Wieers 2ef0946370
Warn on incorrect use of parameter, and remove fix for now (#54336)
* Fix wrong example, remove strictness and fix tests

It was obvious that (because of an incorrect example) people were using
the **xml** module incorrectly, specifying the `attribute` parameter
where it was not supported (i.e. ignored).

While this functionality would have been useful, it currently returns as
if the information was requested from the parent, so we cannot simply
make it to what would be expected.

Therefor the real solution is to provide a warning when we find
incorrect use, and deprecate this use. Then later we could implement
this functionality correctly.

While troubleshooting this issue, I found that in some cases our
integration tests were not being run when we expected it.

This fixes #53459

* Change warning

* Fix weird sanity test error

* Add a comment to the deprecate-test
6 years ago
Kevin Breit b3e85b76d7 New module - meraki_static_route (#49271)
* Initial commit for static route module
- Create and query functionality in place today

* Enabled querying both all routes and single route

* Bug fixes and idempotency check
- Requires new idempotency code to validate, blocking on that

* Enabled test cases

* Documentation fixes

* Whitespace fix

* Major improvements based on Dag's commments
- Improved documentation and examples
- Fixed fixed IP assignments and reserved range parameters
- Improved integration tests
- Made check mode work

* Rename str to string in documentation

* Move back to str

* Fix indentation

* Fix documentation for example of fixed_ip_assignments
- Removed default=None for args
6 years ago
Kevin Breit d16dcb8dbb meraki_device - Support for creating and modifying device notes (#51100)
* Add support for notes

* Add test for notes

* Device notes changes
- Renamed from notes to note
- Modified tests to work

* Comment device test since it only works once

* Remove assertion stanza and move assertion to existing one

* Add version_added to note documentation

* Converted from tabs to spaces

* Added changelog fragment

* Remove changelog file since it's a feature

* Add changelog fragment
6 years ago
Kevin Breit c30bc24ba9 Create untested task to enable a syslog server (#53125) 6 years ago
Andrey Klychkov 459a8156f5 New module postgresql_membership: Add or remove PostgreSQL roles from groups (#53733)
* New module postgresql_membership: initial

* New module postgresql_membership: fixed sanity
6 years ago
Evgeniy Krysanov a6a73594ec Add Bitbucket Pipelines SSH key pair module (#54241)
* Add module to manage Bitbucket Pipelines key pairs

* Rename module bitbucket_pipelines_ssh_key to bitbucket_pipeline_key_pair

* Update `version_added` documentation field

* Cosmetic changes

* Apply suggestions from code review

Co-Authored-By: catcombo <evgeniy.krysanov@gmail.com>
6 years ago
Yury V. Zaytsev c914df354b Add Bitbucket access key module (#54592)
* Add Bitbucket access key module

* Add Bitbucket access key tests

* Remove superseded `bitbucket_deploy_key` module

* Apply suggestions from code review
6 years ago
Evgeniy Krysanov 655d35cd06 Add Bitbucket Pipelines known host module (#54238)
* Add module to manage Bitbucket Pipelines "Known Hosts"

* Rename bitbucket_pipelines_known_host to bitbucket_pipeline_known_host

* Rename `hostname` module param to `name`

* Rename `public_key` module param to `key`

* Fix documentation `version_added` tag

* Remove suppression of deprecation warnings

* Added check availability of package `paramiko`

* Make `paramiko` package optional if `key` is present

* Apply suggestions from code review

Co-Authored-By: catcombo <evgeniy.krysanov@gmail.com>

* Add error messages for invalid username or repository

* Add detection of public key type for key passed as parameter

* Restore Python 2 compatibility

* Fix error message wording
6 years ago
Jordan Borean 2750f39391
PS AddType - Add the ability to supply custom compile symbols for C# code (#54582) 6 years ago
Zim Kalinowski bce75824b1
proper name for aks version facts (#54578) 6 years ago
David Passante 7f57d88f00 cloudstack: streamline modules doc (part 5) (#54523) 6 years ago
Matt Clay 8d96af2df5
Use correct python for -c invocations in tests. (#54577)
* Use correct python for -c invocations in tests.
* Only set releasever when available.
6 years ago
Zim Kalinowski af2e5fc761
Renaming inconsistent module name (#54513) 6 years ago
Matt Clay 20ac19bf2e Test FreeBSD 12.0 with Python 3.x by default. 6 years ago
Yuwei Zhou 8c3dca7e7b Add azure servicebus module (#51320) 6 years ago
Matt Clay b6d30a5825 Fix xml test version check. 6 years ago
Matt Clay 5f29058941 Fix xml test on FreeBSD with Python 3.x. 6 years ago
Matt Clay e2e27ca192 Fix postgresql test on FreeBSD with Python 3.x. 6 years ago
Matt Clay 5eb9fa90f4
Fix pull test on FreeBSD with Python 3.x. (#54565) 6 years ago
Matt Clay 2a9e6e4282 Fix git test on FreeBSD with Python 3.x. 6 years ago
Matt Clay 2434abaaf7
Fix git test on FreeBSD with Python 3.x. (#54560) 6 years ago
Matt Clay 86268b09a1 Support ansible-galaxy test on FreeBSD Python 3.x. 6 years ago
Patryk D. Cichy 43514e9d93 Add a new CloudStack module - cs_traffic_type (#54451)
* Add get_physical_network to AnsibleCloudStack

* Add new module cs_traffic_type
6 years ago
David Passante 601d20117d cs_service_offering: update params in arg spec and documentation (#54511)
* cs_service_offering: update params in arg spec and documentation

* fix documentation formatting error
6 years ago
Matt Davis f86345f777
Collection content loading (#52194)
* basic plugin loading working (with many hacks)

* task collections working

* play/block-level collection module/action working

* implement PEP302 loader

* implicit package support (no need for __init.py__ in collections)
* provides future options for secure loading of content that shouldn't execute inside controller (eg, actively ignore __init__.py on content/module paths)
* provide hook for synthetic collection setup (eg ansible.core pseudo-collection for specifying built-in plugins without legacy path, etc)

* synthetic package support

* ansible.core.plugins mapping works, others don't

* synthetic collections working for modules/actions

* fix direct-load legacy

* change base package name to ansible_collections

* note

* collection role loading

* expand paths from installed content root vars

* feature complete?

* rename ansible.core to ansible.builtin

* and various sanity fixes

* sanity tweaks

* unittest fixes

* less grabby error handler on has_plugin

* probably need to replace with a or harden callers

* fix win_ping test

* disable module test with explicit file extension; might be able to support in some scenarios, but can't see any other tests that verify that behavior...

* fix unicode conversion issues on py2

* attempt to keep things working-ish on py2.6

* python2.6 test fun round 2

* rename dirs/configs to "collections"

* add wrapper dir for content-adjacent

* fix pythoncheck to use localhost

* unicode tweaks, native/bytes string prefixing

* rename COLLECTION_PATHS to COLLECTIONS_PATHS

* switch to pathspec

* path handling cleanup

* change expensive `all` back to or chain

* unused import cleanup

* quotes tweak

* use wrapped iter/len in Jinja proxy

* var name expansion

* comment seemingly overcomplicated playbook_paths resolution

* drop unnecessary conditional nesting

* eliminate extraneous local

* zap superfluous validation function

* use slice for rolespec NS assembly

* misc naming/unicode fixes

* collection callback loader asks if valid FQ name instead of just '.'
* switch collection role resolution behavior to be internally `text` as much as possible

* misc fixmes

* to_native in exception constructor
* (slightly) detangle tuple accumulation mess in module_utils __init__ walker

* more misc fixmes

* tighten up action dispatch, add unqualified action test

* rename Collection mixin to CollectionSearch

* (attempt to) avoid potential confusion/conflict with builtin collections, etc

* stale fixmes

* tighten up pluginloader collections determination

* sanity test fixes

* ditch regex escape

* clarify comment

* update default collections paths config entry

* use PATH format instead of list

* skip integration tests on Python 2.6

ci_complete
6 years ago
Sam Doran 023c5167fd Revert "Use locking for concurrent file access (#52567)" (#54547)
This reverts commit e152b277cf.
6 years ago
Gonéri Le Bouder fc3064471b virt_net: idempotency of create/stop actions (#53276)
Currently, if we try to stop or start a network two time in a row, the
second call will fail. With this patch:

- we don't recreate a network, if it exists
- we only stop a network if it's active, and so we avoid an exception
  saying the network is not active

* test: mock libvirt

* add integration tests for virt_net

* test: enable virt_net test on RedHat 7 and 8

* ci: use the unsupported alias

* tests that require privileged mode are run in VM

* virt_net/create raise unexpected libvirt exception

* import mock from units.compat

* virt_net: do not call create() on "active" network

* virt_net func test: only clean up the libvirt packages

* test: virt_net: don't use assert_called()

* virt_net: add the destructive alias

* move the test in virt_net dir

* test/virt_net: clean up the network at the end
6 years ago
Felix Fontein 91eed74ac3 Stop using ca_certs alias. (#54507) 6 years ago
Anil Kumar Muraleedharan 82d26c8c93 Lenovo cnos vrf (#54188)
* Adding module cnos_vrf to manage VRF Configurations.

* Update cnos_vrf.py

* Adding Functional Tests, Unit Tests and Bug Fixes.

* Fixing discrepancy in description against sample

* Review comments incorporated

* Review comments 2 Done

* Update basic.yaml

* Update test_cnos_vrf.py

* Review comments 3
6 years ago
Matt Clay c007422d05 Fix OpenSSL tests on FreeBSD with Python 3.x. 6 years ago
Yunge Zhu 9e42038747
add new module: azure_rm_rediscachefirewallrule (#53161) 6 years ago
James Cassell bc4ef99533 standardize TLS connection properties (#54315)
* openstack: standardize tls params

* tower: tower_verify_ssl->validate_certs

* docker: use standard tls config params

- cacert_path -> ca_cert
- cert_path -> client_cert
- key_path -> client_key
- tls_verify -> validate_certs

* k8s: standardize tls connection params

- verify_ssl -> validate_certs
- ssl_ca_cert -> ca_cert
- cert_file -> client_cert
- key_file -> client_key

* ingate: verify_ssl -> validate_certs

* manageiq: standardize tls params

- verify_ssl -> validate_certs
- ca_bundle_path -> ca_cert

* mysql: standardize tls params

- ssl_ca -> ca_cert
- ssl_cert -> client_cert
- ssl_key -> client_key

* nios: ssl_verify -> validate_certs

* postgresql: ssl_rootcert -> ca_cert

* rabbitmq: standardize tls params

- cacert -> ca_cert
- cert -> client_cert
- key -> client_key

* rackspace: verify_ssl -> validate_certs

* vca: verify_certs -> validate_certs

* kubevirt_cdi_upload: upload_host_verify_ssl -> upload_host_validate_certs

* lxd: standardize tls params

- key_file -> client_key
- cert_file -> client_cert

* get_certificate: ca_certs -> ca_cert

* get_certificate.py: clarify one or more certs in a file

Co-Authored-By: jamescassell <code@james.cassell.me>

* zabbix: tls_issuer -> ca_cert

* bigip_device_auth_ldap: standardize tls params

- ssl_check_peer -> validate_certs
- ssl_client_cert -> client_cert
- ssl_client_key -> client_key
- ssl_ca_cert -> ca_cert

* vdirect: vdirect_validate_certs -> validate_certs

* mqtt: standardize tls params

- ca_certs -> ca_cert
- certfile -> client_cert
- keyfile -> client_key

* pulp_repo: standardize tls params

remove `importer_ssl` prefix

* rhn_register: sslcacert -> ca_cert

* yum_repository: standardize tls params

The fix for yum_repository is not straightforward since this module is
only a thin wrapper for the underlying commands and config.  In this
case, we add the new values as aliases, keeping the old as primary,
only due to the internal structure of the module.

Aliases added:
- sslcacert -> ca_cert
- sslclientcert -> client_cert
- sslclientkey -> client_key
- sslverify -> validate_certs

* gitlab_hook: enable_ssl_verification -> hook_validate_certs

* Adjust arguments for docker_swarm inventory plugin.

* foreman callback: standardize tls params

- ssl_cert -> client_cert
- ssl_key -> client_key

* grafana_annotations: validate_grafana_certs -> validate_certs

* nrdp callback: validate_nrdp_certs -> validate_certs

* kubectl connection: standardize tls params

- kubectl_cert_file -> client_cert
- kubectl_key_file -> client_key
- kubectl_ssl_ca_cert -> ca_cert
- kubectl_verify_ssl -> validate_certs

* oc connection: standardize tls params

- oc_cert_file -> client_cert
- oc_key_file -> client_key
- oc_ssl_ca_cert -> ca_cert
- oc_verify_ssl -> validate_certs

* psrp connection: cert_trust_path -> ca_cert

TODO: cert_validation -> validate_certs (multi-valued vs bool)

* k8s inventory: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* openshift inventory: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* tower inventory: verify_ssl -> validate_certs

* hashi_vault lookup: cacert -> ca_cert

* k8s lookup: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* laps_passord lookup: cacert_file -> ca_cert

* changelog for TLS parameter standardization
6 years ago
Slava Maslennikov 85d836171b Add a force_replace_host flag to win_domain_membership (#53542)
* Add a force_replace_host flag to win_domain_membership

Satisfies https://github.com/ansible/ansible/issues/53539

* Rework backticks

* Bump version_added

* Check for existence of current hostname as well; use LDAPFilter during search

* Rename $force_replace_host to $allow_existing_computer_account

* Added docs, porting guide and minor nit in code
6 years ago
Jordan Borean e2d2874d81
win_user_right - fix non json output issue (#54495) 6 years ago
Blue b62ab97685 win_shell: Implement option 'profile', allowing the user to control p… (#54299)
* win_shell: Implement option 'profile', allowing the user to control powershell profile sourcing before running a command

* Set version_added to 2.8

* Make sure profile directory exists before writing profile file

* Changes to make tests immutable and align with ps args
6 years ago
Dag Wieers e152b277cf Use locking for concurrent file access (#52567)
* Use locking for concurrent file access

This implements locking to be used for modules that are used for
concurrent file access, like lineinfile or known_hosts.

* Reinstate lock_timeout

This commit includes:
- New file locking infrastructure for modules
- Enable timeout tests
- Madifications to support concurrency with lineinfile

* Rebase, update changelog and tests

We need to specify ansible_python_interpreter to avoid running interpreter discovery and selecting the incorrect interpreter.

Remove the import of lock in known_hosts since it is not used.
6 years ago
Yuwei Zhou dc6c0cb9f8 Add workspace module for azure (#53731)
* add workspace

* add other properties

* add facts modules

* add test

* add doc

* fix lint

* fix lint

* rename the module

* fix docs
6 years ago
Matt Clay 785afc7a53
Improve ansible-test python interpreter selection. (#54445) 6 years ago
Matt Clay 09cd355bec Pin rabbitmq tests to pika < 1.0.0 to fix tests.
Tests are failing with the release of pika 1.0.0.
6 years ago
Matt Clay 6e12517164
Make pip test work with versioned virtualenv. (#54483) 6 years ago
Jordan Borean 9e93a84429
win_optional_feature - support multiple feature in name (#54368) 6 years ago
Matt Clay 7dea316c81
Fix service integration test python selection. (#54449)
* Fix service integration test python selection.
* Clean up source in ansible_test_service.
* Rename script to include in python tests.
* Make shebang templating sanity friendly.
* Fix checksum.
* Use realpath of python to avoid selinux issues.
6 years ago
Matt Clay ec83f52fa8 Fix virtualenv activation in tests. 6 years ago
Matt Clay 55d9ee0cb2 Revert "Temporarily skip failing Docker tests on RHEL 7.6."
This reverts commit affde96fa8.
6 years ago
Matt Clay 8612b126a8 Fix tests which assume `virtualenv` is available. 6 years ago
Chris Archibald 8dbdd987d8 Fix .encode('hex') call for python3 (#53343)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* documentation changes

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* fix encode calls for python3

* fix small issue

* switch to to_text

* Fix string
6 years ago
dgadmin 8de00e3e1c To ipv6 network (#48572)
* Add to_ipv6_subnet function

* Use the correct function for subnet

* Corrected code style and tests

* Corrected testcase assertion

64 bits make 8 octets, or 4 hextets

* Import from correct module directly
6 years ago
Kevin Breit 17fc6c6ff1 meraki_network - Parameter change for combined network type (#49160)
* Added support for types parameter
- Parameter is used to specify multiple network types

* Fix documentation

* Apply suggestions from code review

Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>

* Reworked type parameter to be a list so types isn't needed

* Re-add tags documentation

* Fix documentation around compatibility

* Convert tags to list from string

* Add changelog fragment
6 years ago
Sebastiaan Mannem d90cb71210 Added a new module that can manage rules in pg_hba files. (#32666)
* Added a new module that can manage rules in pg_hba files.

* Adding a backup_file option
6 years ago
Olivier BLIN 1a57daf9b0 Add support for multiple IPv6 addresses in nxos_l3_interface module (#50892)
* Add support for multiple IPv6 addresses in nxos_l3_interface module

Cisco support multiple IPv6 addresses on each interface but only the first
IPv6 is considered by this module. There is no impact on the configuration
but the module is not idempotent.

* Add internal support for IPv6 list
* Fix module idempotency

* Initialize tests for nxos_l3_interface

* Fix IPv4 removal idempotency
* Fix data extraction from nxos config

* Fix silently ignored interfaces in nxos_l3_interface

* Add warning when interface does not exist in nxos config
6 years ago
Chris Archibald 68ad75a56a New Module na_elementsw_cluster_config (#52373)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* New module

* fix author

* update copy right

* fixes
6 years ago
Chris Archibald 194af05832 bug fix (#54430) 6 years ago
Anil Kumar Muraleedharan 8d742d9bff Lenovo cnos user module (#53763)
* Adding cnos_user module to Ansible

* Update cnos_user.py

* Adding Functional test cases and unit test cases.

* Fixing Bug found in testing with Lenovo Mars.

* Review comments incorporated

* Review comments implemented.

* Copy paste mistake
6 years ago
Ujwal Komarla 9384773e1e Exos httpapi (#54405)
* Modify EXOS module utils to utilize 'httpapi' or 'network-cli' connection

* Changes to cliconf plugin to support 'json' or 'text' output for compatibility between network-cli and httpapi

* Add HTTPAPI plugin supportng JSONRPC and RESTCONF for EXOS

* exos_facts modify commands with run script cli2json.py to command dictionary specifying 'json' output
Load appropriate fixtures

* Update exos_config module to utilize the get_diff and get_default_flag functionality.
JSONRPC doesn't work well with pipes, regex MULTILINE

* Support for NOS agnostic 'cli_config' module by implementing 'get_default_flag' and 'get_diff' functionality

* Update Ansible Documentation regarding the connections available for EXOS
6 years ago
Kyryl Galanov 4a5b9bd8eb New lookup module: manifold (#50435)
* New lookup module: manifold

Add Manifold.co integration. The plugin fetches resource credentials
from Manifold service.

* module manifold: fix ansible lint warnings

* module manifold: fix false warning - split test assertion

* manifold module: fix unittest import

* manifold module: fix unittest patch

* manifold module: fix python3 requests getheader error
6 years ago
Lukas Kämmerling 3614f78bc5 Add hcloud_server_type_facts module (#53852) 6 years ago
Lukas Kämmerling 87554da4d6 Add hcloud_datacenter_facts module (#53851) 6 years ago
Lukas Kämmerling d5ca1eed89 Add hcloud_server_facts module (#53850) 6 years ago
Lukas Kämmerling 7d0ae41901 Add hcloud_image_facts module (#53849) 6 years ago
Lukas Kämmerling 6220eafb73 Add hcloud_location_facts module (#53848) 6 years ago
Patryk D. Cichy cdb1d02f4c Add new CloudStack module cs_physical_network (#54098) 6 years ago
Alex Stephen a191ed7b58 More GCP Utils Tests (#53568)
* navigate_hash tests

* remove_nones_from_dict tests

* replace_resource_dict tests
6 years ago
Matt Clay 6b4aabd355 Use virtualenv for filters and lookups tests. 6 years ago
Bojan Vitnik 54d23a8297 XenServer: Minor changes to error messages (#54434)
Changed "." for "!" in some error messages to make error messages uniform across the code.
6 years ago
Matt Clay 870abd7366
Clean up remote setup script for tests. (#54433)
* Only update sshd_config for FreeBSD tests.
* Also skip service restart unless config changed.
* Only pip install virtualenv for macOS tests.
* Also add retries and disable pip version check.
* Fix indentation.
* Reduce noise during remote instance setup.
* Refactor and clean up pip install.
* Decrease verbosity of commands.
* Remove unnecessary package install.
6 years ago
Matt Clay affde96fa8 Temporarily skip failing Docker tests on RHEL 7.6. 6 years ago
Chris Van Heuveln 20fb77c49b nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260)
* nxos_interfaces_ospf: fix passive-interface states & check_mode

This fix addresses issues #41704 and #45343.

The crux of the problem is that `passive-interface` should have been treated as a tri-state value instead of a boolean.

The `no` form of the command disables the passive state on an interface (allows it to form adjacencies and send routing updates).  It's essentially an override for `passive-interface default` which enables passive state on all OSPF interfaces.\*
This `no` config will be present in `running-config`.

   \**See `router ospf` configuration.*

Since both enable and disable states are explicit configs, the proper way to remove either of these is with the `default` syntax.

Passive-interface config syntax:
```
  ip ospf passive-interface              # enable  (nvgens)
  no ip ospf passive-interface           # disable (nvgens)
  default ip ospf passive-interface      # default (removes config, does not nvgen)
```

Code changes:

* `passive_interface` param changed from boolean to string, restricted to `true`,`false`,`default`.

* Several passive-interface specific checks were added because the existing module logic tends to test for true or false and doesn't handle the None case.

* Fixed `check_mode`.

Sanity verified on: N9K,N7K,N3K,N6K

* Fix doc header

* Unit tests for passive-interface

* doc fix #2

* Fix indent for SA

* Remove 'default' keyword, restore bool behavior

* remove changes to sanity
6 years ago
Brian Coca bc95720780
renaming facts to info (#54432)
(cherry picked from commit c5edffcdb8)
6 years ago
Jordan Borean 10f006036c
win_acl - fix support for registry paths (#54427) 6 years ago
Sloane Hertel cbfe77ad63
[inventory_aws_conformance] use consistent sg order in script (#54423)
* [inventory_aws_conformance] Use consistent security group order for the script
6 years ago
James Cassell 51f2065df5 use ANSIBLE_ prefix on all ansible-defined env vars (#54272)
mark old version deprecated in all places referenced via docs
6 years ago
James Cassell 5d32dbd532 selogin: check_mode, ignore_selinux_state, tests
ignore_selinux_state based on #48945
6 years ago
Christopher Schmitt fe0765eb2b Add hcloud_volume module (#53745) 6 years ago
David Passante baa3327387 cs_volume: fix unit tests cleanup (#54397) 6 years ago
Matt Clay 07e9438848 Move interface management into delegate_to test. 6 years ago
Matt Clay 399fc110e7 Use pytest.mark.skip instead of pytest.skip. 6 years ago
Rigel Di Scala 51f38b090e Fix failing test modules due to incorrect use of pytest.skip() (#54282) 6 years ago
Anton Roman 1e3428a766 fix issue in random_mac filter with short prefixes (#53928) 6 years ago
Sloane Hertel a47edc9968
[inventory_aws_conformance] fix the order of list variables created in config since it otherwise varies (#54365)
modify mock for boto to reflect the new fixed order for the config
6 years ago
Matt Martz 6996926d89
Expose loop_control.loop_var as ansible_loop_var (#54240)
* Expose the loop_var as ansible_loop_var

* Add docs

* fix assert test

* Indicate version added
6 years ago
Evan Kaufman cf69ec5db0 replace - fixed combined before and after usage (#31452)
When using before and after in combination, the opposite behavior was induced. This PR makes the the replacement happen between the specified patterns as intended.

* Added integration tests
* Add changelog, porting guide entry, and minor doc fixes
6 years ago
Felix Fontein 5bb5c9d295 openssl_certificate: update for #54298 (state=absent fix) (#54353)
* Update for #54298: Certificate is abstract, so instantiating doesn't work.

* Add test for removal.
6 years ago
Andrea Tartaglia df86b9ec3d openssl_pkcs12: privatekey_path and friendly_name are not always required together (#54370)
* Removed required_together, updated tests

Since required_together: privatekey_path -> friendly_name, is not always
required it has been removed.
Updated openssl_pkcs12 integration tests to be in line with other
openssl_* modules, and added a test for export with no privatekey_path.

* linter fixes

* Removed cryptography from tests

* Added changelog fragment

* Removed non-necessary select_crypto_backend
6 years ago
Anton Nikulin c231fc5a7c New module to install images on Cisco FTD devices (#53467)
* Add ftd_install module

* Remove shebangs

* Avoid using enum package

* Update module docs

* Update ftd_install docs

* Update PropertyMock import

* Fixing unit tests

* Move get_system_info and FtdOperations to module_utils

* Update dependency name

* Move Kick assertion to module_utils

* Add a note about Python interpreter for this module
6 years ago
Hannes Ljungberg be293fbe50 docker_swarm_service: Remove configs and secrets defaults (#54361)
* Remove defaults

* Skip redundant casting

* Indentation fix

* Use generic compare functions

* Add tests for compare functions

* Remove extra whitespace

* Add changelog fragment
6 years ago
Felix Fontein 791176252b docker_swarm inventory: fix tests, and make sure that they fail if no host is found (#54380)
* Fix tests, and make sure that they fail if no host is found.

* Fix interpreter.
6 years ago
Andrey Klychkov 9fa1f78126 postgresql_facts -> postgresql_info (#54389)
* postgresql_facts -> postgresql_info

* postgresql_facts -> postgresql_info: fix comment
6 years ago
Jordan Borean 3044326b4d
win basic - do not warn on case insensitive matches (#54371) 6 years ago
Matt Clay a775af919e
Merge pull request #54367 from mattclay/fix-ping-test
Fix ping integration test to work with ssh.
6 years ago
Matt Clay 29de0619e8 Fix nuage_vspk integration test:
- Wait for API to be ready.
- Enumerate test cases on controller.
6 years ago
Matt Clay 8a2b99d1ee Fix rabbitmq_publish integration test. 6 years ago
Alan Rominger f2f11341a3 Avoid erroring on host group confusion in keyed groups (#54099) 6 years ago
Sloane Hertel 54be769e8d fix AWS plugin credential precedence for environment variables (#52945)
* fix AWS plugin credential precedence for environment variables

* Allow aliases in direct plugins options

Consolidate precedence fix just in the doc fragment using aliases for mismatched options

* Access options with the option name rather than alias

* fix indentation

* update unit tests

* Improve readability
6 years ago
Felix Fontein 4fac91bed5 docker_container: add networks_cli_compatible option (#54198)
* Adding networks_cli_compatible option.

* Move network tests into own test file.

* Extend tests (for networks_cli_compatible=no).

* Adding tests for networks_cli_compatible=yes.

* There seems to be no way to create a container without at least one network attached.

* Integrate networks / purge_networks with comparisons.

* Speed up tests.

* Removing double dot.

* Add changelog.

* Use comparisons value only if the networks option has been specified. purge_networks on the other hand also removes networks if it has not been specified.
6 years ago
tcraxs af669dec24 add missing integration tests for postgresql_schema module (#54185)
* add missing integration tests for postgresql_schema module

* add missing integration tests for postgresql_schema module

* postgresql_schema: add CI test with function in module from #54237

* postgresql_schema: add CI test with function in module from #54237

* add DROP SCHEMA test with check_mode=yes #54185
6 years ago
jctanner 6d978bc285 check aws inv plugin (#53435)
* Add the constructed config with legacy settings enabled to match the script

* Add interesting characters in tags and security group names

* add strict to config

* Add a stopped instance in inventory

* Create symlinks in the test

* Add reservation details to mock

* run script and plugin with a virtual env

* call the script with ansible-inventory

* Fix code coverage collection.
6 years ago
Mike Wiebe e9c66ffb6f Add nxos_config sanity test (#54258) 6 years ago
Zim Kalinowski 8768c05d3e more 2.8 facts modules renamed to info (#54313) 6 years ago
Felix Fontein d7a273273a openssl_*: proper mode support (#54085)
* Add write helper.

* Adjust modules (except openssl_certificate).

* Adding tests for mode (with openssl_privatekey).

* Add openssl_certificate support.

* Never, ever remove the output file before actually trying to generate new content for it.

Removal is only allowed when state=absent, or when the object has been regenerated and the result needs to be written to that place.

* Add changelog.

* Extend test.
6 years ago
Felix Fontein 5d460ae865 Fix broken backup. (#54290) 6 years ago
Abhijeet Kasurde 83be129923
helper: raise Exception when ds is not dict type (#53936)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Zim Kalinowski 19e1b4de58
special case for rest module (#54236) 6 years ago
Kevin Breit bcbcd209f4 meraki_admin - Add documentation for tags and network access (#51415)
* Add documentation for tags and network access
* Documentation changes from dag and sam
* Change examples to include proper YAML and not dict
* Update lib/ansible/modules/network/meraki/meraki_admin.py

Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>
6 years ago
Matt Clay 89a022b6a0 Update handling of the non_local test alias.
Previously the alias disabled all code coverage collection.
Now it only disables Ansible module code coverage collection.
6 years ago
Matt Clay e12d3ca731 Fix ansible-test injector warning on Python 3.7. 6 years ago
Toshio Kuratomi 5fb416ae34 Add a script to generate twitter and mailing list announcements
Announcements taken from https://github.com/ansible/community/wiki/RelEng:-ReleaseProcess
and then cleaned up:

* Update issue reporting blurb from feedback from acozine and gundalow
* Add a subject and to line for email output
* Ignore long line tests on the jinja templates (as jinja doesn't give
  enough control to get rid of newlines when text wrapping)
* Skip shebang and compile tests for older pythons since this is a
  release engineer-only script.  (ok'd by mattclay)
6 years ago
Martin Krizek bafa291af9 uri: do not write the file after failure (#53515)
* uri: do not write the file after failure

Fixes #53491

* Add changelog
6 years ago
Chris Archibald 6a2b9c2a86 New Module: na_elementsw_cluster_snmp (#52374)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* new module

* fix author

* update copyright date

* test/units/modules/storage/netapp/test_na_elementsw_cluster_snmp.py
6 years ago
Chris Archibald 1e6aa9533c New na_ontap_volume option (#52587)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Update to volume

* fix documentation

* Fix doc
6 years ago
Andrea Tartaglia 36a790dcde New cryptography backend for openssl_certificate (#53924)
* New cryptography backend for openssl_certificate

load_* functions in module_utils/crypto.py now have a backend paramter
which when set to 'cryptography' will return cryptography objects so
they can be used for both pyopenssl and cryptography backends.
Added a select_message_digest function too returning a cryptography
digest hash from `cryptography.hazmat.primitives.hashes`
Added new classes for Cryptography backend

* Run test with various backends.

* Prefixing tests.

* Make sure we have the correct backend available.

* Linting (flake8).

* Moved cryptography import to separate try/except

* Make sure certificate is actually valid at some time in the past.

* Improve error handling.

* Trying to fix validation for cryptography backend.

* Fixed issue with keyUsage test in assertonly

* Fixed CI/Lint issues

* Fix private key problem for OwnCA.

* Cryptography backend doesn't support v2 certs.

* issue an expired cert with command when using cryptography backend

* Added warning when backend is auto and v2 cert is requested

* Bumped min cryptography version to  1.6

* Correctly check for failure when backend is cryptography and cert is v2

* Use self.backend where possible

* Use secp521r1 EC when testing on CentOS6

* Fixed pylint issue

* AcmeCertificate support for both backends

* Review fixes

* Fixed missing '(' when raising error

* Fixed date_fmt loop

* Updated docs and requirements with cryptography

* Add openssl_certificate to changelog.
6 years ago
Christian Rohmann 90c092a104 Allow configuration of connection_limit per postgresql database (postgresql_db) (#40345)
Fixes #40060

* Fix coding style errors
* Use CONNECTION LIMIT (no underscore)
* From review done by amenonsen and bcoca - Set default at None, make the change detection less confusing
* Added EXAMPLE on how to apply a database specific connection limit
* Added some basic tests for conn_limit applied to a database
* Check that conn_limit has actually been set / updated to 200
* Add changelog fragment regarding postgresql_db conn_limit parameter
6 years ago
Andrey Klychkov 76f1f96163 postgresql_ext: Update param handling, fix doc formatting, added: CI tests, examples, a return value (#54027)
* postgresql_ext: instead_of_3196, initial

* postgresql_ext: fixes

* postgresql_ext: fixes
6 years ago
Evgeniy Krysanov 907765a3a5 Add Bitbucket Pipelines variable module (#54049)
* Add Bitbucket pipelines variable module

* Add tests

* Remove parameters check for `absent` state

* Update version_added documentation field

* Minor fixes

* A few additional cosmetic changes

* Move to source_control

* Rename lib/ansible/modules/source_control/bitbucket_pipelines_variable.py to lib/ansible/modules/source_control/bitbucket/bitbucket_pipelines_variable.py

* Reflect directory change

* Move these imports as well

* Rename 'key' parameter (API) to 'name' (GUI)

* Add missing __init__.py files to mark modules

* Rename module (pipeline should be singular)

* Adjust module references and variable names after renaming
6 years ago
Zim Kalinowski 18d9715fb1 Fix CosmosDB parameter translation bug (#54212) 6 years ago
Felix Fontein 946a16cc82 docker_host_info and docker_node: fix return variable names (#54172)
* docker_host_info: host_facts -> host_info

* docker_node: node_facts -> node
6 years ago
Yuwei Zhou d73db7f060 azure subnet's properties should not be changed if parameter set to None (route table, nsg...) (#54019) 6 years ago
David Passante aa32164d15 cs_volume: add volumes extraction and upload features (#54111)
* cs_volume: add volumes extraction and upload features

* cs_volume: Update doc, remove deprecated code

* cs_volume: Add unit tests for extract and upload features
6 years ago
Matt Clay e69828e285
Force tests to set ansible_python_interpreter. (#54191)
* Force tests to set ansible_python_interpreter.

This avoids use of interpreter discovery unless tests opt-in to using it.
Avoiding interpreter discovery helps avoid selecting the wrong interpreter for tests.

* Prevent use of global inventory in tests.

This will avoid issues with tests picking up global inventory
instead of using implicit localhost as intended.

* Require hosts to exist in inventory for tests.

This will prevent tests from unintentionally passing
when hosts are not found in inventory. Does not prevent
the use of implicit localhost.
6 years ago
Matt Clay 8aa4b037ce Fix include_import test.
This will allow the test to work when HOST_PATTERN_MISMATCH is set to error.
6 years ago
Matt Clay 2d15811843 Fix unicode integration test.
This will allow the test to work when HOST_PATTERN_MISMATCH is set to error.
6 years ago
Matt Clay 1bed2cbb9d Fix vault integration test inventory references.
Previously parts of the tests were being skipped due to missing inventory.
6 years ago
Matt Clay 363c9594ec
Clean up group_by integration test. (#54206)
* Split group creation out into separate file.
* Move skipped group into separate playbook.
6 years ago
Matt Clay 43bd8c4711 Switch async_extra_data test to inventory file. 6 years ago
Matt Clay ade6977d66 Fix typo in doc_fragments path. 6 years ago
Ben Carter f99f88b034 fixing status option in documentation (#53785)
changing status option to statuses in the documentation

Adding choices to the argument spec to match the documentation from AWS.
Adding 'REVOKED', 'FAILED' to statuses documentation to match implementation.

Removing E322, E323 ignores for aws_acm_facts
6 years ago
Matt Clay 2a8252ceb9 Slightly increase non-coverage unit test timeout. 6 years ago
Matt Clay 3e2817c478 Update default-test-container to version 1.6.0.
ci_complete
6 years ago
James Cassell 530771e6f8 rename rhsm_repository_release to rhsm_release (#53430)
no changelog needed, as it is a new module for 2.8
6 years ago
Sam Doran ff88bd82b5
Move type checking methods out of basic.py and add unit tests (#53687)
* Move check_type_str() out of basic.py

* Move check_type_list() out of basic.py

* Move safe_eval() out of basic.py

* Move check_type_dict() out of basic.py

* Move json importing code to common location

* Move check_type_bool() out of basic.py

* Move _check_type_int() out of basic.py

* Move _check_type_float() out of basic.py

* Move _check_type_path() out of basic.py

* Move _check_type_raw() out of basic.py

* Move _check_type_bytes() out of basic.py

* Move _check_type_bits() out of basic.py

* Create text.formatters.py

Move human_to_bytes, bytes_to_human, and _lenient_lowercase out of basic.py into text.formatters.py
Change references in modules to point to function at new location

* Move _check_type_jsonarg() out of basic.py

* Rename json related functions and put them in common.text.converters

Move formatters.py to common.text.formatters.py and update references in modules.

* Rework check_type_str()

Add allow_conversion option to make the function more self-contained.
Move the messaging back to basic.py since those error messages are more relevant to using this function in the context of AnsibleModule and not when using the function in isolation.

* Add unit tests for type checking functions

* Change _lenient_lowercase to lenient_lowercase per feedback
6 years ago
tcraxs bb61d7527f #50877: add support to postgresql_privs to use "FOR { ROLE | USER } target_role" in "ALTER DEFAULT PRIVILEGES" (#51073)
* #50877:
* add support to postgresql_privs to use "FOR { ROLE | USER } target_role"
   in "ALTER DEFAULT PRIVILEGES"

* fix sanity errors

* #50877: fix documentation and add a check for correct usage
of target_roles

*  #50877: fix missing absent option for default privs with target_role

* #50877: add clear description, when target_roles can be used

* #50877: fix conflicts, formatting, and add a changelog fragment

* #50877: fix sanity error E335

* #50877: swap conditions and fix error to warning msg

*  #50877: add tests for default privileges

* #50877: fix tests for default privileges

* #50877: fix tests for default privileges on centos 6
6 years ago
Chris Van Heuveln 7b44bc1ac9 nxos_static_route: reconcile_candidate fails to remove 'track' routes (#53806)
* * `reconcile_candidate()`
  * old code searched the ip route configs for a given prefix+nexthop and then tried to remove the route based on prefix+nexthop only; this would fail when a static route was configured with `track` values.
  * new code still looks for prefix+nexthop but uses the route config it finds on the device to remove it; e.g.
    * search for: `ip route 192.168.20.64/24 192.0.2.3`
    * find:       `ip route 192.168.20.64/24 192.0.2.3 track 1 10`
    * remove:  `no ip route 192.168.20.64/24 192.0.2.3 track 1 10`

* logic cleanups:
  * old code did a `show run` for every prefix. This can be a lot of data when there are large configs.
  * new code uses filters to only return the static route configs.
  * The filters now allow a common code path so no need for default vs vrf code paths

* `sanity` test: 100% Pass rate on N9K,N7K,N6K,N3K

- Bugfix Pull Request

`nxos_static_route`

* filter() does not return a list with python3

`filter()` was breaking pytest when it ran with python3, since it returns
an iterable instead of a list with python3.

Found that I didn't really need `filter()` anyway so just removed it

* restore var names /w/want/
6 years ago
Zim Kalinowski 0a2971dcf5
adding new container instance options (#54072) 6 years ago
Felix Fontein 8d62794f91 docker: rename docker_*_facts -> docker_*_info (#54124)
* Rename docker_*_facts -> docker_*_info.

* Add changelog.

* Update scenario guide.
6 years ago
Zim Kalinowski 9c77509cbc
azure virtual machine facts -- querying all machines in subscription fix (#54075) 6 years ago
techknowlogick a03e69550c add azure_rm_mariadbdatabase (#54147) 6 years ago
Matt Clay 1a286a95e5 Disable failing azure_rm_managed_disk test. 6 years ago
Matt Clay 6401683e0b Mark azure_rm_hdinsightcluster test unstable.
The unstable alias wasn't intended for slow but otherwise stable
tests. However, the alternatives are to either dedicate an entire
test group to this one test or mark it unsupported.

Marking it unstable at least permits the test to run when changes
are made to the integration test or the module itself, which is
better than not running the tests at all.
6 years ago
Matt Clay 39bbadb2fd
Replace no-underscore-variable test with pylint. (#54140)
* Replace no-underscore-variable test with pylint.
* Update orphan handling for sanity test docs.
* Update command for listing tests.
6 years ago
Matt Clay 98fdbf6a13 Fix test_oneview_ethernet_network unit test.
Use yaml.safe_load since yaml.load without a loader is deprecated.
6 years ago
Yunge Zhu fb5f85d2c1
add azure_rm_roleassginment_facts (#52626) 6 years ago
techknowlogick f34a43f2c7 add azure_rm_mariadbfirewallrule (#54146) 6 years ago
techknowlogick ddee29d00f add azure_rm_mariadbconfiguration (#54145) 6 years ago
techknowlogick 949692431b add azure_rm_mariadbserver module (#53998) 6 years ago
Matt Clay 47f2101e8d Fix no-underscore-variable test. (#54137)
* Ignore lines with comments.
* Detect variables at the start of the line.
6 years ago
Zim Kalinowski c431d18e28 Additional DevTest Lab modules (#53091)
* [WIP] Additional DevTest Lab modules

* updates

* try global schedule again

* dtl schedule

* try full dtl schedule test

* fixing schedule

* fixed problem

* another fix

* fixed test

* different time format

* fixed absent state

* test policy idempotence

* more updates

* updated devtestlabpolicy

* fixed syntax

* updated dtl policy test

* updated image id

* fixed test

* fixed bug

* fixed bugs and docs

* fixed bug

* + small cleanup

* reenabled tests but disabled leaking tests

* disabled test
6 years ago
Zim Kalinowski d71ca02d60 adding hdinsight cluster (#52612)
* adding hdinsight cluster again

* updated hdinsight cluster test

* fixes

* updated test

* some updates

* removed non-essential

* fixed sanity

* fixed test

* newer default_compare implementation

* debugging code

* try to fix comparison issue

* fix test

* fixed sanity

* fix comparison

* added zookeeper node

* zookeeper target instance count

* don't compare passwords

* test updates

* next iteration

* fix

* more fixes

* another fix

* one more fix

* flattening configuration

* doc update

* one more doc change

* fixed sanity

* properly handling cluster update

* changed default_compare function

* fixed comparison

* changed compare result

* compare stuff

* removed some custom stuff

* improved hdinsight change warning

* fixed syntax

* fix another syntax

* one more hdinsight cluster update fix

* and removed some unnecessary stuff

* one more update

* forgot one lropoller

* reduce number of cores

* head node size

* still bigger nodes

* fix mistake

* fix problem

* fixed another issue

* don't delete unexisting
6 years ago