Commit graph

4767 commits

Author SHA1 Message Date
Felix Fontein
fa70690e5c
openssl_certificate/csr(_info): add support for SubjectKeyIdentifier and AuthorityKeyIdentifier (#60741)
* Add support for SubjectKeyIdentifier and AuthorityKeyIdentifier to _info modules.

* Adding SubjectKeyIdentifier and AuthorityKeyIdentifier support to openssl_certificate and openssl_csr.

* Fix type of authority_cert_issuer.

* Add basic tests.

* Add changelog.

* Added proper tests for _info modules.

* Fix docs bug.

* Make sure new features are only used when cryptography backend for openssl_csr is available.

* Work around jinja2 being too old on some CI hosts.

* Add tests for openssl_csr.

* Add openssl_certificate tests.

* Fix idempotence test.

* Move one level up.

* Add ownca_create_authority_key_identifier option.

* Add ownca_create_authority_key_identifier option.

* Add idempotency check.

* Apparently the function call expected different args for cryptography < 2.7.

* Fix copy'n'paste errors and typos.

* string -> general name.

* Add disclaimer.

* Implement always_create / create_if_not_provided / never_create for openssl_certificate.

* Update changelog and porting guide.

* Add comments for defaults.
2019-08-23 14:01:42 +02:00
Mark Chappell
77e4371460 aws_kms: Update policy on existing keys (when passed) (#60059)
* aws_kms: (integration tests) Use module_defaults to reduce the copy and paste

* aws_kms: (integration tests) make sure policy option functions.

* aws_kms: (integration tests) Move iam_role creation to start of playbook.

iam_roles aren't fully created when iam_role completes, there's a delay on the Amazon side before they're fully recognised.

* aws_kms: Update policy on existing keys (when passed)
2019-08-23 20:38:38 +10:00
Chris Van Heuveln
f1054f575d bfd_global: minor test-only fix (#60965) 2019-08-23 15:12:59 +05:30
Trishna Guha
f0ef624cff
Add nxos_l3_interfaces resource module (#61021)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-23 15:06:26 +05:30
Andrey Klychkov
e3cf76533c postgresql_user: add groups parameter (#60638)
* postgresql_user: add groups parameter

* postgresql_user: add groups parameter, fail_on_role default True

* postgresql_user: add groups parameter, add changelog fragment
2019-08-23 08:17:23 +02:00
Sumit Jaiswal
47243b0b2d
Resource module for iosxr_interfaces (#59853)
* iosxr interfaces resource

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-22 21:27:41 +05:30
Mark Chappell
70777020c4 Fix iam_password_policy integration tests (#60930)
* iam_password_policy: (integration tests) Use module defaults for AWS connection details

* iam_password_policy: (integration tests) Ensure the policy is removed when tests fail

* iam_password_policy: (integration tests) Add regression test for #59102

* iam_password_policy: Only return changed when the policy changes.

* iam_password_policy: PasswordReusePrevention must be omitted to remove/set to 0

* #60930 add changelog

* Update hacking AWS security policy to allow testing of Password Policy Management
2019-08-22 23:25:25 +10:00
Nathaniel Case
8c5936671e
Add new module eos_l3_interfaces (#59820)
* Update base files for resource modules

* Add modules

* Add module_utils

* Add tests

* Deprecate eos_l3_interface

* Update facts
2019-08-22 09:06:38 -04:00
Markus Bergholz
2fff40d409 add max_allocated_storage parameter to rds_instance (#61008)
* #60921 add max_allocated_storage parameter add apply that parameter also to the integration test

* version_added 2.9

* test value of  max allocated storage
2019-08-22 22:20:50 +10:00
Andrey Klychkov
191068a286 Issue 59955: add array handling to postgresql_query module (#60559)
* Issue 59955: add array handling to postgresql_query module

* Issue 59955: add array handling to postgresql_query module, improvements

* Issue 59955: add array handling to postgresql_query module, fix example comment
2019-08-22 08:53:29 +02:00
Sumit Jaiswal
a5a1f01d1e
Resource module for ios_lldp_interfaces (#61012)
* ios_lldp_interfaces resource

* fix shippable n reviews

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* add enable lldp tc
2019-08-22 10:02:25 +05:30
The Magician
76cc8e9fc3 New Module: gcp_filestore_instance (#60996) 2019-08-21 15:31:38 -04:00
Matt Clay
29ac0273d4
Update ansible-test collection inventory handling. (#61031)
* Update ansible-test collection inventory handling.

- The `windows-integration` command now supports the `--inventory` option.
- The incomplete support for host_vars and group_vars directories has been removed.
- The incomplete support for an inventory directory has been removed.
- The inventory specified by `--inventory` can now reside outside the install and content roots.
- Using `ansible_ssh_private_key_file` with `--docker` or `--remote` results in a warning about the combination being unsupported and likely to fail.

* Fix config handling.

* Fix payload handling of ssh keys.

* Disable pylint no-self-use rule for ansible-test.

* De-duplicate payload paths.
2019-08-21 12:12:37 -07:00
Sumit Jaiswal
35d457a14f
Resource module for ios_lldp_global (#60506)
* ios_lldp_global model

* final fix for lldp_global

* fix shippable n reviews

* fix reviews
2019-08-21 23:02:25 +05:30
Christopher Schmitt
4e7cd76c56 Add hcloud network info (#60932)
* Add hcloud network facts

* Add tests

* Rename fact to info, adjust tests

* Fix style

* Fix test

* Fix typo

* Adjust test

* Adjust test

* Rename subnets to subnetworks

* Adjustments

* Apply suggestions from code review

Co-Authored-By: Lukas Kämmerling <4281581+LKaemmerling@users.noreply.github.com>
2019-08-21 15:47:02 +02:00
Lukas Kämmerling
96199be96b Rename hcloud_*_facts to hcloud_*_info (#60926)
* Rename hcloud_datacenter_facts to hcloud_datacenter_info

* Rename hcloud_location_facts to hcloud_location_info

* Rename hcloud_image_facts to hcloud_image_info

* Rename hcloud_floating_ip_facts to hcloud_floating_ip_info

* Rename hcloud_server_type_facts to hcloud_server_type_info

* Rename hcloud_server_facts to hcloud_server_info

* Rename hcloud_ssh_key_facts to hcloud_ssh_key_info

* Rename hcloud_volume_facts to hcloud_volume_info

* Fix typo in hcloud_image_info

* Add to porting guide and add changelog fragment

* Reword porting guide
2019-08-21 14:55:37 +02:00
Matt Davis
bfa004930a
add subdir support to collection loading (#60682)
* add subdir support to collection loading

* collections may now load plugins from subdirs under a plugin type or roles dir, eg `ns.coll.subdir1.subdir2.myrole`->ns.coll's roles/subdir1/subdir2/myrole, `ns.coll.subdir1.mymodule`->ns.coll's plugins/modules/subdir1/mymodule.py
* centralize parsing/validation in AnsibleCollectionRef class
* fix issues loading Jinja2 plugins from multiple sources 
* resolves #59462, #59890,

* sanity test fixes

* string fixes

* add changelog entry
2019-08-21 10:45:04 +01:00
Rohit
8b3ff933af
Vyos lldp interfaces (#60931)
* module_utils checkin

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* vyos lldp_interfaces merging

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* shippable fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* merge changes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* failure added in ignore list

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* remove global commands

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-08-21 12:30:13 +05:30
Pavan Bidkar
b75fc87a86 VMware: New module for deploy VM from content library template (#60203)
* Fixed format issues reported by pre-check tests

* Changes as per review comments. using single api_client between util class and module

* re-running the task to check the idempotency of module object
2019-08-21 11:17:29 +05:30
Nathaniel Case
764a81fce7
New module eos_lacp (#60698)
* Initial builder import

* Add tests

* Implement facts & config
2019-08-20 16:11:31 -04:00
Matt Clay
92380d7050
Update ansible-test --windows inventory creation. (#60911)
Host specific settings are created as part of the generated inventory instead of using a host_vars directory.

Also update connection tests to work properly with the generated inventory changes.
2019-08-20 07:17:32 -07:00
Will Thames
362c45517d aws_kms: fix failing tests (#60206)
Preserve tag key case by only calling camel_dict_to_snake_dict once,
before the tags are added.

Don't call assert_policy_shape as it seems to fail

Use aws_caller_info in the test suite now that it exists rather
than running `aws sts get_caller_identity`

Ensure that calls using `grant_types` can also use key aliases
2019-08-20 07:15:40 -04:00
Trishna Guha
41dc8e84e4
fix nxos test failure (#60928)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-20 16:14:00 +05:30
Sumit Jaiswal
8a8798c373
Resource module for ios_lacp_interfaces (#59516)
* ios lacp interfaces

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-20 13:37:31 +05:30
Sumit Jaiswal
642e54f958
Resource module for ios_lacp (#60884)
* ios lacp resource

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-20 12:05:14 +05:30
Nathaniel Case
efa163a2e8
New module eos_lag_interfaces (#60610)
* Copy module files

* Deprecate eos_linkagg

* Add tests
2019-08-19 15:34:20 -04:00
Nathaniel Case
d9ffc61539
Add new module eos_l2_interfaces (#59794)
* Add module files for l2_interfaces

* Add module_utils

* Add tests

* Deprecate eos_l2_interface

* Clean up tests so eos_vlan will still pass
2019-08-19 11:24:36 -04:00
Sumit Jaiswal
04ef376ab2
Resource module for ios_lag_interfaces (#60672)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-19 20:41:00 +05:30
Ganesh Nalawade
49736b6b27
Add support to configure network_cli terminal related options (#60086)
* Add support for configurable terminal plugin options

Fixes #59404

*  Add terminal options to support platform specific login menu
*  Add terminal options to support configurable options for stdout
   and stderr regex list

* Fix CI failures

* Fix CI issues

* Fix review comments and add integration test

* Fix sanity test failures

* Fix review comments

* Fix integration test case

* Fix integration test failure

* Add support to configure terminal related options

Fixes https://github.com/ansible/ansible/issues/59404

*  Add network_cli configurable options to support platform specific login menu
*  Add network_cli configurable options to support configurable options for stdout
   and stderr regex list

* Fix review comment

* Fix review comment
2019-08-19 18:56:20 +05:30
Nathaniel Case
446dcb7c96
New module eos_vlans (#60652)
* Initial commit of module files

* Add tests, implement facts

* Implement config, fix issues

* Handle vlan ranges from the device

* Deprecate eos_vlan
2019-08-19 09:02:38 -04:00
Rohit
d8f9904f43
vyos_lldp_global (#59627)
* vyos_lldp_global

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity checks

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* deprecated changes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* branch conflict resolved

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity check passes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-08-19 17:31:09 +05:30
Sumit Jaiswal
b55a54469c
Resource module for ios_vlans (#59640)
* ios_vlans resource module

* fix shippable error

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix vlans resource

* fix facts doc

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable n review

* fix test

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix indentation

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix review

* fix shebang

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-19 16:03:29 +05:30
Trishna Guha
f1cf838797
fix nxos CI failures (#60752)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-19 14:24:39 +05:30
Ryan Butler
555b8413a1 VMware: Add uptime and maintenance mode in vmware_host_facts (#60688)
* adding host facts
* adding to test
2019-08-19 10:57:01 +05:30
Felix Fontein
0d88ec241f
openssl_certificate: fix idempotency (#60745)
* Fix openssl_certificate idempotency.

* Add changelog.

* Add integration test.
2019-08-18 20:48:34 +02:00
Hannes Ljungberg
13364fc530 docker_swarm_service: Allow passing dicts in networks (#58961)
* Add support for passing networks as dicts

* Add function to compare a list of different objects

* Handle comparing falsy values to missing values

* Pass docker versions to Service

* Move can_update_networks to Service class

* Pass Networks in TaskTemplate when supported

* Remove weird __str__

* Add networks integration tests

* Add unit tests

* Add example

* Add changelog fragment

* Make sure that network options are clean

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Set networks elements as raw in arg spec

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix wrong variable naming

* Check for network options that are not valid

* Only check for None options

* Validate that aliases is a list
2019-08-18 08:55:54 +02:00
Felix Fontein
26b9c81a8e
crypto modules: fix sanity errors (#60046)
* Remove sanity warnings.

* Linting.

* More linting.

* Forgot one place.

* no_bytes -> num_bytes
2019-08-18 05:37:57 +02:00
Sumit Jaiswal
ab07c206aa
Resource module for ios_l2_interfaces (#60344)
* ios_l2_interface checkin

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-08-17 23:02:36 +05:30
Felix Fontein
6a786d0d93
openssl_publickey: add cryptography backend (#60387)
* Add cryptography backend.

* Add changelog.

* Make sure requirements are satisfied.

* Use more compatible elliptic curve.

* Decrease required version numbers.

* PyOpenSSL >= 16.0.0 is really needed.

* Update lib/ansible/modules/crypto/openssl_publickey.py

Co-Authored-By: MarkusTeufelberger <mteufelberger@mgit.at>
2019-08-17 18:52:14 +02:00
Paul Belanger
13996aaff6
Fix missing variable with nxos_install_os tests (#60351)
Today we are getting an Ansible templating exception because this
variable isn't defined. But we also don't want testing to run, as we
don't have ability to run this test in DCI.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-08-17 10:04:50 -04:00
Felix Fontein
601a4b8f47
get_certificate: add cryptography backend (#60599)
* Add cryptography backend for get_certificate.

* Add changelog.

* Use short names (if possible).

* Adjust version (to behave as pyOpenSSL).

* Work around bugs (needed for cryptography 1.2.3).

* Don't run cryptography backend tests for CentOS 6.

* Bump cryptography requirement to 1.6 or newer.

Otherwise, signature_algorithm_oid isn't there, either.

* Simplify requirement text.

* CentOS 6 has cryptography 1.9, so we still need to block.

* Add auto-detect test.

* Improve YAML.
2019-08-17 16:02:14 +02:00
Felix Fontein
cf69b73c04
openssl_certificate/csr_info: add ordered issuer/subject return value (#60708)
* Add ordered issuer/subject return value.

* Add changelog.
2019-08-17 15:49:54 +02:00
Lukas Kämmerling
100b56439e hcloud_server: Allow users to enable/disable the rescue mode (#60070) 2019-08-17 11:29:58 +02:00
The Magician
818d1b2e45 New Module: gcp_cloudfunctions_cloud_function (#60668) 2019-08-16 15:23:39 -04:00
Mitsuru Nakakawaji
064cd63f3d fix: docker_swarm_service does not publish both tcp and udp ports (#60616)
* fix: docker_swarm_service does not publish both tcp and udp ports for same published port

* fix the linting problems and add the changelog fragment.

* add test

* modify test to ensure result rather than return value
2019-08-16 15:23:45 +02:00
Felix Fontein
48541910bf
docker_container: add mount endpoint collision detection (#60384)
* Add mount endpoint collision detection.

* Add changelog.

* Fix error.
2019-08-16 15:23:03 +02:00
Gonéri Le Bouder
218f4276d5 vmware_drs_group: creates test vm properly
Creates the test VMs with `prepare_vmware_test`. Before this commit,
only one VM was created and the next step was failing because this was
not matching the expected list of VMs.
2019-08-15 16:57:39 +02:00
Matt Clay
7968dc4c00 Load integration config test vars from content.
The `test/integration/integration_config.yml` vars file will now be loaded from the content under test and is now optional.

The `output_dir` and `win_output_dir` vars are now provided by ansible-test.
2019-08-14 20:40:59 -07:00
Matt Clay
0c74ee4352
Clean up various integration tests. (#60613)
* Fix var_blending test temp dir usage.

* Fix filters integration test:

- Fix use of `output_dir`.
- Use `localhost` instead of `testhost` since we're only testing filters.
- Fix `fileglob` test to actually test a directory that exists.

* Fix lookups integration test:

- Fix use of `output_dir`.
- Use `localhost` instead of `testhost` since we're only testing lookups.

* Fix ansible-runner test temp dir usage.

* Fix template and template_jinja2_latest test.

Use the `OUTPUT_DIR` env var to get the output directory for the tests.

* Fix Python version compat in filters test.

* Skip filters test on Python 2.6.
2019-08-14 16:33:45 -07:00
René Moser
f02f5c4b5d
cloudscale_server: add tags support (#60396) 2019-08-14 22:55:31 +02:00