Commit Graph

5611 Commits (2268a37d4d1ee93e7eb1b2eec656251f263adcf2)

Author SHA1 Message Date
Pilou bbbdc1c25c throttle: fix linear based strategies (#65422)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
5 years ago
Prasad Katti b16525b841 [aws] integration tests for ec2_vol (#66193) 5 years ago
Albert Siersema 4a0c875447 Working Cisco IOS macro editing (fixes #55211) (#55220)
* Working Cisco IOS macro editing (fixes #55211)

* Working Cisco IOS macro editing [fixed pylints] (fixes #55211)

* Added integration tests for edit_macro

* Added conditional integration tests for ios_config macro

* Cosmetic fix: when near block for added conditional integration tests for ios_config macro

* Move teardown to always for block
5 years ago
Andrew Klychkov 72fbed2c61 postgresql_user: add comment parameter (#66711)
* postgresql_user: add comment parameter

* add changelog

* fix CI
5 years ago
Abhijeet Kasurde fc6476bd72
VMware: Handle multiple tags with different category (#66465)
vmware_tag_info used to return dict of tag information which caused
data loss when there are multiple tags with same name and different category ids.
This fix will add additional fact "tag_info" which will deprecated existing fact
"tag_facts".
The "tag_info" is a list which handles multiple tags with same name.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Rhys Campbell 05e034f899 Arbiter change and test additions (#59883) 5 years ago
Andrew Klychkov fabb2eb555 mysql_db: add skip_lock_tables option (#66688)
* mysql_db: add skip_lock_tables option

* add changelog fragment
5 years ago
Martin Krizek ec371eb227 Set HostVars._variable_manager's attrs (#65508)
When HostVars are part of the data that goes through (de)serialization
when being passed from a worker process to the main process, its
variable manager reference loses some of its attributes due to the
implementation of __getstate__ and __setstate__ (perf utilization).
Since HostVars already has those attributes, use __setstate__ to assign
them.

Fixes #65365
5 years ago
Sumit Jaiswal 0c4f167b82
fix 66530 (#66654) 5 years ago
Mike Wiebe 5c158755fc Fix fact gathering for sensor-groups (#66439) 5 years ago
Matt Clay 8f02022353 Remove unstable from aws_acm integration test.
The quota for the CI account has been increased, so tests are once again passing.
5 years ago
Jill R d8c2f4738e CI is hitting 'maximum number of 2200 certificates' again, marking aws_acm unstable (#66665) 5 years ago
Adam Miller 22fe22f796 yum - fix bug where enablerepo is not honored when disablerepo all (#66557)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
sky-joker 1befb52321 VMware: add properties option to vmware_datastore_info module (#62940)
* add_properties_option_to_vmware_datastore_info
* fix document indent error
* add changelog file for vmware_datastore_info
5 years ago
Chris Van Heuveln 7fabb28d22 nxos_gir timeout fixes (#66043)
* nxos_gir timeout fixes

* additional setup/teardown cleanups for sanity test

* Add timeout extension comment to module header

* lint

* rework logic to use action plugin
5 years ago
Gonéri Le Bouder 986be77337 vmware_host_powermgmt_policy/test: just one esxi (#66515)
Since the run the test playbook in a vcenter+1esxi scenario, there is no
need of second host.

The commit also simplify the logic of the test.
5 years ago
Gonéri Le Bouder 2d0ccdc98c vmware_host_acceptance/test: fix the functional test (#66576)
Ensure the functional test is actually run. It works fine on a real
environment.
5 years ago
Paul Belanger f46af19702
Revert "eos_config: Added fix for bug #54400 - support for !! in config mode (#63694)" (#66591)
This actually breaks iosxr_config, revert for now to make tests passing
again.

This reverts commit 7ddf7474d3.
5 years ago
Sam Doran 5db00a05b6
Disable mongodb_user test (#66595) 5 years ago
Sam Doran f15050b09e
Change package name in docker_setup integration test (#66572)
* Change package name

* Retry to hopefully get a good mirror
5 years ago
Gonéri Le Bouder a3dfabfdba vmware_host_ipv6/test: reset status before new check
Ensure a disable IPv6 before we try to re-enable it. This to get a
consistent result.
5 years ago
Gonéri Le Bouder 5280042901 vmware_host_dns: consistent rslt when name changes
This commit address a problem in static mode, if the hostname change,
`host.name` value with change too. And as a result:

    results['dns_config_result'][host.name]

will be initialized.
We now record the initial hostname first, and uses it as the key for the
results.

This commit also ensures hostname and search domain change are detected if
`instance.dnsConfig.dhcp` is true.

Finally, if we target a cluster, the `changed` result will depend on the
number of nodes.
5 years ago
Gonéri Le Bouder b183d36c53 vmware_export_ovf/test needs an ESXi
Ensure the `vmware_export_ovf` test-suite runs with at least one ESXi.
5 years ago
Gonéri Le Bouder 437b8b3807 vmware_export_ovf/test: don't use a rescue block in test
By using a `rescue` block, we can potentially hide a really problem in the
block and return a success. This is a bit problematic for a functional
test.
5 years ago
Gonéri Le Bouder ae6317004e vmware_guest_network/test: create the dvswitch
Ensure the DVSwitch and the portgroup are created by
`prepare_vmware_tests`.
5 years ago
Mario Lenz 864a3fd59d VMware: Add advanced settings to vmware_cluster_drs (#66233)
* VMware: Add advanced settings to vmware_cluster_drs

* Add DRS advcanced settings example
5 years ago
Sam Doran 9b7198d25e
file - change _diff_peek type in argument_spec (#60428)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
5 years ago
GomathiselviS 7ddf7474d3 eos_config: Added fix for bug #54400 - support for !! in config mode (#63694)
* Corrected lint errors

* Added fix for bug # 54400

* Resolving conflicts
5 years ago
Florian Apolloner a7e4479d01 Fix DNF idempotency. (#66209) 5 years ago
Anusha Hegde 9fd66556a6 VMware: new module to clone VM/template Cross-vCenter (#66156)
* Adding documentation and integration test for the new module
* Correcting typo
* removed unused if else block
* changing error messages
* Addressed review comments
* resolving sanity error
* fixed typo in vmware.py
* Added support for datastore cluster
* adding state parameter instead of power on fixed few more review comments
* Documentation update
* Updating argument
5 years ago
haiyuan_zhang bc37ea96d5 Vmss scale in policy (#66512)
* azure_rm_virtualmachinescaleset: add scale_in_policy and terminate_event_notification

* azure_rm_virtualmachinescalesetinstance: add vmss instance protection policy support
5 years ago
Gonéri Le Bouder b9b2ddc580 prepare_vmware_tests: no waiting loop during DS probing
For a refresh of the datastore list on the vcenter, this before we
check the present of the newly attached datastores.

A lot of tests depend on the presence of the DS, and this little
change allow us to save =~ 45s everytime.
5 years ago
Gonéri Le Bouder f956581846 vmware_host_auto_start: enable the tests
- remove the unsupported alias
- refactoring
- move the hosts outside of the cluster to avoid any conflict with DRS
- import the `prepare_vmware_tests` role
- does not work with govcsim
5 years ago
Paul Belanger af3603f9ee Revert "Allow httpapi for resource modules (#62843)" (#66483)
While this does properly pass our testing for ansible/ansible devel
branch, it is currently breaking our collection testing for 2.10.

Specifically, this would mean ansible.netcommon would need to directly
import arista.eos or cisco.nxos collections, causing a circular dependency.

This reverts commit e266e5f8b6.
5 years ago
Gonéri Le Bouder 3103fd62dd vmware_vmotion/test: ensure we can run tests
Some adjustments to be able to run the test-suite properly:

- Starts with the ESXi out of the cluster to be able to deploy the
  VM on a proper host consistently
- Ensure the resource pool exists
- The resource pool is called `DC0_C0_RP1`, not `Resources`
- Avoid an exception if we try to move a non existing VM.

Put the test in the zuul/vmware/vcenter_2esxi group.
5 years ago
Abhijeet Kasurde afb71c14bd
VMware: Use existing DVPG network in vmware_guest_network (#65994)
* Handle all cases of networks

Fixes: #65968

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Gonéri Le Bouder 222b6dec8a vmware_guest_serial_port: avoid autoselect_datastore (#66481)
Avoid `autoselect_datastore` until #58541 gets fixed.
5 years ago
Nathaniel Case e266e5f8b6
Allow httpapi for resource modules (#62843)
* Redo tests to be transport agnostic

cli -> eos config

Redirect connection for httpapi
5 years ago
Sam Doran ad341ea4bb Fix unarchive integration test failure due to rpm error (#66420)
* Fix unarchive integration test failure
* Do not cleanup pip packages
5 years ago
Matt Clay 51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
5 years ago
Gonéri Le Bouder 223e1675f4 vmware_local_role_info/test: avoid json_query
Refactoring to avoid the use of `json_query`. As a bonus point, we now
also ensure `NoAccess` role has no provilege.
5 years ago
Felix Fontein a79ca57d22
Fix aws_ssm connection plugin. (#66393) 5 years ago
Felix Fontein 663f9cda25
Disable failing tests. (#66391) 5 years ago
Felix Fontein c380b18dcf
openssl_* modules: allow direct input for some files (#66384)
* Allow to not read content from file.

* Allow to feed content directly into _info modules.

* Allow to feed non-primary content into openssl_certificate, openssl_csr and openssl_publickey.

* Rename changelog.
5 years ago
Andrew Klychkov 515c4a7e2c Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3 (#66331)
* Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3

* add changelog

* fix

* change changelog fragment, add example
5 years ago
psharkey f8fb391548 new connection plugin aws_ssm (#49652)
* new connection plugin aws_ssm

Return code may be at the end of the last command output line.

Marking regex.

Ensure command status code is on it's owm line - last 3 lines are not part of command stdout.

* Adding timeout parameter - aws_ssm_timeout

Default 10 second timeout (https://docs.ansible.com/ansible/2.4/intro_configuration.html#timeout) is marginal.
This avoids changing this default and allowing the SSM timeout to be controlled via inventory.
This change wraps commands so commands which may never return do timeout.

* Added integration tests

Added AWS SSM Executor, target and config functions

Fixed more code for integration tests

Improved execution

Added S3 bucket name

Fixed pylint

Reverted lib changes

Reverted few more changes

Improved support for integration test execution

added ansible role for aws_ssm_integration_test setup and teardown and modifiled runme.sh

Reset to 17fa565 commit

inventory file location changed

change inventory file location

deleted meta and handlers folder as it is not required

deleted main.yml inside vars, removed extra space from tasks/main.yml, Added appropriate tags for ec2 and delete test folder as it is not required

deleted main.yml inside vars, removed extra space from tasks/main.yml, Added appropriate tags for ec2 and delete test folder as it is not required

modified task/main.yml

added region variable and fixed pattern for using variable

modified policy for IAM role

moved to first line of scrip set -eux

Updated Session Manager plugin installation

edited custme policy

Included tags for Session Manager plugin installation

Added README.md

Upddated README and added support for ssm-plugin for Amazon-Linux

Added Windows Integration test support

Improved user data for Linux

Added random value generation for the role and policy,delete vars_to_delete.yml

upadte README in vars

fixed typo

update policy

Updated IAM policy file

update playbook

Updated playbook to include ssm-agent userdata

modified jing2 template

modified jing2 template

modified jing2 template and fixed role deletion

fixed role name issue while deleting and task name

Updated playbook to include wait_connection for ec2

Corrected Synatx changes and updated ssm-plugin debian file

Changed region variable to us-east-1

Removed vars file and updated  to /tmp dir

fixed typo

Improved setup

Fixed boto3 dependency

Fixed missing tag

Added boto as dependency as well

Improved execution workflow

Trying other way of defining tags

Fixed undefined var

Changed AMI ID to Amazon Linux

Improved Tags

Ok, created different directory for WIndows test execution

Fixed IAM Role Name for Windows

Fixed inventory not found

Improved integration test execution

Fixed Windows Inventory path

Fixed wrong Windows AMI ID

Fixes issue for windows test execution

* Don't attempt to terminate sessions without a session id.

* Added Unit test cases file for AWS SSM Connection plugin

updated test file with close

updated unit test file with start_session

updated test files

* Eliminate AWS CLI dependency for terminal session.

* Removing unused code, cleanup logic.

Reduce mark length - 52^26 should be plenty
Be explicit about subprocess.Popen options
Simplify if/else for mark end
_stdin_readline is not used now

* updated test file

Added exec command and fixed close session unit tests

updated test files

Improved ansible ssm test command

updated file for lint checks

updated for pylint checks

New Unit_testcases for pre-signed URL file

removing additonal spaces and white spaces

remaning error changes

fixed changes

fixed spaces issues

python 2.7 version and whitespaces

python 2.7 version and whitespaces

python 2.7 skip if

space issue with 16:1

Unit test cases for windows and linux

Unit test cases for windows and linux with issues fixed issues

Unit test cases for windows and linux with issues fixed issues1

* Added support for S3 Pre-signed URLs

* Updated documentation and comments

* Documentation and curl dependency removal for controller machine

Fixing lint errors and removing requirements.

* Adding support for Windows remote EC2 instances.

* Added Encoding fixes

* Updating author section and adding obvious requirement for the SSM agent.

* Refactor stdout post processing
Attempt to get real return code on error (test using ansible -m raw -a 'cmd /c exit 99'.
Fixes problem at terminal width (ansible windows -i ./hosts.yml -m setup).

* Refactor back to a single module.

* Fixed fetch file for windows

* ssm usage examples for linux and windows

* Update aws_ssm.py

Service state corrected.

* Strip line continuation when at terminal width - otherwise replace.
Strip ANSI control sequences only for Windows.

Test playbook:

---
- name: test
  hosts: windows
  gather_facts: False
  vars:
    small: 'abc'
  tasks:
  - name:
    set_fact:
      large: "{{ lookup('password', '/dev/null length=2000 chars=ascii_letters,digits,hexdigits,punctuation') }}"
  - name: small fixed
    raw: echo '{{ small }}'
    register: small_result
    changed_when: False
  - name: check
    assert:
      that:
        - "(item | length) == (small | length)"
        - "item == small"
      msg: "'{{ item | length }} must equal '{{ small | length }}' and '{{ item }}' must match '{{ small }}'"
    with_items:
      - "{{ small_result.stdout_lines[0] }}"
  - name: large random
    raw: echo '{{ large }}'
    register: large_result
    changed_when: False
  - name: check
    assert:
      that:
        - "(item | length) == (large | length)"
        - "item == large"
      msg: "'{{ item | length }} must equal '{{ large | length }}' and '{{ item }}' must match '{{ large }}'"
    with_items:
      - "{{ large_result.stdout_lines[0] }}"
  - name: gather facts
    setup:

* Correct module parameter names.

* Updated Windows Executable variable.

Updated Windows Executable variable to "ansible_shell_type".

Fixing Examples with raw declaration

Updated the plugin timeout variable.

* Fix to work with dynamic inventory plug-in

* IntegrationTest template updates

* Removing unsupported flag for integration tests.
Fixing unit test.

* Adding shippable group.

* SSM Usage examples with dynamic inventory plugin

* Fixing yamllint errors.

* Fixed Integration tests

* Fixed Integration tests

* Updates for python3.

Removing python3 restriction.

* Remove python3 restriction.
Change block from retry to always

* Fixed Integration tests with Python 3

* Fixed shellcheck

* Fix for Windows which could pick up end mark prematurely
Move debug to _wrap_command and use a single return point

Single-quotes not needed around linux marks
Fix typo in comment

End mark to new command.

* Unit test cases now works on Python2 and Python3

* Skip tests on Python 2.6

* Fix for wait_for_connection module for windows.

* Updated changes as per review comments

* Fixing broken pipe error seen with session-manager-plugin version 1.1.17.0.
Eliminating sleep as this looks to be fixed in session-manager-plugin version 1.1.17.0.

* Adding back delays for Windows with session-manager-plugin 1.1.17.0.

* Updating Windows AMI ID for integration Test

* Upgrading windows ssm agent to the latest

* Adding boilerplate code.

* Windows ami and integration test updates

* Revert "Windows ami and integration test updates"

This reverts commit cd6ca3579b7cda584bd9c065f9c0835bddb23627.

* Updating windows ami for Integration tests

* Integration test suite updates and fixes.

* Updates and fixes

* Eliminate duplicate processing for exit code on failed command.

* Add powershell wrap.

* Refactor windows post_process.

* AMI Lookup, aliases, OSC filter, test suite updates

Co-authored-by: Gaurav Ashtikar <gau1991@gmail.com>
Co-authored-by: Deepak Choudhary <40276333+deepsvc@users.noreply.github.com>
Co-authored-by: Hanumanth <46720371+hanumantharaomvl@users.noreply.github.com>
Co-authored-by: KUMAR MAYANK <mayank@flux7.com>
5 years ago
Matt Clay f695f40133 Temporarily mark unarchive test unstable. 5 years ago
Sam Doran 22be69188b
Fix unarchive integration test on CentOS 6 (#66362)
* Cleanup packages added for Python TLS support
5 years ago
Gonéri Le Bouder ce66743b10 vmware_category/test: ensure test can run on Zuul
- set the zuul/vmware/vcenter_only alias
- import `prepare_vmware_tests` role
- little refactoring to avoid an extra level of indentation
5 years ago
Gonéri Le Bouder 0703590686 vmware_vm_info/test: drop dep on json_query
Test refactoring to avoid dependency on `json_query`.
5 years ago
Chris Van Heuveln 3ebc96e5c7 nxos_l3_interfaces: fix states, add new minor attributes (#64853)
* (WIP) nxos_l3_interfaces: fix states, add new minor attributes

* sa cleanup

* more regression fixes

* test_8 for add'l code coverage

* Fix regressions to handle mgmt w/o IP

* add 'no system default switchport' to regression setups

* add err msg to terminal_stderr_re so that cli_config will catch L2 failures

* regression test change: /int4/int3/

* Add default rsvd_intf_len for Zuul CI

* Fix replaced-with-no-ipaddr and ip redirect issues
5 years ago
Jordan Borean 7ed00a1560
Fix up deprecated_aliases spot for PS (#66326) 5 years ago
Sam Doran 397ec6f291 Add comment about not installing requests 5 years ago
Sam Doran db491eca0e Do not install requests[security] for MongoDB tests
This was previously removed in PR ##60083 but was added again in
PR #61257. This will cause a lot of things to fail if it is uninstalled
during cleanup after the test role, which is why it was originally removed
from the test.
5 years ago
Jordan Borean 595ab62ab8
Ansible.Basic - Added deprecated_aliases (#66323) 5 years ago
Jordan Borean aba8f12495 ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list
5 years ago
Rhys Campbell 609c3d0e36 mongodb_user module integration tests (#61257)
* Add final commits

* End of night commit

* Add further tests

* What is this doing here?

* Remove file from commit

* Change os check

* Change version check
5 years ago
Rhys Campbell 559de7ee1e mongodb_parameter module integration tests (#61644)
* Add final commits

* End of day check in

* Initial commit

* Remove file

* Remove module from pr

* Run tests
5 years ago
Andrew Klychkov 70bc351f31 mysql_query: new module (#65941)
* tmp

* mysql_query: new module

* remove irrelevant changes from mysql.py

* add autocommit keyarg to mysql_connect

* add basic CI tests

* tmp

* fix CI tests

* add CI tests

* fix comment in CI tests

* remove path_to_script option

* refactoring

* change tests formatting

* add single_transaction param

* fix sanity

* add note

* fix
5 years ago
Matt Clay a5c36eedd8 Simplify docker_setup on Fedora.
This avoids installing dnf-plugins-core, which breaks the yum and dnf modules
when uninstalling packages using a wildcard after they have already been removed.

This should resolve issues with the yum integration tests failing after docker tests run.
5 years ago
Gonéri Le Bouder 66550cd3c2 vmware_guest/test: create test vm in correct directory
Ensure we already create the `test_vm3` VM in the `{{ f0 }}` directory.
This to be sure the teardown playbook will be able to clean it up at the
end. This to avoid problem like this one:

```
Multiple virtual machines with same name [test_vm3] found, Folder value is a required parameter to find uniqueness of the virtual machine
```
5 years ago
nkshrishail 01e4c41be4 nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)
* nxos_integration_tests: Removing obsolete provider parameter

* nxos: removing support for local-nxapi plugin

* nxos: removing LocalNxapi plugin implementation

* nxos_nxapi: removing local plugin usage

* REVERT - nxos: removing LocalNxapi plugin implementation

* Addressing yamllint issues

* Removing the condition on the debug messages

* Restoring changes done to nxos_nxapi* tests

* Retaining timeout of 500 on nxos_smoke test

* Some cleanup

* Addressing latest comments

* Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
5 years ago
Nathaniel Case e19b94f43b
Add test for reboot & wait_for_connection on EOS & IOS (#63014)
* Add test for reboot & wait_for_connection

* Add test for ios

* Collection-proof block test

* Add junos test

* Don't try to evaluate cli context unless using the connection

* Prevent infinite recursion
5 years ago
Mads Jensen 10cc2e2b47 Stop using {{ }} in templates for conditionals in integration test (#65797)
Co-Authored-By: Matt Martz <matt@sivel.net>
5 years ago
Nilashish Chakraborty 97aefb8e11
Temporarily disable vpc peer-link tests (#66121)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Sam Doran 22855f73fb
Remove unstable from yum tests (#66218)
They seem to be stable again on Fedora 31.
5 years ago
Anthony Bourguignon d3e9ef3c35 add a path_join filter which joins path components (#62713) 5 years ago
Rohit 8ae5e34127
pre cleanup services (#66188)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
5 years ago
Markus Bergholz 193879d462 Assign AWS Cloudwatch Metric Filter via Ansible (#59925)
* #42292 first draft.

* fix some documentation

* use snake dict keynames

* return metric filter variable

* rework documentation

* try to fix documentation. fix condition when defaultValue is 0. update version string

* fix intenion, syntax and undefined

* try solve state documentation

* define type for state in doc

* rework integration test and fix minor typos

* add defaults for integration test

* update documentation, integration tests, and return value

* fix code formatting and documentation

* irgnore errors in ignore block

* Update lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group_metric_filter.py

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* add options to metric_transformation

* fix pep-8

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Felix Fontein b0b00b555f
docker_container: configure removal wait timeout (#66144)
* Add support for timeout while waiting for state.

* Allow to limit removal wait time.

* Add changelog.

* Forgot version_added.

* Add some check mode tests.

* Use removal_wait_timeout in tests.
5 years ago
Abhijeet Kasurde 9a13d56b26
Misc typo fixes (#66120)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Emerson "Duke" Almeida 865e767d39 PostgreSQL : Create unique index (#66157)
* Postgresql : Create unique index

TODO:

* fix syntax error

* add version added

* adding specs and improve doc

* add changelog

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* remove check about concurrent

* Apply suggestions from code review
5 years ago
Andrew Klychkov 4ecc9da244 mysql_db: add master_data parameter (#66048)
* mysql_db: add master_data parameter

* add changelog

* fix CI
5 years ago
Rohit 2f996fc6e2
vyos_config bug fix #66110 (#66122)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
5 years ago
Matthew Davis 5493ea590c make concurrent aws_acm integration tests not clash (#64660)
* add uuid for aws_acm test resources, allow concurrent tests

* remove debug task in aws_acm int test
5 years ago
Hannes Ljungberg f31b8e08b2 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Felix Fontein 17ef253ad1
docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.
5 years ago
Mike Wiebe c2fed8603c Fix nxos_user roles bug (#65962) 5 years ago
Abhay Kadam 2fa8f9cfd8 Fix env lookup plugin error on utf8 values (#65541)
This commit fixes issue #65297.

The env lookup plugin used to fail when environment variable value
contained any UTF-8 characters (e.g., δ, ζ).
5 years ago
Abhijeet Kasurde 683c467609
Check if task file is specified for import_tasks (#57572)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Stefan Horning 6fa070e824 Fix to return data when using lambda_info module (#64548)
* Fixed issue 64479 with lambda_info module

* Added integration tests for lambda_info module

* Moved lambda_info tests into already existing aws_lamda testsuite for easier test setup.

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Matt Clay 342b9953bc Disable failing azure_rm_storageaccount test. 5 years ago
Sam Doran 18130e1419
user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
5 years ago
Mark Chappell 50eb4eec90 fix ec2_vpc_net test instability (#65184)
* Move ec2_vpc_net tests to group1, group2 is running much longer

* Allow for VPC CIDRs to be "associat*ing*", things in AWS are "eventually consistent" and occasionally take longer than we would like
5 years ago
Alexandre Mulatinho 7bb925489e elb_{network_lb,target_group}: allow UDP/TCP_UDP (#65828)
elb_network_lb.py: allow UDP and TCP_UDP protocols

- Fixing documentation
- Add support to UDP and TCP_UDP as described on AWS SDK

elb_target_group.py: allow UDP, TLS, TCP_UDP proto

- Fixing documentation
- Making health checks with response codes and paths only in HTTP/HTTPS
- Allow UDP, TLS, TCP_UDP protocols as described on AWS SDK.

others:
- Added changelog fragments
- Integration test

Fixes: #65265
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
5 years ago
Baptiste Mille-Mathias 32a8b620f3 [get_url] Return status_code on HTTP 304 (#65739)
Return field status_code on HTTP status 304 (implemented by lkthomas)
Add an integration test for this case.
Fixes #65263
5 years ago
Mario Lenz fec883dfff VMware: Add advanced settings to vmware_cluster_ha 5 years ago
Sloane Hertel c870457339 free strategy - include failed hosts that were notified (#65576)
* free strategy - include failed hosts that were notified so --force-handlers is used

* trim line length a bit

* Loop over the force handler tests with the strategies linear and free

* rename changelog

* Use the play iterator instead of TQM for accurate failure representation in blocks

* Remove hack in a backwards compatible way for 3rd party plugins
5 years ago
Gonéri Le Bouder 89703b3284 vmware/test: more modular teardown.yml
Some teardown tasks are now enabled only if we have ESXi in the configuration
file. On my system and in a vcenter only scenario, `vcenter_folder` goes from
42.7 to 31.2s.
5 years ago
Clint Byrum 284f26303c Add support for ECR Lifecycle Policies to ecs_ecr (#48997)
* Fix copy/pasta for ecs_ecr test names

* Add support for lifecycle policies to ecs_ecr

New feature for ecs_ecr to support [ECR Lifecycle Policies][].

Fixes #32003

 [ECR Lifecycle Policies]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html

* Improve error message for ecs_ecr parsing errors

Replaces the exception and stack trace with a description of what's
actually going wrong from a user perspective.

* Rename delete policy to purge policy

Marks the `delete_policy` parameter as deprecated, to be removed in
Ansible 2.6.

* Add version_added to purge_policy

* Remove changing results based on verbosity

What I really want is --diff support, and changing results based on
verbosity is abnormal.

* Ensure repository name is lowercase

* Fix deprecation cycle to 4 releases

* Use a YAML anchor for credentials

* Remove filters from assertions

* Add minimal permissions needed

* Updating version_added and deprecation cycle

The original PR sat while a few releases happened.

* Bumping version added and deprecation version

We missed the 2.8 release.

* Removing bare except:

This is not allowed and is generally bad practice.

* Fix lint errors

* update ansible release metadata

* Use the new alias deprecation scheme

This was added in the time the PR has been in development, so rework
things to use it.

* Add test coverage

This makes sure that lifecycle_policy is produced when passed in.

*Also a minor suggestion for simplification from PR.

* Restore changes from 62871 lost in rebase

* Add changelog

* Remove version_added for new purge_policy option

Per sanity test fail.
5 years ago
Kevin C e9267bf6d6 Cloudformation info checkmode (#65958)
* set supports_check_mode=True

I don't see any reason why this module cannot run in check mode.  The following API calls are made, none of which modify configurations

All using boto3.client('cloudformation')
describe_change_set
describe_stacks
describe_stack_events
get_paginator
get_stack_policy
get_template
list_change_sets
list_stack_resources

* duplicate cloudformation_info tasks with checkmode

Duplicated all existing cloudformation_info tests and added check_mode: yes to them

* delete duplicate empty line
5 years ago
Justin Ossevoort 14ebceec25 Fix 'Assert CNAME failure' assertion (#65875) 5 years ago
ivog74 bd989052b1 Add ansible cli options --ask-vault-password and --vault-pass-file (#63782)
* Move new Ansible cli options '--ask-vault-password' and '--vault-pass-file' to the existing calls to add_argument
* Add changelog fragement
* Change order of ansible cli arguments to use --ask-vault-password and --vault-password-file by default
* Update runme.sh in vault integration tests to test new options --ask-vault-password and --vault-pass-file
5 years ago
Gonéri Le Bouder 3ed0b2c7ea vmware/test: init esxi_user with esxi1_username
By default, `esxi_user` is initialize as `root`. We now use `esxi1_username`
instead.
5 years ago
Gonéri Le Bouder 8d6b9cf6e0 prepare_vmware_tests: add scenario with one ESXi
Add the ability to test with just one vcenter instance and a single
ESXi. This allow us to cover 90 modules.
5 years ago
Abhijeet Kasurde b31b5d105a
vars: Fail with warning for extra_vars filename without @ sign (#59915)
Rather than silently processing extra_vars filename without @ sign,
CLI now fails with appropriate warning about requirement.

Fixes: #51857

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Mark Chappell c40832af48 ec2_launch_template: Add default_version and latest_version to output, matching the documentation (#61279)
- Add tests for default/latest version manipulation
5 years ago
Mark Chappell 791e9dabe3 Run ec2_instance tests in parallel and re-enable them (#63800)
* Run ec2_instance tests in parallel

* Make sure we spin up the iam_instance_role instances in the dedicated VPC

* Rework a little to only build one VPC while still running in parallel

* Start running the tests within shippable

* We only use setup_remote_tmp_dir for the version_fail tests, so only set it up once

* Make sure we clean up if we fail during Environment Setup

* Add a warning about running in parallel

* Minor review tweaks

* Remove unused file
5 years ago
Kevin C 45a413a4a2 Add ChangeSets to cloudformation_info + updates (#64571)
* cloudformation_info updates

Add ability to retrieve stack change sets
Update module to use AnsibleAWSModule
Update backoff to use new decorator style
Updated exceptions to use fail_json_aws
Converted outputs to snake_case where appropriate, for cloudformation_info only to preserve cloudformation_facts functionality.
  Unconverted keys are stack_outputs, stack_parameters, stack_policy,
  stack_resources, stack_tags and stack_template

* cloudformation_info updates

Add ability to retrieve stack change sets
Update module to use AnsibleAWSModule
Update backoff to use new decorator style
Updated exceptions to use fail_json_aws
Converted outputs to snake_case where appropriate, for cloudformation_info only to preserve cloudformation_facts functionality.
  Unconverted keys are stack_outputs, stack_parameters, stack_policy,
  stack_resources, stack_tags and stack_template

* Adding integration tests

* Remove unneeded debug statement

* Add myself to Authors

* rename stack-name to match iam policy limits

aws-terminator permission for cloudformation have the following resource
Resource: arn:aws:cloudformation:us-east-1:{{ aws_account_id }}:stack/ansible-test*
updating test stack name to match

* removing .orig file from rebase

* fix stack name, underscore not allowed

* rename integration testsuite to cloudformation

rename per request

* add resource_prefix to resource names

* prefix stack name with ansible-test

IAM policy in aws-terminator requires the stack name to begin with ansible-test

* add single quotes around variable in test

* fix test for display name

mistakenly updated when changing topic_name to use resource_prefix.  The test is to check the display name, which is what the stack update changes

* fix value to display name test

* rename main.yaml to main.yml before rebase

* Merge tests with  #65643

remove uneeded files
using tests from #65643 with added check to validate changeset is present in info when requested

* fix assert on chageset check

* remove trailing blank line
5 years ago
Nilashish Chakraborty ae0df67539
Add debug (#65909)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Paul Belanger a1381d6e67
Add connection_local / connection_httpapi skip to eos (#65948)
This starts to allow us to break jobs out per connection testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Prasad Katti b8729b2544 cloudformation integration tests (#65643) 5 years ago
Paul Belanger f76dded9c6
Split ios tests into network_cli and local connections (#65921)
This allows to group tests by connections, which allow us to disable
local connection testing in collections for the moment.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Micah Hunsberger a54e77193b New Windows Module: win_certificate_info (#64035)
* win_cert_stat initial commit with tests

* documentation fix.
first attempt windows server 2008 compatibility

* add formatted dates
removed debug tests

* make choices generic list

* return a list of certificates
use .net x509 store instead of PS cert provider

* fixed tests file

* fix timestamps returning null

* rename to win_certificate_info

* rename tests win_certificate_info

* return certificates as a sorted array
open the store with readonly privileges

* extensions always returned as an array
5 years ago
Jordan Borean ae6fc265c9
Add-Type - Added a way to reference assemblies by type name (#65866)
* Add-Type - Added a way to reference assemblies by type name

* Also add architecture symbols during compile time

* Fix stray output values
5 years ago
Sam Doran 6f76a48f59
Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
5 years ago
Suhas Bharadwaj 0a04a5efc2 adding the modules to /nxos/storage/ folder (#64269)
* adding the modules to /nxos/storage/ folder

* fix pep8 stuff

* fixed provider specific information from doc

* Fix integration tests

* Added tested against note

* Review comments

* added assertions for the commands sent in the integration tests
5 years ago
sky-joker 7b2cfdacd0 Zabbix: Handle KeyError in zabbix_host module (#65392)
Fixes: #65304
5 years ago
Adrián López dac3bf5b71 zabbix_host: interface.port parameter is a string (#64986)
interface.port should be a string to be able to use macros in that
value.
This fixes the case when interface.port is a macro (eg.: "{$MACRO}" and
force=false.

Because, until now, setting the interface.port to an integer was the correct way to work with force=false, a type validation has been added
to that parameter.
Previously, if a string was used for interface.port, it was converted
to an integer, the comparison didn't work (if interface not in interfaces)
and the module tried to register the same interface twice, returning an
error.

Zabbix API manual specifies that only 'main, 'type', 'useip' and 'bulk'
are integers.
https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/object

Tests are changed to use always str in the interface.port.

Two new tests are added.
The first one is to show that now registering a host with force=false and
a macro in interface.port works.
The other one tests that interfaces defined using string for port are
compared correctly when force=false is used. Previously it was
a comparison between int and str, interfaces were seen as different
and an error was thrown because we were trying to create twice a main
interface.

* Try to kindly convert interface port to the string

As suggested, the previous behaviour could break current configurations. This solution accepts integers and strings.

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
5 years ago
Ola Nyström 8165ce6144 add prefix-list to ios_bgp af-mode (#62705)
* adding prefix-list to ios_bgp

* adding prefix-list to ios_bgp

* Fix copy-paste bug in test

* Adding neigbor 10.10.20.20 to global neighbor pool

* Added prefix_list_in and _out to documentation

* Rewrite bgp prefix_list test

* Bugfix in yaml data

* More test, assert neighbor 10.10.20.20
5 years ago
Ganesh Nalawade 88008badb1
Fix nxos_file_copy option value path validation (#65423)
* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments
5 years ago
Andrew Klychkov 885cecfc94 postgresql modules: use query parameters with cursor objects (#65791) 5 years ago
Andrew Klychkov 24b1409667 postgresql_sequence: use query parameters with cursor object (#65787) 5 years ago
Tad Merchant ab54736e12 Add tags to aws ecs task (#53717)
* Add tags to ecs_task

remove older reference to credentials

* uncomment shell commands to enable/disable account settings

* Fix documentation and pep8 issues

* fix review items for ecs_task tags

use missing_required_lib for tags
change fail_json message to suggested message
switch from task_tags to tags for consisitency

* Add import for missing_required_lib function

* Tidy put-account-setting tasks and add permission

Using `environment` and `command` rather than `shell` avoids the
need for `no_log` and means that people can fix the problem

* update version added for ecs_task tags

* fix tests after removal of ansible_facts from ecs_service_info, add delay when service is still draining

* Add documentation for sanity tests
5 years ago
Chris Van Heuveln d72025be75 nxos_interfaces: RMB state fixes (#63960)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix
5 years ago
Tad Merchant 493ec588ab Ec2 metric alarm boto3 and treat missing data (#62669)
* Converted ec2_metric_alarm to boto3. Added treat_missing_data option.

* Handle potentially non-existent alarm keys in ec2_metric_alarm module

* Add treat missing data to ec2_metric_alarms wth some tests

Continues the work of #23407

* Clean up ec2_metric_alarm main test playbook

* fix test suite and sanity checks

* more fixes for sanity tests

* fixes to ec2_metric_alarms requested in code review

* import ClientError from botocore, catch generic ClientError

* more fixes from review

drops extra dict in argument spec and set_facts for aws access

* Fix pep8 blank line issue

* switch to fail_json_aws, add idempotency test

* fix under indented continuation

* remove unsupported alias

* Add group to ec2_metric_alarm aliases

* Put alarm prefix before resource prefix to match aws-terminator pr 63

* Add type for treat_missing_data
5 years ago
Pilou 226bf7b227 apt target: use 'until' when the cache is updated (#65456)
This integration target can be unstable due to network/mirror issues:

    TASK [apt : uninstall hello with apt] ***
    fatal: [testhost]: FAILED! => {
        "changed": false,
        "cmd": "apt-get update",
        "msg": "E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/universe/source/Sources.gz File has unexpected size (354740 != 354745). Mirror sync in progress? [...]",
        "rc": 100,
        [...]
5 years ago
Nilashish Chakraborty 7af98f9724 Always cleanup vlan interfaces (#65756)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Andrew Klychkov 0079b8eaa2 mysql_info: add return_empty_dbs parameter (#65755)
* Bugfix of 65727: mysql_info doesn't list empty DBs

* add changelog

* mysql_info: add return_empty_dbs parameter

* fix
5 years ago
Abhijeet Kasurde 41e19a4058
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides
non-existing limit file.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde 19220a0607
VMware: Add associable_object_types in vmware_category (#62347)
User can specify associable object types while creating the categories.
VMware API does not allow to modify associable object types after creation of
category.

Fixes: #61220

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Paul Belanger bcc2ffdbf9
Fix version_compare with nxos_snmp_user tests (#65527)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Paul Belanger da82ecadd6
Use fact cache to make nxos tests faster (#65479)
This should cut down about 1hour worth of test time, due to not looping
over the set_fact functions more then 60 times.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Prasad Katti 056b035c98 add module aws_step_functions_state_machine_execution (#64431)
* add module aws_step_functions_state_machine_execution

* AWS step functions tests - Use module defaults

* Return all attributes from aws api calls as ansible task output

* aws_sfn - make start and stop execution idempotent and fix check mode

* aws sfn - use build_full_result method of the paginator

* aws sfn - remove changes made to help with local debugging
5 years ago
Gonéri Le Bouder 030b20b024
prepare_vmware_tests: ensure 'VM Network' exists (#65616)
Depending on the ESXi configuration, the 'VM Network' may missing.
5 years ago
Paul Belanger d39870a693 Remove unused code in nxos_user (#65529)
There is no longer the need to warn on password, it is not supported any
more.

Update nxos_user tests not to purge current SSH user for nxos, otherwise
we loose access for testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Toshio Kuratomi ddd786eedf Fix tests which have unparsable yaml 5 years ago
Sam Doran 7767f0bb23
Mark yum tests as unstable (#65671)
Fedora 31 tests are failing due to a missing packages error. I am unable to duplicate this issue when running locally, so it is possibly an issue with a mirror that is being used when run from Shippable
5 years ago
Felix Fontein ecb6f2e76c Fix bug in format handling. (#65642) 5 years ago
Felix Fontein 57c042243f
crypto modules: fix various errors in argument specs (#65633)
* Fix various errors in crypto module argument specs.

* Adjust PR #.

* Fix provider requirement.

* Make sure openssl binary is installed.
5 years ago
Felix Fontein e9cec0262d
docker_* modules: fix various errors in argument specs (#65632)
* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.
5 years ago
Matt Martz 03a4edb477 Add method to automatically clean up after an action plugin (#65509)
* Use correct var, move cleanup for async
* Add changelog and tests. Fixes #65393. Fixes #65277.
* Kill off all long running async tasks from listen_ports_facts
* Update task to work with older jinja2
5 years ago
Gonéri Le Bouder b8cd4c5409 remove some tests from zuul/vmware/vcenter_only
Depends-On: ansible/ansible-zuul-jobs#253

We cannot run the following tests without any ESXi host:

- vmware_drs_rule_info
- vmware_drs_rule_facts
- vmware_host_acceptance
- vmware_host_active_directory
- vmware_host_powerstate
5 years ago
Lukas Kämmerling 5ad61ed7c1 Fix and reenable hcloud tests 5 years ago
Sergey e444e68bf0 Add podman_container_info module (#64361)
Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Jürgen Hötzel 47aea84924 Don't return module error when mysql_connect fails (#64560) (#64585)
* Don't return module error when mysql_connect fails (#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (#64560)
5 years ago
Jordan Borean f21e72d55a
win_package - Use newer module wrapper as refactor baseline (#65586)
* win_package - Use newer module wrapper as refactor baseline

* Fix aliases in new arg spec
5 years ago
Jordan Borean 9a81f5c3b7
win_uri win_get_url - Fix up redirection defaults (#65584) 5 years ago
Jordan Borean fcdebe41e9
win_find - Refactor for better performance and alignment to find (#65536)
* win_find - refactor to make more performance and use newer style

* win_find - refactor for performance improvements and alignment to find

* More path alignment to find

* Fix yamllint error
5 years ago
Gawain e1be5a8acb vmware host system fact add uuid (#65415)
* vmware host system fact add uuid
5 years ago
Andrew Gaffney 8a409f37db Throw an error on unsupported vars_prompt keys (#65487) 5 years ago
Paul Belanger b975fd407d
Remove timeout from nxos tests (#65470)
This fixes the following:

  Unsupported parameters for (nxos_rollback) module: timeout unsupported

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Andrey Klychkov c59e061cff mysql_info: add exclude_fields parameter (#63371)
* mysql_info: add exclude_fields parameter

* mysql_info: add exclude_fields parameter, add changelog fragment

* change logic
5 years ago
Andrey Klychkov 8f78a0f8bf postgresql_publication: use query params with cursor object (#65404)
* postgresql_publication: use query params with cursor object

* add changelog
5 years ago
Andrey Klychkov 0c71249b03 mysql_db: add force parameter (#65547)
* mysql_db: add force parameter

* mysql_db: add force parameter

* add changelog

* add the param to state dump
5 years ago
Andrey Klychkov c266fc3b74 postgresql_db: add executed_commands returned value (#65542)
* postgresql_db: add executed_commands returned value

* add changelog

* fix tests
5 years ago
Jordan Borean 4d3ebd65db
win_auto_logon - check, diff and store pass in LSA (#65528)
* win_auto_logon - check, diff and store pass in LSA

* Ensure baseline keys are set for test

* Skip remove item prop on check mode due to win bug

* Start at a cleared baseline to ensure old LSA secrets are cleared
5 years ago
haiyuan_zhang cff80f1319 azure_rm_galleryimageversion: support data disk snapshot as source input (#65405)
* azure_rm_galleryimageversion: support data disk snapshot as source

* fixing typo
5 years ago
PRASOON KARUNAN V 2dcaa108d8 Adding new module win_auto_logon (#63414)
* add new modul

* correct password var

* fix for linting issues

* add return values documentation

* linting fixes

* Get tests working and simplify a bit
5 years ago
Matt Clay 567c860027
Split up docker-registry test target. (#65211)
* Copy relevant docker-registry files:

docker-registry/files/nginx.conf -> setup_docker_registry/files/nginx.conf
docker-registry/files/nginx.htpasswd -> setup_docker_registry/files/nginx.htpasswd
docker-registry/meta/main.yml -> setup_docker_registry/meta/main.yml
docker-registry/tasks/main.yml -> setup_docker_registry/tasks/main.yml
docker-registry/tasks/main.yml -> setup_docker_registry/handlers/cleanup.yml

* Remove non-cleanup code from handlers/cleanup.yml.

* Remove tests and cleanup from tasks/main.yml.

* Register cleanup handler.

* Use setup_docker_registry in docker-registry test.

* Fix handler execution order.

* Split out docker_login integration test.

* Move remaining tests into docker_image test.

* Cleanup before running docker_image options test.

* Improve reliability of test cleanup.

* Move files for conditional inclusion.

* Set proper conditions on tests.

* Rename tasks file for conditional inclusion.

* Conditionally include tasks.
5 years ago
Gonéri Le Bouder a8efe7442c
vmware/test: set vmware/scenario/vcenter_only alias (#65515)
Add the `vmware/scenario/vcenter_only` alias to be able to identify the
vmware test roles that can be tested with just on vcenter instance.

Also, add a check to be sure we don't try to attach ESXi hosts if none
has been defined.
5 years ago
Andrey Klychkov 651dff6a2e mysql_db: add the executed_commands returned value (#65498)
* mysql_db: add the executed_commands returned value

* add changelog
5 years ago
Sylvain Monné 03c16096d7 Fix extract filter when key does not exist in container (#64959)
Fixes #64957
5 years ago
Daniel Mellado 9404384985
Add junos_static_routes module (#65239)
This commit adds a new network resource module for static routes on
junos devices.

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
5 years ago
RusoSova 2d074f2a31 win_description Module (#61629)
* win_description Module

Module to change Windows description and Windows license owner information.

* LiteralPath updated

changed -path to -LiteralPath in the script

* Version and metadata_version

version_added updated to 2.10
Metadata_version set to 1.1

* version updated

version_added changed to '2.10'

* Changes based on feedback

* removed some redundant checks

* Rename win_description.ps1 to win_computer_description.ps1

* Rename win_description.py to win_computer_description.py

* Module name change

* Integration tests added

* added aliases file

* Change compatibility from 2008 to 2008R2

* Update aliases
5 years ago
rnsc cfb6cb4cef Win data deduplication module (#59723)
* win_data_deduplication initial commit

* Ansible version added bump

* integration tests

* missing aliases

* Fixing documentation

* license and metadata

* documentation formating

* removing win_format ref

* documentation fixes

* trailing whitespace

* Fixing more documentation :(

* missing return

* documentation cleanup

* align copyright with doc

* indentation fixes...

* updated examples

* ignore meta and future for python doc

* removing when

* use Get-PSVolume

* Get-Volume not PSVolume

* missing updated var

* updated old drive refs

* make sure that the T drive is formated as NTFS

* path and drive_letter are exclusive

* idempotence test fix

* changing task order + reboot timeout

* implementing the requested changes to the code

* updating documentation to reflect code changes

* simplifying tests

* missing feature install before running the tasks

* pslint trailing whitespace

* putting old tests back

* missing win_format

* skip windows 2012

* Fixing message for OS check

* pass settings and dedup_job variables

* Removing unnecessary module

* logic issue

* replacing tabs with double space

* documentation fix + removing tabs

* Update documentation with recent changes

* Apply changes requested

* switch feature install with partition format

* replace tabs with spaces

* trailing whitespace

* we don't need those ignores anymore

* minor fixes

* updated test to match latest code changes

* removing dedup job task

* adding check mode yes test

* fixes for check_mode support

* updating examples in documentation

* wrong indentation for check_mode in tests

* convert indentation to spaces

* -not $check_mode

* removing unneeded spec in documentation

* Switch to Ansible.Basic

* 2.9 is already gone, so let's add this module to 2.10...

* removing useless else condition

* updated documentation

* fixing specs and removing useless try/catch + fix exit/fail

* spaces indentation

* $null check is actually needed if volume never had dedup

* Missing check_mode update

* removing required for default state in documentation

* converted tabs to spaces
5 years ago
Shachaf92 584824f560 win_share - Implement append paramtere for access rules (#59469)
* win_share - Implement append paramtere for access rules

* changed fragment

* add test

* missing bracket

* removed whitespace

* Wrong number of lines

* Forgot the actual new parameter in the test

* community review

* Change option names

* version update

* Update tests.yml

* Add idempotence to rule_action: add
5 years ago
Brant Evans ed54b9b441 add win_initialize_disk module (#58617)
* add win_initialize_disk module

* Add ability to specify disk by path or uniqueid

* Fix documentation

* fix shippable failures

* Update anisble version

* Slight tweaks to the documentation

* Small documentation fixes
5 years ago
Matt Clay 85722c360f Disable failing hcloud tests. 5 years ago
Samir Jha db709488bd Update foreman inventory to use foreman's inventory report (#62438) 5 years ago
Gonéri Le Bouder 974e8cec3d
prepare_vmware_tests: run test w/ just 1 vcsa (#65433)
Add the ability to run test with just a VCSA instance. This allow us to
test a subset of tests that don't need any ESXi nodes.
5 years ago
Kiyo Nagamine daecbb9bf0 Ensure `allow_duplicates: true` enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment
5 years ago
Yanis Guenane c19949706f vyos: Make vyos related yaml file passing yamllint (#65449) 5 years ago
Prasad Katti 37ce55fd79 lightsail - Use AnsibleAWSModule (#65275)
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes #63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
5 years ago
Mario Lenz 02e7c5a19f vmware_datastore_cluster: Added SDRS configuration (#65193) 5 years ago
Jiri Tyr a8ef5d5034 VMware: Autoselect datastore only from the given cluster/ESXi (#43435)
* Autoselect DS only from the given cluster/esxi
* Run tests only on real vCenter
5 years ago
Andrey Klychkov 0cadb952f9 postgresql_ext: use query_params (#64994)
* postgresql_ext: use query_params

* added changelog
5 years ago
Maxim Babushkin da73bbd73c openssh_keypair - Add logic to handle password protected or broken key (#64436)
* The ssh key may be created manually prior the task execution with a
  passphrase. And the task will be executed on the same key.
* The ssh key may be broken and not usable.

The module will check the private key and if the key is password
protected or broken, it will be overridden.
The check of the ssh key performed by retrieve the public key from the
private key.

Set the "self.force" check before the "isPrivateKeyValid" check.
In case of any issue with the "isPrivateKeyValid" function, the user
will be able to force the regeneration of the key with the "force: yes"
argument.
5 years ago
Hans Jerry Illikainen a0b8b85fa5 ufw: add support for interface_in and interface_out (#65382)
* ufw: escalate privileges in integration tests

A few of the integration tests for the UFW module forgot to `become`.
This is problematic if the test suite is executed as a non-privileged
user.  This commit amends that by adding `become` when appropriate.

* ufw: add unit tests for direction and interface

Extend the unit tests for the UFW module to test the `direction` and
`interface` parameters.  This will help in the implementation of a fix
for issue #63903.

* ufw: add support for interface_in and interface_out

The UFW module has support for specifying `direction` and `interface`
for UFW rules.  Rules with these parameters are built such that
per-interface filtering only apply to a single direction based on the
value of `direction`.

Not being able to specify multiple interfaces complicates things for
`routed` rules where one might want to apply filtering only for a
specific combination of `in` and `out` interfaces.

This commit introduces two new parameters to the UFW module:
`interface_in` and `interface_out`.  These rules are mutually exclusive
with the old `direction` and `interface` parameter because of the
ambiguity of having e.g.:

    direction: XXX
    interface: foo
    interface_XXX: bar

Fixes #63903
5 years ago
Hans Jerry Illikainen 2acfa0e08c Add passphrase support for luks_device (#65050)
* Elevate privileges for luks_device integration tests

Several tests in `key-management.yml` don't `become` before executing,
despite needing elevated privileges.  This commit fixes that.

* Add passphrase support for luks_device

Previously, the luks_device module only worked with keyfiles.  The
implication was that the key had to be written to disk before the module
could be used.

This commit implements support for opening, adding and removing
passphrases supplied as strings to the module.

Closes #52408
5 years ago
Gonéri Le Bouder 0407af936a
vmware/test: switch the `ro` of the two datastore (#65356)
The `ro_datastore` was actually using the value of `rw_datastore`.
5 years ago
Andrey Klychkov 6ae01d4fbd postgresql_owner: use query_params with cursor (#65310)
* postgresql_owner: use query_params with cursor

* add changelog fragment
5 years ago
Netmonk 8d6192d61e adding encoding dump/import support for the mysql_db module, with upd… (#65228)
* adding encoding dump/import support for the mysql_db module, with updated documentation, and full test suite

* fixing lint issue test #3

* fixing lint issue test #1

* fixing lint issue test #1 second time

* Improving Test to be re-entrant

* improving test to not fail on centos/6

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Comminting suggestion

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

comminting suggestion

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* adding comment

Adding comment to explain test strategy

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

accepted

Co-Authored-By: Andrey Klychkov <aaklychkov@mail.ru>

* Update test/integration/targets/mysql_db/tasks/encoding_dump_import.yml

Co-Authored-By: Andrey Klychkov <aaklychkov@mail.ru>

* Update encoding_dump_import.yml

* Fixing typoo
5 years ago
Abhijeet Kasurde 8d0c2cd4d5 include_vars: Check NoneType for raw_params (#64979)
Lookup 'first_found' returns empty list which results in
raw_params checking. Check NoneType for 'raw_params' before
proceeding.

Fixes: #64939

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jill R ee413fe414 Allow updating of ec2_group rules with EC2 classic ELB targets (#62374)
* Allow updating of ec2_group rules with EC2 classic ELB targets

Fix regression introduced in #45296 with EC2 Classic SGs

Fixes: #57247

Also add (unsupported) ec2 classic test suite with test case for this scenario

* move ec2 classic tests to conditional within ec2_group target

* clean up ec2_classic tests

* ec2_classic account can't run most ec2_group tests
5 years ago
Xu Yuandong 7f97f86303 add a new module to configure multicast igmp and enable it. (#63746)
* add a new.

* import-error

* update docs.

* add unittest.

* Update test_ce_multicast_igmp_enable.py

* add a ihtegration test.

* update for review.

* update for review.

* add notes.
5 years ago
Xu Yuandong 76e904e44f add a new module to create isis instance. (#63716)
* add a new

* update to add futuer.

* update

* update shippable

* update docs.

* update

* add unittest.

* add integration test.

* update for shippable.

* syntax error

* syntax error

* syntax error

* update for review.

* update for review.

* add notes.
5 years ago
Xu Yuandong 8c88ee3b9f add a new module to configure multicast global. (#63745)
* add a new module.

* add future

* update docs.

* update

* update

* update

* update

* add test.

* Update test_ce_multicast_global.py

* update for review.

* update for review.

* add notes.
5 years ago
Xu Yuandong 9f58e915d9 add a new module to configure mdn on interface. (#63755)
* add a new module to confiure mdn on interface.

* doc-default-does-not-match-spec.

* add unittest

* Update test_ce_mdn_interface.py

* add integration.

* update for review.

* add notes.
5 years ago
sky-joker 2242c385b2 Zabbix: zabbix_template: fix #63907 and add test case (#65236)
* Zabbix: zabbix_template: fix https://github.com/ansible/ansible/issues/63907 and add test case

* update test case
5 years ago
Xu Yuandong eb423ecec0 add a new module to configure isis on interface. (#63717)
* add a new.

* update doc

* update docs.

* update

* delete provider.

* add future.

* add unittest

* add integration test.

* KeyError

* update for review.

* add notes.

* unused codes removed.
5 years ago
Ganesh Nalawade ee3f8d28a4
Fix cli context check for network_cli connection (#64697)
* Fix cli context check for network_cli connection

Fixes #64575

*  Check cli context for network_cli connection
   at the start of new task run only.

* Pass task_uuid around to identify start of new task run

* Handle for local connection
5 years ago
The Magician cd8b42c376 Bug fixes for GCP modules (#64823) 5 years ago
Micah Hunsberger 19063166dd New Windows Module: win_file_compression (#56475)
* add win_compact module

* fixed line endings

* fix documentation

* Use cim method instead of wmi method

* renamed to win_file_compression
added single file support
added force option to avoid traversing large directory structures

* fixed end of file

* fixed renaming.
bench test still had win_compact as a module

* Removed more NTFS references and slight test tweaks
5 years ago
Sloane Hertel c1f280ba6e
Inventory CLI - Ignore settings for when vars plugins should run (#65073)
* Inventory CLI - Ignore settings for when vars plugins should run and just always run them

* Add note to porting guide

* Fix loading vars plugins

* changelog

* Remove a staging test for ansible-inventory since it ignores that setting
5 years ago
Gonéri Le Bouder 8f1af61851
vmware_guest: relax the requirements of the tests (#65192)
- 128MB or RAM is enough for most of the cases
- 1VCPU is also enough
5 years ago
Nabil BENDAFI 277dd54d45 Fix/archive empty file (#64895)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file
5 years ago
Mike Wiebe 89954e6ef5 Test fix (#65132) 5 years ago
Trevor Pounds 8daa42bb3d Support non-KV and KV v1/v2 secret engines (#64288)
* Support generic and KV v1/v2 secret engines.

Fixes #41132
Fixes #50598
Fixes #54462
Fixes #64150

* Update KV v2 compatibility notes/usage docs.

* Add tests for KV v1/v2 and generic secrets engines.

* Add changelog fragment.

* Add KV v2 behavior changes to porting guide.

* Fix pylint blacklisted name warnings.
5 years ago
Rostyslav a8fa432096 Add --override-arguments option to win_chocolatey module (#65101)
* Add --override-arguments option to win_chocolatey module

* Fix version and argument type

* Added changelog fragment and tests
5 years ago
Felix Fontein 0b8b5baecd
docker_container: add support for --cpus (#64683)
* Add support for --cpus.

* Adjust PR #.

* Add version_added.
5 years ago
Michael Cassaniti a096cd08c5 docker_swarm_service: Sort lists when checking for changes (#63887)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are 
reported changed when the order of the items is different. This PR 
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

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

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Gonéri Le Bouder 239213baee
vmware_guest: do not use autoselect_datastore in test (#65191)
Disable the use of `autoselect_datastore` until https://github.com/ansible/ansible/issues/58541
is fixed.
5 years ago
John Chen c73288ad53 user - compare macOS user properties using same type (#62973)
self._get_user_property returns a string, so when doing a comparison
using this value, cast the second variable to a string so that the
comparison behaves correctly
* Add changelog
* Add to_text import
* Add integration test
5 years ago
Pavan Bidkar d4c4c92c97 Fix issue 64503. Added pool to relocate spec (#64544)
VM relocate to destination host works without pool param when hosts are part of same cluster. but spec.pool is required when hosts are part different clusters.

Closes: #64503
5 years ago
Sam Doran d3f6943446
Remove postgresql_shared integration test (#65133)
Move test tasks into appropriate integration test
5 years ago
Jan Meerkamp 315cc2f3ea VMware: vcenter_folder checks nested parent folder path (#62741)
added possibility to create Subfolder by defining full path below datacenter

Closes: #64442
5 years ago
Diane Wang d05d5cfc39 VMware: add new module vmware_guest_controller (#59615)
Add the `vmware_guest_controller` module.
5 years ago
Prasad Katti 95bd92da04 Add integration tests for aws lightsail (#63770)
* Add integration tests for aws lightsail

* lightsail - use module_defaults instead of aws_connection_info

* lightsail tests - assert instance state on create

* Fix yaml syntax error

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* [lightsail] create keypair as part of the testsuite

* Fix lightsail actions in compute-policy

* Add ability to delete keypair in lightsail_keypair
5 years ago
Michael Mayer d52af75c68 Add aws elb multiple host header support (#65021)
* Add support for aws elbv2 multiple host header actions

* Add example of multiple host header

* Add test for multiple host headers

* Add missing quote

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Remove debug statements
5 years ago
Mark Chappell f1311d3e98 Rewrite iam_policy using boto3 (#63924)
* reworked iam_policy

* Deprecate policy_document option

* deprecate defaulting skip_duplicates to true

* No longer explicitly catch ParamValidationError.

ParamValidationErrror is already caught by ClientError

* Work with complex policy objects rather than json documents

comparisons can better cope with the special cases (eg True vs "True" )

* Enable check_mode tests and fix related 'changed' bug

* changelog

* doc cleanup based on review
5 years ago
Felix Fontein b36f572256 openssh_keypair: fix idempotence issue (#65017)
* Fix idempotence issue.

* Add changelog.
5 years ago
Andrey Klychkov 509b989a9a postgresql_lang: use query parameters with cursor.execute() (#65093)
* postgresql_lang: use query parameters with cursor.execute()

* add changelog fragment
5 years ago
Xu Yuandong cc5132a8ba add a new module to configure isis on isis-view. (#63720)
* add a new module.

* update docs.

* update docs.

* update again.

* add __future__

* update docs, some args type

* update docs, some args type

* add integration test.

* add unittest.

* update for shippabel.

* update for syntax error.

* Update setup.yaml

* Update setup.yaml

* Update cleanup.yaml

* update for review.

* add notes.
5 years ago
Kevin Breit 2cf079bc8f Meraki - Remove integration tests which work with HTTP respons… (#64975)
- These are modular level and I'm not catching these anyways
- More appropriate for unit tests, at least for HTTPS
5 years ago
Abhijeet Kasurde 35cc26f8c0
VMware: Find unique tag using category id (#61082)
If two tags with same name and different category exists, vmware_tag_manager
used to take first found tag.

This commit use combination of tag and category to identify the category.

Fixes: #59379

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean f5133bec22
Fix up broken Windows test when run with coverage (#65085) 5 years ago
Chris Van Heuveln 3252665a94 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace
5 years ago
Mark Chappell 7d4800deb1 Feature: iam_role tags (#63944)
* iam_role tags support

* Make sure we don't Camel -> Snake tags in our return values

* Minor documentation tweaks

* Add tagging tests

* Make sure we return the state of tags once we updated them

* Update lib/ansible/modules/cloud/amazon/iam_role.py

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

* Move boto3/botocore before we start making changes
5 years ago
Sam Doran 6b2b876d43
Make Docker and Podman play nice (#65009)
podman 1.4 now installs docker man pages. Add handler to remove docker packages to avoid test failure due to this conflict.

Adjust inventory_docker_swarm integration test
Add conditional to cleanup handlers to allow use of the setup_docker role without removing packages at the end of the play. The inventory_docker_swarm integration tests does its own cleanup.
5 years ago
Sam Doran 163904fe37
Fix timezone integration test for Fedora 31 (#65013) 5 years ago
Sam Doran fcd29406a2
Fix postgresql_lang integration test for CentOS 8 (#64872)
* Only search inside the role for files to include
When a role is called as a dependency, both roles are searched. This can cause the incorrect file to be included if it is picked up from the parent role.
5 years ago
Mark Chappell a815fdf8bb Update Route53 IAM policy so the Route53 tests run (#64886) 5 years ago
Jordan Borean 096c3ffa80
Correct win_dns_client test option name (#64967) 5 years ago
Klaus Frank 0efe5a666d Add full IPv6 support to win_dns_client - Fixes #55962 (#57577)
* Add full IPv6 support to win_dns_client - Fixes #55962

* Fix missing cast

* Add type to win_dns_client.py

* Remove version_added again, to hopefully make ansibot happy. Even though it was added as a response to the bot...

* Fix $params undefined error, that was introduced by fixing the "global variable" linting issue

* Fix casting error

* Fix inverted logic

* Fix rebase error

* Fix assignment to readonly variable

* Fix "reset IPv4 DNS back to DHCP adapter_name"

* Fix legacy windows server support (2008/2008R2)

* Fix 2k8

* Remove unecessary pslint ignore

* Added IPv6 tests, changelog fragment and further docs
5 years ago
Jordan Borean 480b106d65
become - stop using play context in more places (#62373)
* become - stop using play context in more places - ci_complete

* Fix up review points
5 years ago
Sam Doran a385ad321b
Use newer version of podman on RHEL (#64934)
- Use same podman version for RHEL 7 and 8
- Pin to version 1.4
5 years ago
Mario Lenz 034df49c56 VMware: New module vmware_host_dns (#64458)
* Restore module vmware_dns_config
* Remove domainname and change_hostname_to
* Changed version_added from 2.10 to '2.10'
* Add setup_attach_host: true to test case
* Add 'vcsim is not defined' block to integration tests
* Change 'result' to 'dns_config_result'
* Bugfix: Changing some static configurations while keeping others can crash the module
* Implement changing DNS config from DHCP to static on a cluster
* Update documentation for vmware_host_dns
* vmware_host_dns integration tests: Always revert to original DNS configuration, even if a test fails
* Deprecate vmware_dns_config
5 years ago
sky-joker 8301ad47c3 VMware: new module vmware_host_auto_start (#64605)
Fixes: #63905

* Add return parameters to return after module execution https://github.com/ansible/ansible/pull/64605#discussion_r344430717
* Add moid and use_instance_uuid parameters https://github.com/ansible/ansible/pull/64605#discussion_r344431003
* Add reset playbook for test case
* Delete HAS_PYVMOMI variable https://github.com/ansible/ansible/pull/64605#discussion_r344430877
* Fix because the default value of stop_action was wrong
* Fix multiple sanity test error for document related
* Fix remove unnecessary line break
5 years ago
Sam Doran 4291f09a68
Fix lookup_passwordstore integration test for CentOS 8 (#64869)
pass is no longer packaged in EPEL
https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
5 years ago
Sam Doran f2e605c856
Fix iso_extract tests for CentOS 8 (#64861)
- use setup_epel role rather than task which contains correct URL now since it has changed for EL8
- add conditional to setup_epel to prevent attempted installation on non-RHEL distros
5 years ago
Sam Doran dd8a3ebb72
Fix paramiko_ssh test (#64857) 5 years ago
Sam Doran 5d2a3ecbc4
Fix setup_rpm integration tests for CentOS 8 (#64862) 5 years ago
Sam Doran 5e3b6c84c7
Fix group integration test for CentOS 8 (#64858) 5 years ago
Sam Doran 3902c6dd9d
Fix MariaDB integration tests for CentOS 8 (#64859)
* Fix setup_mariadb for CentOS 8
Switch to using systemd for multiple instances on CentOS 7 and 8
5 years ago
Sam Doran 05a7ce798d
Fix yum_repository tests for CentOS 8 (#64863)
Refactor tests to run the same tasks with CentOS and Fedora using different variables.
5 years ago
Sam Doran 477fa63f68
Fix setup_mysql_db for CentOS 8 (#64864) 5 years ago
Sam Doran 16f070f318
Fix mariadb_replication tests for CentOS 8 (#64865) 5 years ago
Sam Doran 082b1b6cca
Fix filesystem integration test for CentOS 8 (#64866) 5 years ago
Sam Doran 41f301fe1b
Fix setup_mysql8 tests for CentOS 8 (#64868)
# Conflicts:
#	test/integration/targets/firewalld/tasks/main.yml
5 years ago
Sam Doran 73a2ee7318
Fix mysql_replication integration test for CentOS 8 (#64870) 5 years ago
Sam Doran f8c741894a
Fix setup_postgresql integration test for CestOS 8 (#64871) 5 years ago
Sam Doran 79a38c8a3a
Fix firewalld integration tests for CentOS 8 (#64873) 5 years ago
Micah Hunsberger 8ff6e4c68e win_iis_webapplication: add authentication parameters (#56033)
* add connect_as, username, password parameters
add tests

* fixed reference to undefined variable.
added version added to new options.

* add changelog fragment

* fix line endings

* use ansible facts to determine os version
remove unused iis version check
test checksum of iis configuration after backup

* correct assertion

* added more cleanup tasks.

* version added is now 2.10

* skip server 2008 r2 for now

* run tests on server 2012 and higher
5 years ago
Wilmar den Ouden 40071e5db3 win_disk_facts: Adds Win32_DiskDrive object to facts (#51595)
* Adds win32_disk_drive object to win_disk_facts

* Names class parameter for Get-CimInstance as requested in the devdocs

* Maps whole class and adds docs

* Improve matching of disks when UniqueID is different format

* Improve logic for PNPDeviceID mapping

* Adds test for win32_disk_drive
5 years ago
Jordan Borean 762fcf78b9
win_pester - Align dir scanning with Pester's defaults (#64880)
* win_pester - Align dir scanning with Pester's defaults

Co-authored-by: Coby Caldwell <cobycaldwell@gmail.com>

* Fix sanity issues
5 years ago
Gonéri Le Bouder 0aa59ce9ab vmware/test: use better name for datastores
In the VMware tests, we call the datastores `ds1` and `ds2`. The first
one is read-only, the second is read-write and can be used to deploy
VMs. The naming convention was not clear enough and source of a lot
confusion and mistake.

We now have two better names:

- ro_datastore, which is ... read-only
- rw_datastore, the one that we can use to deploy new VM.
5 years ago
Mark Chappell 551b17b8a2 ec2_vpc_net_info: integration tests (#62649)
* ec2_vpc_net: (integration tests) migrate to using module_defaults

* ec2_vpc_net: (integration tests) use a private subnet for the tests

* ec2_vpc_net_info: Add integration tests

* ec2_vpc_net_info: add cidr_block_association_set to documentation

* Update AWS hacking test policy to allow VPC CIDR disassociation

* Update test/integration/targets/ec2_vpc_net/tasks/main.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Store vpc2 ID to make it clearer which VPC we're changing

* Be more consistent with our quoting

* Explicitly test that the VPC IDs haven't changed
5 years ago
johnbui423 db3994cb03 Default to python3 on Debian 10 (#63097) 5 years ago
Anusha Hegde e9feea2270 VMware: new module vmware_guest_serial_port (#63126)
The ask was to add an option in the vmware_guest itself. Upon inspection, a serial port can
be created in multiple ways and so can be a module in itself. Therefore, created a new module
called vmware_serial_port.

Fixes: #54956
5 years ago
Prasad Katti 9b0cdad4d4 Add a random component to state machine name in aws_step_functions_st… (#64476)
* Add a random component to state machine name in aws_step_functions_state_machine testsuite

* Pick a random number from a bigger set to avoid conflicts between parallel runs

Co-Authored-By: Matt Clay <matt@mystile.com>
5 years ago
Martin Krizek 5c0b2c151c
Fix ansible_failed_{task,result} undefined in rescue (#64831)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789
5 years ago
Daniel-Sanchez-Fabregas 04b8f75ffa win_domain_computer module: Fix idempotence when name != sam_account_name (#56967)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check
5 years ago
Shachaf92 f6ac4361e7 win_firewall_rule - support ICMP types and codes (#60361)
* win_firewall_rule - support ICMP types and codes

* Update main.yml

* Add more examples and change type to list
5 years ago
Anusha Hegde 3a9650df98 Merging conflicts and updating PR
Signed-off-by: Anusha Hegde
5 years ago
Anusha Hegde 4e7c0b3e21 Fixed review comments
Signed-off-by: Anusha Hegde
5 years ago
Anusha Hegde 907c66c082 Resolved merge conflicts 5 years ago
Gonéri Le Bouder 80bf24b17c vmware_guest_disk/test: use less disk space
Reduce the amount of space that is used on the datastore during the
test. This allow use to use lighter storage environment during the test.
5 years ago
Mark Chappell b5f484dcc3 ec2_eip Don't throw an exception when re-releasing an EIP (idempotency) (#62332)
* ec2_eip: (integration tests) move to using module_defaults

* ec2_eip: (integration tests) expand integration tests

Also clean up a little
- Delete EIPs when we finish testing them (reduce the chance of hitting limits)
- Rejig deletion so that it works when runs fail
- Add tests for ec2_eip_info

* ec2_eip: Minor doc tweaks

* ec2_eip: Don't throw an exception when we try to disassociate an already disassociated EIP

* ec2_eip: Add missing IAM policy (manage IGWs)

* ec2_eip: (integration tests) Use the VPC as a crude lock to avoid running parallel tests

We test that untagged EIPs come and go as we expect, if multiple tests are
running in parallel this confuses things

* Fix ec2_eip association
5 years ago
Gonéri Le Bouder 93d1a57d9a vmware_guest: fix the name of the test VMs
The test VM names must be deterministic, this way, the teardown playbook
can clean up the resources after the test execution.

See: https://docs.ansible.com/ansible/latest/dev_guide/platforms/vmware_guidelines.html#vm-names-should-be-predictable
5 years ago
GomathiselviS 143bafec9a eos_lacp_interfaces : Fix to - lacp port-priority not set when… (#64530)
* Fix bug 64453
5 years ago
Dusan Matejka fadf7a426f re-enable zabbix_host integration tests and add cleanup handlers 5 years ago
Nathaniel Case fed0496005
Fix eos_facts over local eapi (#64570)
* Fix eos_facts over local eapi

* Much better feedback when querying resources over local

* No need for that anymore

* Update comment

* Mkae sure facts are tested on local

resource modules might break this otherwise

* This test was not checking anything

* Pass over nxos_facts as well
5 years ago
Abhijeet Kasurde 47f9873eab
VMware: Handle slash in network name in vmware_guest module (#64494)
Encode slash in network name to work with vSphere API.

Fixes: #64399

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
PRASOON KARUNAN V 4bf79de8a6 Add output options for win_pester (#63583)
* add output options for win_pester

* fix typo

* correct variable name
5 years ago
Hidetoshi Hirokawa c0331053db Add encoding and codepage params to win_command/win_shell (#54896) (#54966)
* Add output_encoding_override params to win_command/win_shell (#54896)

This enhancement enables Ansible to parse the output of
localized commands that ignore the prompt code page.

* Added changelog and minor nits
5 years ago
haiyuan_zhang c11d73575b Fixes azure_rm_snapshot (#64542) (#64547)
* feature enhancement: make a snapshot from an existing managed disk.

* remove default creation option in argu_spec of azure_rm_snapshot

* fix pep8 related issue

* fixing broken integration test
5 years ago
Matt Martz b93d92ef9a
Set alter_sys=True instead of False to address backwards incompat (#64670)
* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match
5 years ago
The Magician b1849d1a3e New Module: gcp_serviceusage_service (#64588) 5 years ago
Diane Wang 0d851dda59 VMware: add new module vmware_guest_tools_info (#62860) 5 years ago
nkshrishail 00193f27eb nxos_lacp: updated tests to handle platforms not supporting lacp system mac command (#64074)
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command

* nxos_lacp: addressing comments

* nxos_lacp: Updating image tag search to include more tags
5 years ago
nkshrishail 964da2f442 nxos_lacp_interfaces: Updating the tests to handle platforms that don't support - lacp mode delay (#64123)
* nxos_lacp_interfaces: Updating the tests to handle platforms that dont support - lacp mode delay

* nxos_lacp_interfaces: Updating search string to include all 9500 series switches

* nxos_lacp_interfaces: Adding a comment about chassis_type
5 years ago
Chris Van Heuveln d5e30be686 nxos_igmp_interface: fix regression test failure (#64286) 5 years ago
nkshrishail 2be04e2bd6 nxos_overlay_global: Removing provider and correcting relative references (#64454) 5 years ago
Felix Fontein 574bd32db2
docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.
5 years ago
Felix Fontein dd5415017e
docker_login: allow to function with credential helpers (#63158)
* Allow docker_login to function with credential helpers.

* Improve various details and update docs.
5 years ago
Mario Lenz 5d30180f6b VMware: Implement updates for dvPG in vmware_dvs_portgroup (#62537)
* VMware: Implement updates / changes for dvPG in vmware_dvs_portgroup
* Remove unnecessary else
* Add more integration tests
* Improve create_vlan_list() helper function
5 years ago
Jill R 4e7779030d
route53_info max_items and next_marker should be a str (#64617)
* route53_info  max_items and next_marker should be a str

Type was changed in #64358, however boto3 takes a str for this option
Add some basic tests for route53_info.
Fixes: #64534
5 years ago
Matt Clay bbf376682f Disable failing aws_acm integration test. 5 years ago
Diane Wang 023a9b3166 VMware: vmware_export_ovf module fix Python3 compatibility issue (#60265) 5 years ago
Pavan Bidkar 9a54070fa2 VMware: Added check for temp_version type in vmware_guest(#64376)
Fixes: #64374

* Adding tests for create VM with interger version and latest version
5 years ago
Gonéri Le Bouder 35a8922988 prepare_vmware_tests: datastore host is datastore.test
Use an alias to access the datastore host. This way, it's easier
to use an existing NFS server.
We can also disable the `write` access on the iso datastore.
5 years ago
Jill R 1f5d2f9159 Enable aws_acm tests, AWS reports our account quota should be fixed (#64470) 5 years ago
Matt Martz 254788bc22
unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Martin Krizek cd8ce16d48
template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940
5 years ago
Andrey Klychkov 22fe622589 postgresql_subscription: new module (#63661)
* postgresql_subscription: setup master-standby cluster into one container

* postgresql_subscription: setup master-standby cluster into one container, fix

* postgresql_subscription: setup master-standby cluster into one container, set up publication

* postgresql_subscription: setup master-standby cluster into one container, add module template

* postgresql_subscription: setup master-standby cluster into one container, fix tests

* postgresql_subscription: setup master-standby cluster into one container, create subscr via shell

* postgresql_subscription: setup replication, state stat

* postgresql_subscription: add basic present mode

* postgresql_subscription: add assertions

* postgresql_subscription: add samples

* postgresql_subscription: state absent, cascade

* postgresql_subscription: add owner param

* postgresql_subscription: update

* postgresql_subscription: refresh

* postgresql_subscription: doc, warns

* postgresql_subscription: relinfo

* postgresql_subscription: fixes

* postgresql_subscription: fix CI tests
5 years ago
Chris Van Heuveln 008a95073d nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:

- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
  - fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces

- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
  - fixed by removing `port-channel` interfaces with the same ID; e.g.

```
  interface port-channel98
    switchport
    switchport mode trunk

  nx-1(config-if)# interface Ethernet1/19
  nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```

Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
5 years ago
Chris Van Heuveln 2f34318ceb Remove `timeout` parameter from `prepare_nxos_tests` (#63963)
The error below occurs when attempting to run `ansible-playbook` with nxos regression tests.

```
fatal: [dt-n9k5-1.cisco.com]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "commands": [
                "show interface brief | json"
            ],
            "timeout": 60
        }
    },
    "msg": "Unsupported parameters for (nxos_command) module: timeout Supported parameters include: commands, interval, match, provider, retries, wait_for"
}
```

This error appears to be a result of https://github.com/ansible/ansible/pull/62625, but that has not been verified.
5 years ago
Chris Van Heuveln 3b6681f889 nxos_lldp_global: fix regression tests (#64161) 5 years ago
Chris Van Heuveln 351f60b0e1 nxos_hsrp_interfaces: new module (#61498)
* nxos_hsrp_interfaces: new module

* lint 1

* lint 2

* add normalize_interfaces

* change version /2.9/2.10/

* /2.10/"2.10"/
5 years ago
Andrey Klychkov 9a8d73456c mariadb_replication: fix CI tests (#64481) 5 years ago
Matthew Davis 4ee9f40e62 Add aws_acm module (#60552)
* convert aws_acm_facts to AnsibleAWSModule

* factor aws_acm_facts into module_utils

* add more filtering options for aws_acm_info

* add aws_acm module and tests

* uncomment aws_acm test

* fix linting for aws_acm

* fix __future__ linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix aws_acm_info arg type

* remove test for old module name aws_acm_facts

* simplify AWS ACM client creation

* fix indent typo in aws_acm test

* catch BotoCoreError in aws_acm

* fix indent typo in aws_acm test

* tighten AWS ACM test policy resource

* move aws acm int test to venv

* remove errant file

* fix AWS ACM int test perms

* undo copyright addition to wrong file

* fix invalid log message in aws_acm

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rephrase aws_acm_info doc from facts to information

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rename aws_facts var to aws_info

* remove case insensitivity for aws_acm pem compare

* add no_log for aws_acm credential setting

* add per-test prefix to aws_acm test resource names

* make aws_acm use crypto module_util

* clarify copyright for aws_acm

* make aws_acm int test clearer

* add explicit crypto dependency to aws_acm

* change requests for aws_acm pr

* fix wrong copyright owner aws_acm test

* fix wrong copyright owner aws_acm test

* rewrite aws_acm cert chain compare with regex, no dependency

* fix linting for aws_acm unit test

* fix linting for aws_acm unit test

* fix linting and duplicate ignore

* fix failed cert chain split in aws_acm, add more tests

* remove errant file

* more linting fixes for aws_acm

* fix sanity ignore

* rewrite cert compare in aws_acm to use base64 decode

* improve regex for pem cert chain split in aws_acm

* undo changes to crypto module util for aws_acm

* increment ansible version for new aws_acm module

* convert aws_acm return(x) to return x

* increment version added for aws_acm_info new features

* fix linting

* fix bugs with AWS ACM

* fix bad rebase

* disable AWS ACM integration test, due to AWS account limit issue

* remove aws acm integration test from shippable group
5 years ago
Andrey Klychkov 04c999f0f8 postgresql_idx: add stat mode support (#64138)
* postgresql_idx: add stat mode support

* postgresql_idx: add stat mode support, add changelog

* postgresql_idx: add stat mode support, fix CI
5 years ago
The Magician 1a726d436e New Module: gcp_compute_target_instance (#64135) 5 years ago
The Magician 14cf1c1197 New Module: gcp_logging_metric (#64339) 5 years ago
Sloane Hertel c1f1b2029c
Support vars plugins in collections (#61078)
* Move var plugins handling to a separate file

* Allow var plugins to require whitelisting

* Add global configuration ('demand', 'start') for users to control when they execute

* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute

* Update ansible-inventory and InventoryManager to the global and stage configuration

* Update host_group_vars to use stage configuration and whitelisting

* Add documentation for using new options and to the developer's guide

* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility

* Changelog

Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Andrey Klychkov 73526b9d65 mysql_variables: add mode parameter (#63547)
* mysql_variables: add mode parameter

* mysql_variables: add mode parameter, add changelog fragment

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix sanity

* mysql_variables: add mode parameter, remove warns

* mysql_variables: add mode parameter, refactoring

* mysql_variables: add mode parameter, fix logic
5 years ago
Sloane Hertel 371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
5 years ago
The Magician 5dff5603af New Module: gcp_compute_reservation (#64133) 5 years ago
The Magician d865b7da71 Bug fixes for GCP modules (#64193) 5 years ago
Sergey 1ad3879430 Add podman_volume_info module (#63380)
Add module podman_volume_info that collects data about podman
volumes on the host. Acts as docker_volume_info module.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
5 years ago
Danilo Bargen 35c415de98 get_url integration test: Fix missing conditional (#64100) 5 years ago
Chris Van Heuveln ec1c5585af nxos_vrf: N6K regression test failures (#63277)
* nxos_vrf: N6K regression test needs 'nv overlay evpn'

* Add delay for vrf creation

* Revert "Add delay for vrf creation"

This reverts commit 8afa5281ff4b3c5a1775fbd40c5acb7ab5ecdf68.

* Add vrf_error_check w/delay to module

* whitespace

* httpapi fixes

* /input/input_data/ - 'input' is a built-in

* shippable retry
5 years ago
Felix Fontein fed267df03
openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.
5 years ago
Dusan Matejka 1f2d78b356 unify mongodb installation for both xenial and bionic in integration tests 5 years ago
Mark Chappell e6607d611a Sanity test fixups - AWS related tests (#64093)
* AWS tests Sanity Test fixups (add boilerplate)

* Remove sanity ignore.txt entries
5 years ago
Alexander Korsunsky b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
5 years ago
Mike Wiebe e82d407fa8 Add filter option to netconf_config module (#63593)
* Add filter option for netconf_config module

* Address review comments and add tests

* Refactor integration tests

* Address review comments

* Review comments

* Fix nxos_netconf include check
5 years ago
Jill R 003c26de04 iam_user Additional integration tests (#63768)
* Add tests that were originally part of pr59079 before being lost in a rebase

* missed a needed check_mode: yes and a test with a wrong group

* Clarify test name, fix resource, add user delete test

* Use AWSDenyAll for benign policy, chech policy with non-full ARN path works, fix wrong module copy-pasta
5 years ago
Rémi REY 9c17c7ad19 Add integration tests for grafana_datasource module (#63986)
* Add setup_grafana role for integration tests

* grafana_datasource: add integration tests for elastic datasource

* grafana_datasource: add integration tests for influxdb datasource

* grafana_datasource: add integration tests for postgres datasource

* grafana_datasource: add integration tests for cloudwatch datasource
5 years ago