Commit Graph

3163 Commits (7c57caf8fa3992e75af739c12eb9eb5b1c8733f9)

Author SHA1 Message Date
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
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
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 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 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
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
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
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
Matt Clay 6b4aabd355 Use virtualenv for filters and lookups tests. 6 years ago
Matt Clay affde96fa8 Temporarily skip failing Docker tests on RHEL 7.6. 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
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
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