Commit Graph

4014 Commits (29de0619e860cd1dad111b3572aed42c90929cbf)

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Matt Clay 777b726e4f Pin the ansible-runner version in tests.
The tests need to be updated to support newer ansible-runner releases.
6 years ago
René Moser c5609c51bf
include_tasks: fix traceback if no file specified (#54044) 6 years ago
Martin Krizek 0e28ab4528
Template run_once for handlers (#54030)
Fixes #27237
6 years ago
Felix Fontein 05bca95ab1 ACME: rename acme_account_facts -> acme_account_info (#54082)
* Rename acme_account_facts -> acme_account_info.

* Add changelog fragment.
6 years ago
Anil Kumar Muraleedharan 7a24ecde86 Lenovo cnos system module (#53764)
* Adding cnos_system module to Ansible.

* Adding UT, Functional test required for cnos_system. Bugs came up are fixed

* Adding more files to the cnos_system suit.
6 years ago
Anil Kumar Muraleedharan e4a1473a8f Lenovo cnos static route (#53736)
* Adding new module to Ansible viz. cnos_static_route.
6 years ago
Chris Van Heuveln 07774b4ccf nxos_igmp_snooping: more group-timeout fixes (#53553)
* Fixed another problem where `group-timeout` was processed before `ip igmp snooping` was enabled

* `sanity` playbook:
 * N6K: `show ip igmp snooping | json` succeeds on the device but doesn't return any data in body; added a skip to the sanity playbook to keep it out of CI
 * Added a setup task to do initial cleanup on the device
6 years ago
Zim Kalinowski 5b79631380
Getting latest API version if not specified in azure_rm_resource (#54022) 6 years ago
Carson Anderson 31ceba7fd8 Windows module: win_optional_feature for Windows workstations (#53709)
* initial commit

* fix execute and \r\n

* \r attempt 2

* updated with integration tests and using new csharp import

* Apply suggestions from code review

Co-Authored-By: rcanderson23 <rcanderson23@gmail.com>

* fixed small docuement inaccuracies wrt returns

* removal of state in feature result

* removal of rc

* small fixes suggested in code review

* fixed variable assigning to result

* addition of comments on conditionals for clarity on matching

* swap logic of check_mode

* set $reboot_required so it is always returned

* removal of extraneous return information

* addition of integration tests

* set installation of parent features to true

* remove 2008 from tests

* changed test for TelnetClient from NetFx3

* change of tabs to spaces

* Add test check for OS version
6 years ago
Pilou dbb782a594 Conditional bare: fix typos (#53807) 6 years ago