Commit Graph

8546 Commits (aa717661afa62948c775f0c099eebcc901f64fe6)

Author SHA1 Message Date
Sam Doran 5ccd674dba
Update default test container to use Python 3.8.0b2 (#58877) 5 years ago
Jordan Borean b6791e6ae3
ansible-galaxy: add collection sub command (#57106)
* ansible-galaxy: add collection init sub command

* Fix changelog and other sanity issues

* Slim down skeleton structure, fix encoding issue on template

* Fix doc generation code to include sub commands

* Added build step

* Tidy up the build action

* Fixed up doc changes and slight testing tweaks

* Re-organise tests to use pytest

* Added publish step and fixed up issues after working with Galaxy

* Unit test improvments

* Fix unit test on 3.5

* Add remaining build tests

* Test fixes, make the integration tests clearer to debug on failures

* Removed unicode name tests until I've got further clarification

* Added publish unit tests

* Change expected length value

* Added collection install steps, tests forthcoming

* Added unit tests for collection install entrypoint

* Added some more tests for collection install

* follow proper encoding rules and added more tests

* Add remaining tests

* tidied up tests and code based on review

* exclude pre-release versions from galaxy API
5 years ago
The Magician d336a989e4 Bug fixes for GCP modules (#58848) 5 years ago
The Magician 9721c4045b Bug fixes for GCP modules (#58849) 5 years ago
The Magician eb839c94ea Bug fixes for GCP modules (#58850) 5 years ago
The Magician d88f686976 Bug fixes for GCP modules (#58851) 5 years ago
Miguel Angel Muñoz González d50531c6bd New Fortinet's module for fortios_user_device (using new httpapi plugin) (#58291)
* New Fortinet's module for fortios_user_device (using new httpapi plugin

* Fix documentation errors

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

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

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

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

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

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

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

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

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

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

* Update lib/ansible/modules/network/fortios/fortios_user_device.py

Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Gonéri Le Bouder 140a8e53f3 vmware_guest: do not use infra.vm_list
Update the functional tests of `vmware_guest` to use the
`virtual_machines` data structure.
5 years ago
Andrey Klychkov 88ec5e14cb Add unit tests for lenient_lowercase function (#58586) 5 years ago
Will Thames 446919de6f Add apply to k8s module (#49053)
* Add apply to k8s module

Use apply method for updating k8s resources.

* Improve apply documentation

* k8s: Make apply and merge_type mutually exclusive
5 years ago
Shachaf92 7ddcaafee5 many pslint fixes (#55862)
* Handles:

PSAvoidTrailingWhitespace
PSAvoidGlobalVars
PSAvoidAssignmentToAutomaticVariable
PSAvoidUsingCmdletAliases
PSAvoidUsingWriteHost
PSUseDeclaredVarsMoreThanAssignments
PSUsePSCredentialType
PSAvoidUsingPositionalParameters
PSAvoidUsingEmptyCatchBlock
PSAvoidUsingWMICmdlet

Replaced Write-Host with Write-Output
Added smart reboot check for win_domain feature installation
Modify the Creation of the pagefileto fit to CIM
Changelog fragment addition
Ignore.txt without fixes

* Changes after community reviews

* Change Out-Null to '> $null'

* Fixes after jborean93 comments

* Test

* Revert "Test"

This reverts commit 35c5c0648fa9d2868a18094d84954e53ffa28880.

* Removed all  > $null since they broke the module since the output got dumped

* run test again

* Revert "run test again"

This reverts commit 80eaf07143f9d8cb0116cbbc68a6a69c0ace840c.

* Changes after community review

* ignore PSUseDeclaredVarsMoreThanAssignments that are on a diffrent PR

* CI failed on extra line in ignore.txt

* Review changes

* PSlint errors

* Trail space

* send to null breaks the tests for  Set-Workgroup

* Lint stuff

* win_domain_user issue of indent.

* Update win_domain_user.ps1

* Update win_domain_membership.ps1

* Fix redirect to null

* lint space issue

* removed return from set-workgroup

* removed send to null
5 years ago
Will Thames 88364d4cfd Add purge_tags to s3_bucket to allow preservation of existing tags (#58754)
* Add purge_tags to s3_bucket to allow preservation of existing tags

Adding `purge_tags` with default `True` to maintain existing behaviour
allows users to set it to `False` to preserve existing tags

Fixes #29366

* s3_bucket: Add further tests and improve tag handling further

Additional tests for purge_tags: False suggested some incorrect
logic and thus further improvements

Increase wait timeout on bucket deletion as it wasn't always completing
in the default 100 seconds
5 years ago
Abhijeet Kasurde 79fdc2190a role: Fix role's hash_params (#55263)
* role: Fix role's hash_params

Fix based upon work done by alikins.

Fixes: #20596

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Diane Wang 9c140d26d5 VMware: add new module vmware_guest_network (#52075) 5 years ago
smile37773 8ff97edd1a Add the singlePlacementGroup in the virtual machine scale set module (#58320) 5 years ago
Toshio Kuratomi 0c992d5ae4 Fix for skipping of gitlab_runner test.
Correct variable name for skipping of the gitlab test when gitlab python
client is not installed.
5 years ago
Sunil Raj 641f7c4ae3 VMware: Updates the DRS rule without deletion (#57119)
* The DRS rule will be updated if any changes in the configuration without deleting the existing rule.
The rule itself is updated by the given configuration.
* Lint errors fixed
* VMware: update vmware_vm_vm_drs_rule testcases
5 years ago
Mariusz Mazur 2fb06650a7 kubevirt: even more unit tests (#58593) 5 years ago
Shachaf92 a6b7d0d00b win_domain_user and win_domain_group: add created result boolean (#57901)
* win_domain_user and win_domain_group: add created result boolean

* Fix YML

* add docs

* brackets

* Update win_domain_group.py

* Update win_domain_user.py

* Update win_domain_user.ps1

* fix indent
5 years ago
Shachaf92 e0b8bc1ef9 win_firewall_rule: Only report changed when change is made (#57267)
* Fix bug https://github.com/ansible/ansible/issues/44450

* Added tests

* I will make this CI work

* Update win_firewall_rule.ps1
5 years ago
PRASOON KARUNAN V db5656cf6e Add support for pester tags (#57918)
* correct argument name

* added documentation

* adding missing version_added to doc

* correcting description in docs

* change type to list

* add tests

* correct test file
5 years ago
Will Thames 60fb9fc208 Fix EC2 test suite to work with testing policies (#44387)
* Update testing policies to ensure all required permissions are present
* Tidy up security policies to reduce duplicate permissions
* Make roles static so that they can be present before CI is run,
  meaning that role creation permission is not required by the CI
  itself, only by someone setting up the roles prior to testing
* Move contents to cloudfront policy to network policy to ensure policy
  count (maximum of 10) stays low
* Maintain compute policy below 6144 bytes
5 years ago
Andrey Klychkov 6cf722fed6 postgresql_query module: add autocommit parameter (#58704)
* postgresql_query: add autocommit parameter

* postgresql_query: add autocommit parameter, add CI tests

* postgresql_query: add autocommit parameter, add a changelog fragment

* postgresql_query: add autocommit parameter, fix sanity

* postgresql_query: add autocommit parameter, cosmetic fix
5 years ago
Sam Doran d50c8c2b83
Improve setup_docker tests to work with RHEL 8 GA (#58649)
- use include_vars to set appropriate packages and pip packages per distribution and version
- install an older version of Docker CE on RHEL 8 since a dependency is unavailable
- disable warnings on tasks that are ok
- skip tests for CentOS/RHEL 6
5 years ago
Matt Martz 737dbefd78
Get copy tests passing with split controller/target (#58516)
* Get copy tests passing with split controller/target

* Remove sudoers file

* add missed set_fact
5 years ago
Sam Doran 16d6fcf514
Improve dnf test formatting and fix RHEL 8 module name (#58648)
- use single include_vars task rather than multiple set_fact tasks
- use multi-line YAML to break up long conditionals
- use version() test rather than direct comparisions
- use different appstream package on RHEL since '@swig:3.0/default' is not working in the GA
5 years ago
Andrey Klychkov 2e9db87a1b azure_rm_gallery: add disabled to aliases (#58672) 5 years ago
Abhijeet Kasurde 96eccda23b
VMware: Add module vmware_vm_storage_policy_info (#56263)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
smile37773 8f0bf3e453 Add the azure_rm_..._info modules (#58576) 5 years ago
Ganesh Nalawade 1e3034b96d
junos_facts refactor to work with resources modules (#58566)
* junos_facts refactor to work with resources modules

*  Refactor junos_facts module to work with
   network resource module.

* Fix unit test failures

* Fix review comments
5 years ago
Brian Coca ee4cba1b85 ensure bytes in run_command (#58411)
* ensure we pass bytes to run_command

* changed tests for new behaviour

* dont b the pytest

* fixes by sivel
5 years ago
s-hertel 7ec31194a5 Ensure only running instance facts are retrieved to match the following assertion
Otherwise lingering terminated instances may be in the result
Use the instance profile arn or the role name, but not the role arn
Mark tests as unstable
5 years ago
Will Thames a6d757e074 Ensure block device instance creation outputs instances
Not waiting outputs results in a format that will never
be matched by the tests

Ensure instances get tidied up

Allow ec2:ReportInstanceStatus

ec2_instance: Improve test cleanup on failing tests

Improve describe/modify attribute error handling

Address feedback on PR
5 years ago
Andrea Tartaglia da1a621bd9 Removed nested role for ec2_instance tests
Also moved environment setup and environment cleanup to separate task
files

Added CI group

Updated c4.large instances to t3.nano, use ENA enabled AMI

Updated AMIs with Amazon Linux AMI

Updated us-east-1 AMI id

Specify EBS size

typo, volume_size

Removed 'state: running', updated AMI with amz ami

Also added several wait: false to speed things up

Check for instance state, correctly

Accept pending as valid state

tags_and_vpc_settings do not wait for instance to complete

wait for termination protected instance

Updated IAM role name to match with policy

Skip env cleanup when in CI

Do not wait instance in external_resource_attach

ENI remove is done in env_cleanup/CI

wait some time for instance_profile instnace to be up

Updated ebs_optimized_images

Corrected task name

Added aws_cleanup var in cloud-config-aws

typo in runme

default aws_cleanup to true
5 years ago
lijok 63bdd0d6cd VMware: looking up maxMksConnections in incorrect location (#58061)
maxMksConnections is contained in vim.vm.ConfigInfo not vim.vm.VirtualHardware

Fixes: #58060

Signed-off-by: lijok <28689084+lijok@users.noreply.github.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Martz 0e9cfd3ee8
Fix sanity tests that are failing with LC_ALL set (#58604) 5 years ago
Pluggi 7f15331510 Add build.target option to docker_image module (#58487)
Signed-off-by: Antoine Bardoux <pluggi512@gmail.com>
5 years ago
Andrey Klychkov 4da6d8cbf9 postgresql_ext: add version parameter (#58381)
* postgresql_ext: add version new option

* postgresql_ext: add version new option, fix ssl tests

* postgresql_ext: add version new option, fix tests

* postgresql_ext: add version new option, fix examples

* postgresql_ext: add version new option, fix the doc

* postgresql_ext: add version new option, fix examples

* postgresql_ext: add version new option, fix typo in tests
5 years ago
Jordan Borean c3978fed4b
Load Ansible module_utils for ps_argspec validator (#58571)
* Load Ansible module_utils for ps_argspec validator

* fix validation for modules without Requires statement

* Moved future comment to proper location
5 years ago
Jordan Borean c260721ce5
win_domain_user: do not hide error on failures (#58357)
* win_domain_user: do not hide error on failures

* Was a bit too overzealous in the removal

* Remove uneeded sanity ignore rule
5 years ago
Felix Fontein 5d5a7d6ebe
openssl_privatekey: forgot to add secp256r1 (#58605)
* Forgot to add secp256r1. This one is the interoperable one.

* Add changelog.
5 years ago
Andrey Klychkov 10af2636d1 Add unit tests for human_to_bytes (#58584) 5 years ago
Sam Doran c1a23cd763 Add two new Azure groups to prevent timeouts
ci_complete
5 years ago
Pilou 5f8080aaa0 consul_session: improve documentation and add integration tests (#56392)
* consul_session: Python 2.6 is always required on managed node
* consul_session: document all types
* consul_session: add doc for 'id' parameter
* consul_session: improve parameter descriptions
    - use formatting functions in descriptions
    - 'name' parameter is required when state=node
* consul_session: use required_if
* consul_session: add integration tests
* consul_session: use 'retry' with network dependent tasks
* Use ansible-ci-files bucket for consul binaries

Co-Authored-By: Matt Clay <matt@mystile.com>
5 years ago
Tim Rupp 580b013837 rpm_key - add fingerprint parameter (#58373)
This parameter can be used to verify keys before they are imported by providing the long form fingerprint of the key.
5 years ago
Aaron Longchamps 045caaa400 VMware: Adding IP-Specific properties to ESXi host firewall config (#56733)
* Adds IP-Specific properties to firewall config

Fixes: #51240
5 years ago
Diane Wang 39fbdc22ff VMware: Add new module vmware_guest_screenshot (#57449)
Signed-off-by: Tomorrow9 <tommorrow7@gmail.com>
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Sumit Jaiswal 539f37ede3
PR to implement ansible_net_model for iosxr facts module (#58488)
* resolves 57767

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

* added test

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Felix Fontein f0801879c7 Rename xenserver_guest_facts -> xenserver_guest_info (#57032)
* Rename xenserver_guest_facts -> xenserver_guest_info.

* Add changelog.

* Forgot one test.
5 years ago
Gonéri Le Bouder 2401154fc4 VMware: rename VMWare to VMware (#58535)
Follow the nomenclature convention decided in https://github.com/ansible/ansible/pull/56814
5 years ago
Sam Doran 8cfd0ba039 Allow for test groups with double digits (#58532) 5 years ago
Sam Doran ab6a9ef130
Get minor version number for CentOS and Debian (#57814)
* Get the most detailed version number from distro.version() for CentOS and Debian
* Update tests and fixtures
* Update fixture generation script to gather distro info and work with Python 3
* Update LinuxMint fixtures
* Cleanup fixture formatting
* Improvements based on feedback from abadger:
    - use unicode since that is what distro returns
    - use frozenset with a tuple
    - include link Debian to bug
5 years ago
Sam Doran 6cf6f5a34b
Use atexit to cleanup tmp dirs (#56532)
* Wrap everything in try/except to avoid leaving files behind
* Add unit tests, integration tests, and changelog
* Do text the correct way
5 years ago
Toshio Kuratomi 8acf71f78f
Skip tests with unsatisfied deps (#55853)
* Skip gitlab tests if dependencies aren't met

* Skip certain unittests if passlib is not installed

* Fix tests with deps on paramiko to skip if paramiko is not installed

* Use pytest to skip for cloudstack

If either on Python-2.6 or the cs library is not installed we cannot run
this test so skip it
5 years ago
Sloane Hertel 826f224f02
Handle vaulted non-ascii characters for Python2 (#58503)
* Handle vaulted non-ascii characters for Python2

* Add a test to ensure str() no longer raises UnicodeEncodeError
5 years ago
Gonéri Le Bouder e28bc46353 vcenter provider: set default values
Set default value for the following optional parameters:

- vcenter_port
- vmware_proxy_host
- vmware_proxy_port

This way we won't get an error if they are not define in the
configuration file.
5 years ago
Sloane Hertel 23f0ca0acd fix unarchive integration tests when LC_ALL is not set to en_US.UTF-8 (#58431) 5 years ago
Olivier Scherler 7ed7d374e4 Fix onepassword lookup plugin and onepassword_facts module when a field has no name. (#58308)
* Fix onepassword lookup plugin crashing on fields with no 'name' or 't' property.

* Fix onepassword_facts module crashing on fields with no 'name' or 't' property.

* Add unit test for onepassword lookup plugin failing on entries without a name.

* Add changelog fragment for onepassword lookup plugin and onepassword_facts module fixes on fields without a name.
5 years ago
Joseph Andreatta 0a27ad6ea0 VMware: Add new module vmware_dvswitch_nioc (#44147)
Signed-off-by: Joseph Andreatta <joseph@vmware.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Chris Van Heuveln 0868fec8bd nxos_vpc: pkl_vrf fixes for #57069 (#57370)
* nxos_vpc: pkl_vrf fixes for #57069

Fixes #57069

- Symptom: When playbooks specify `pkl_vrf: default`, the result is that the cli does not set the `vrf` state.

- Analysis:
 - First issue: 'default' is a reserved word when used with the `peer-keepalive` `vrf` keyword. It refers to the default rib.
   - This is confusing in several ways because `peer-keepalive`'s *default* vrf is the `management` vrf.

 - Second issue: When changing only one optional value (`pkl_vrf`) while other optional values are idempotent (`pkl_src`), the result is that the idempotent values are ignored; unfortunately the device cli *replaces* the entire command, in which case the idempotent values are removed.
   - e.g. playbook specifies this:
     ```
     { pkl_dest: 10.1.1.1, pkl_src: 10.2.2.2, pkl_vrf: my_vrf }
     ```

     ```
     peer-keepalive dest 10.1.1.1 src 10.2.2.2             # original

     peer-keepalive dest 10.1.1.1 src 10.2.2.2 vrf my_vrf  # intended result

     peer-keepalive dest 10.1.1.1 vrf my_vrf               # actual result
     ```

 - Third issue: the `pkl` getter was relying on positional data. This broke when the `udp` keyword nvgen'd where `vrf` used to appear (shifting all keywords to the right).

- Tested on regression platforms: `N3K,N6k,N7K,N9K,N3K-F,N9K-F`

* PEP fixes

* PEP fix 2

* pkl should merge by default, not override

* rmv debugs

* add mike's tests

* fix comments
5 years ago
Abhijeet Kasurde 760dc19284
VMware: Set vapp settings while creating VM (#58156)
vApp Settings can be set while creating VM.

Fixes: #50617

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay 4403f866e3 Simplify Git class in ansible-test. 5 years ago
Sloane Hertel ec1287ca7e
Fix notifying handlers by using an exact match (#55624)
* Fix notifying handlers by using an exact match rather than a string subset if listen is text rather than a list

* Enforce better type checking for listeners

* Share code for validating handler listeners

* Add test for handlers without names

* Add test for templating in handlers

* Add test for include_role

* Add a couple notes about 'listen' for handlers

* changelog

* Add a test for handlers without names

* Test templating in handlers

* changelog

* Add some tests for include_role

* Add a couple notes about 'listen' for handlers

* make more sense

* move local function into a class method
5 years ago
Hannes Ljungberg 1b90e10cf0 docker_swarm_service: Make secret_id and config_id optional (#58299)
* Lookup secret id by name if not set

* Lookup config id by name if not set

* Add changelog fragment

* Remove usage of secret/config_id in examples

* Python 2.6 compat

* Extend secrets and configs tests
5 years ago
Martin Krizek 5064e67d37 yum: take care of stale/invalid yum.pid (#58457)
* yum: take care of stale/invalid yum.pid

* Add changelog
5 years ago
Sam Doran 20ad120829 Omit -A and -G options in local mode since luseradd does not support these (#55401)
Add integration tests
5 years ago
Sam Doran 1bba30981c
Revert "Add podman container module to ansible" (#58422)
This reverts commit f01468a9d9.
5 years ago
Matt Clay b06f5634c5 Simplify ansible-test target expansion.
Targets are always expanded to full lists now instead of optimizing
for shorter lists by collapsing directories.

This change only affects unit tests and the ansible-doc sanity test,
as they were the only remaining tests using the old behavior.
5 years ago
Zim Kalinowski c9d82024c7 shared image gallery modules (#57386)
* modules to handle shared image gallery

* update test

* and firewall update

* fixed gallery problems

* fixed gallery version

* fix

* several fixes to the gallery

* several fixes

* fixes

* fix non-updatable

* fixed test & image

* fixed idempotency

* fix test

* image version test fixed

* fixes

* changed ux

* trigger

* fix syntax

* fixed sanity

* updated module + test delete

* fixed some sanity & delete

* continue fixing sanity

* sanity fix and pause after deleting image version

* extended delay

* removed sanity ignore

* try to ignore errors

* repeat until successful

* more retries

* updated test, etc.

* updated test

* updated shared image gallery docs
5 years ago
Will Thames eda5dd826f Add rds_snapshot module (#39994)
* new module uses modern ansible AWS standards
* adds additional tests for snapshots
* Update return_skeleton_generator for python3 - should
  set type to `str`, not `string`.
5 years ago
Matt Clay f109184753 Recognize module tracebacks on stdout and stderr.
Module tracebacks may be reported on stdout instead of stderr when
using some connection plugins. For example, the ssh connection plugin
will report tracebacks on stdout due to use of the -tt option.

This change results in tracebacks being recognized on both stdout
and stderr, instead of the previous behavior of just stderr.

ci_complete
5 years ago
Sam Doran 911a2ec6d3 Make nuage_vspk test more reliable
- don't background the nuage-vsd-sim
- increase the asncy timeout
- use uri to actually query the simulator API to make sure it is ready for connections
5 years ago
Matt Clay cc7556fb7f Disable podman_container test. 5 years ago
Sam Doran 9ba7015458
podman_image_info - Do not fail when nonexistant image name is provided (#57962)
* Account for older versions of Podman lacking 'exists'
5 years ago
Rui Moreira edcb5b6775 dms_replication_subnet_group (#56980
* dms_replication_subnet_group implementation
5 years ago
Abhijeet Kasurde bc3c90f2f1 datadog_monitor: Fix docs with datatypes of params (#58371)
* datadog_monitor: Fix docs with datatypes of params

Fixes: #58342

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* indentation and other minor fixes
5 years ago
Matt Clay 4591a300ae Update sanity test ignore for hostname module. 5 years ago
Daniel Mellado Area db689f7221 Fix ovsdb module not being idempotent (#57735)
openvswitch_db was not parsing properly some arguments, which caused
some commands to be executed when they shouldn't. This commit fixesit
and adds unit testing for the usecase.

Closes-Bug: #55432
Closes-bug: #43858
5 years ago
René Moser f2cc447b4d
dnsimple: fix missing defaults and doc (#58116)
* dnsimple: fix missing defaults and doc

* fix sanity
5 years ago
Pilou 77e01e6abc tower_role: ensure alias of "validate_certs" parameter is handled (#57518)
* tower_role: ensure alias of validate_certs is handled

* tower modules: remove tower_verify_ssl alias too

Error was:

    Failed to update role: The Tower server claims it was sent a bad request.
    GET https://tower/api/v2/projects/22/object_roles/
    Params: [('tower_verify_ssl', False), ('role_field', 'admin_role')]
    Data: None
    Response: {"detail": "Role has no field named 'tower_verify_ssl'"}

Full traceback:

    File "/tmp/ansible_tower_role_payload_7_2p0X/__main__.py", line 145, in main
      result = role.grant(**params)
    File "/usr/local/lib/python2.7/dist-packages/tower_cli/resources/role.py", line 365, in grant
      return self.role_write(fail_on_found=fail_on_found, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tower_cli/resources/role.py", line 242, in role_write
      fail_on_multiple_results=True, **data)
    File "/usr/local/lib/python2.7/dist-packages/tower_cli/models/base.py", line 301, in read
      r = client.get(url, params=params)
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 546, in get
      return self.request('GET', url, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tower_cli/api.py", line 299, in request
      kwargs.get('data', None), r.content.decode('utf8'))
5 years ago
Matt Clay 5e4f457a47
Fix incorrect assumptions in integration tests. (#58372)
* Fix service integration test.

Set the proper file mode when copying before asserting the mode is correct.

* Fix certificate_complete_chain test.

Do not assume that testhost is the same as localhost.
5 years ago
Tim Rupp 46214c9ef4
Replaces #16690 (#58369)
Adding integration tests for testing the 'mode' arg of the apt_repository module
5 years ago
Matt Clay d5542afd97 Properly enforce shebang on collections. 5 years ago
Matt Clay 013b0039ba
Fix incorrect assumptions in integration tests. (#58365)
* Fix nested template test.

There were two issues with the previous implementation:

1. The LOGNAME environment variable may not be set.
2. The comparison assumed that testhost is localhost.

* Fix variable display for cartesian lookup test.

* Fix vars list test.

The test assumed that the ansible_user variable is always set,
which is not guaranteed when using connections other than local.

* Fix supervisorctl integration test.

Use ansible_user_id instead of ansible_user since ansible_user
is not guaranteed to be available when the connection is not local.

* Fix file integration test.

Use ansible_user_id instead of ansible_user since ansible_user
is not guaranteed to be available when the connection is not local.

* Fix expect integration test.

Do not assume module_utils is available for utility scripts.

* Fix python_requirements_info integration test.

Check for pip instead of ansible, since ansible is not guaranteed
to be installed when using a connection other than local.

* Fix ansible-runner integration test.

Use implicit localhost to run the test since it requires access
to the ansible installation currently being tested.

* Fix tower_common integration test.

Accept errors on stdout or stderr.

* Fix tower_user integration test.

Recognize errors on stdout or stderr.
5 years ago
Sviatoslav Sydorenko c604e347b2 Skip podman_container integration tests @ RHEL8b (#58363) 5 years ago
Sagi Shnaidman f01468a9d9 Add podman container module to ansible
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
5 years ago
ShachafGoldstein 65b0e1425b win_pagefile - Fix idempotency when same settings as current (#57893)
* win_pagefile - Fix idempotency when same settings as current

* Fix tests and code

* Fix problem with system managed

* Fix again systemmanaged detection

* Change check of systemmanged in creation

* Fix readability and wrong flag for test
5 years ago
René Moser 360a9f1a68
exoscale: exo_dns: fix sanity checks (#58312) 5 years ago
Matt Martz e32d60bbcd
Add back _contains_vars method as maybe_template (#58290)
* Add back _contains_vars method as maybe_template. Fixes #58282

* Remove template guard in a few places

* maybe_template sounds like it might template something, rename to is_possibly_template

* Add tests for is_possibly_template
5 years ago
Sam Doran 18d713e6d5 Use Mapping rather than dict when evaluation 'options' (#58215) 5 years ago
Will Thames a09aa205e1 Fix RDS test suite and minor bugs revealed (#57940)
* Update testing policy to be correct for RDS test suite
* Create read replica in same region to avoid more permissions being
  required
* Ensure modifying DB doesn't try to downgrade engine version
* Add tags to main test suite to limit number of tests run for problem
  solving
5 years ago
Tim Rupp 48af9bdfec Adds tls_version argument to mqtt module (#58264)
Fixes: #22034

This patch adds support for a tls_version parameter that allows the
TLS version used to be configurable. By default the module will let
the underlying system libraries pick the maximum supported version.

This parameter is useful for servers that are unable to support
newer versions of TLS
5 years ago
Wojciech Wypior ac101f7f33 adds initial_hotfix parameter to vcmp guest (#58180) 5 years ago
Rowin Andruscavage 896b84bfbe VMware: Python3 migrations for vmware_inventory.py (#47538)
* Sort and pretty print json output and cache file
* Enable Python3 test for vmware_inventory.py

Fixes: #46727

Signed-off-by: Rowin Andruscavage <8740187+MTN-RowinAndruscavage@users.noreply.github.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Mariusz Mazur 06292566ec kubevirt: more unit tests (#57739)
* Add tests for KubeAPIVersion

* Legibility improvements for KubevirtVM tests

* Create units.utils.kubevirt with common stuff

* Add some VMIRS unit tests
5 years ago
Matt Clay f749ef5c0a Remove existing invalid ignores. 5 years ago
Matt Clay 535e646a66 Add test for invalid ignore entries. 5 years ago
lolcube 547a29805e openssh_keypair: bugfix make regenerating keypairs via force possible… (#57801)
* openssh_keypair: bugfix make regenerating keypairs via force possible / add invalid file handling

* openssh_keypair: change permissions of read-only file instead of deleting it for regeneration; add changelog fragment

* address review feedbak, refactor

* add integration tests for bigfixes

* linter: fix indent

* fixup integration tests: use force when regenerating an invalid file

* linter: fix indent

* openssh_keypair: address review feedback

* openssh_keypair: fixup, remove backtick

* openssh_keypair: address review feedback

* Only pass 'y' into stdin of ssh-keygen when file exists.
5 years ago
Felix Fontein b78d23d4ad Use newer test container. 5 years ago
Abhijeet Kasurde 2e1392eff8 ipaddr: unit tests for empty string (#58274)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Andrey Klychkov 278c59b17e postgresql_privs: bugfix of 27327 - incorrect views handling (#58272) 5 years ago
rajaspachipulusu17 fc1798cc14 Pluribus Networks ipv6security raguard module with UT (#57031)
* Pluribus Networks ipv6security raguard module with UT
* Doc fixes
5 years ago
pratikgadiya12 44058e9425 Allow multiple databases(not all) to be dumped from mysql (#56721)
* Allow multiple databases(not all) to be dumped from mysql

Fixes: #56059

* Altered fail message to provide atleast one database name

* Minor grammatical fix
5 years ago
Felix Fontein 75ca8eb42f
openssl_certificate: fix failing SAN comparisons (#58256)
* Fix failing SAN comparison for older cryptography versions due to not implemented __hashh__ functions.

* Fix SAN comparison: IPv6 addresses need to be normalized before comparing strings.

* Add changelog.

* Fix comment.
5 years ago
Felix Fontein 66a4000058
Adjust tests to new error messages for older docker-py versions. (#58253) 5 years ago
Felix Fontein 808cf4aa26
Remove from sanity ignores. (#57911) 5 years ago
Felix Fontein 4a12be31fb docker_* modules: improve error message when docker-py is missing (#57914)
* Improve error for docker modules when docker-py can't be imported.

* Add changelog.

* Mention platform and Python interpreter in more cases.

* Clarify wording.

* Adjust tests.
5 years ago
Wojciech Wypior 30ada17d4f Adds message routing transport module (#58201) 5 years ago
Wojciech Wypior b8fd2f4df3 adds generic routing peer module (#58189) 5 years ago
Wojciech Wypior 429bf5340e adds module for message routing protocol (#58188) 5 years ago
Wojciech Wypior 0a3a94a493 adds new module to manage firewall schedules (#58187) 5 years ago
Wojciech Wypior 92a1e6845c Adds two modules to manage AFM log profiles (#58186) 5 years ago
Gonéri Le Bouder db81b1d0f5 prepapre_vmware_tests: add a common vars file
Add a new file to record the variables that are shared with the two
scenarios (real_lab and vcsim).

The goal is to reduce the the amount of boilerplate configuration from
a user perspective.
5 years ago
Toshio Kuratomi eb7e4591ae Fix ios test for python2 non-ascii paths 5 years ago
Paul Belanger d010510835
Remove more usage of pause with junos tests (#58153)
This removes more potential race conditions with junos testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Wojciech Wypior fbca93b8ad removes args from the code and corrects few missed tests (#58175) 5 years ago
Wojciech Wypior 56b3b1ac56 adds message routing router module (#58191) 5 years ago
Wojciech Wypior c1f2df4753 adds message routing route module (#58190) 5 years ago
Sam Doran 7b9d991f78
Add Fedora 30 to test matrix (#57713)
Remove Fedora 28 from test matrix
5 years ago
Wojciech Wypior 95e59e7ee7 adds description to bigip snatpool (#58179) 5 years ago
Wojciech Wypior 3531bf3148 fixes issue with ssl protocols ordering (#58177) 5 years ago
Wojciech Wypior becca36c5e Added new module for remote user management (#58171) 5 years ago
Kevin Breit 0f12e1c7d8 Meraki - Improve type information in module documentation (#58114)
* Improve type information in module documentation
- Removed some duplicate documentation
- Ensure org_id is always string
- Add type information for items which don't have it

* Fix whitespace
5 years ago
Sam Doran dc8f7b38e6
Check that provider['options'] is a dictionary in validate-modules (#58078) 5 years ago
Sumit Jaiswal 58d446e61a
PR to fix where ansible_net_model was not being populated (#58159)
* fix bug 57285

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

* minor fix

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

* adding TC fix related

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

* fix shippable error

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
markafarrell 43872d6b88 Fix netconf guess_network_os to use ssh_config if supplied. (#55199)
* feature: use network_os=auto to trigger network os guessing

* doc: add debug messages

* fix linting

* fix test_netconf_init default network_os is auto

* add documentation

* fix rst errors

* use init lexer

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update lib/ansible/plugins/connection/netconf.py

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

* Update lib/ansible/plugins/connection/netconf.py

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

* Update lib/ansible/plugins/connection/netconf.py

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

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

* Update docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Kohei Asano ddf6d096c5 Support the new TLS termination on NLBs (#51327) (#58031) 5 years ago
Sam Doran b9d77b997e
passwordstore lookup - replace expired GPG key (#58141)
- Replace private key that expired an 2019-06-20 with a key that does not expire
- Document how to generate a new GPG key using an input file
5 years ago
Dmitriy Yakovlev 122d4164c5 docker_swarm_service: Added default value for mounts.source (#58039)
* Added default value for mounts.source

* Added the changelog fragment

* Added tests

* Fixed separators

* Moved the teardown section at the end
5 years ago
Sumit Jaiswal 77b6255305 PR to fix ios bgp TC failure (#58010)
* fix ios bgp tc failure

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

* skip test with 15.6(T)2 ios

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

* skip test with 15.6(T)2 ios

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
smile37773 3a3465c47d Add the way to create a VM with the image id (#58106) 5 years ago
Sam Doran 18feeb51a8
Change integration tests in order to pass on Fedora 30 (#58081)
* Use different package for DNF tests
    Ninja caused errors in Fedora 30. This works in both Fedora 29 and 30.

* Fix git integration tests
    Git >= 2.21.0 has either a bug or change in behavior where it errors when fetching a
    repository containing submodules that are behind the upstream submodule commits.
    It's weird and I don't fully understand it.

    Get around this my checking out specific commits from a repository rather than
    switch the origin URL.

* Fix PostgreSQL tests
    The error message is slightly different
5 years ago
Chris Van Heuveln 52c811c841 nxos_bgp_neighbor: Add bfd support (#56932)
* nxos_bgp_neighbor: Add bfd support

- Add support for bfd state in nxos_bgp_neighbor

- Feature Pull Request

- nxos_bgp_neighbor

- Tested on platforms: `N3K,N6K,N7K,N9K`

* bfd T/F now bfd enable/disable

* pep fix ws
5 years ago
Chris Van Heuveln 727a6b405a nxos_ospf_vrf: Add 'bfd' support (#57425)
* nxos_ospf_vrf: Add 'bfd' support

* Add default to bfd doc hdr

* bfd T/F now bfd enable/disable
5 years ago
Chris Van Heuveln 30830a4482 nxos_pim: Add bfd support (#56908)
* nxos_pim: Add bfd support

* Add integration sanity

* minor cleanup

* bfd T/F now bfd enable/disable
5 years ago
Kevin Breit 8f68c8d438 meraki_snmp - Enable check mode (#54625)
* Add support for check mode

* Add diff support

* Remove check mode for idempotent action
5 years ago
Andrey Klychkov 64d0559e9f Postgres module_utils: add get_connect_params + unit tests (#58067)
* add get_conn_params

* add get_conn_params: add to the modules
5 years ago
René Moser 6bace8aa54
vultr: vultr_account_facts -> info (#57563) 5 years ago
Rob feae35ab7e add IAM role assumption to aws_ec2 inventory (#41637)
* add IAM role assumption to aws_ec2 inventory
* Ensure inventory._options has necessary option keys populated since the plugin docs parser isn't accessible to unit tests yet
5 years ago
The Magician 7733dcabd3 Bug fixes for GCP modules (#57826) 5 years ago
The Magician a1128b6b94 Bug fixes for GCP modules (#58016) 5 years ago
Felix Fontein 505c99265c docsite: remove lexers which have been fixed in Pygments 2.4.0 (#57508)
* Remove lexers which have been fixed in Pygments 2.4.0.
* Add Pygments >= 2.4.0 to test runner.
* Fix pages that triggered lexer errors.

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
5 years ago
Paul Belanger 8dc51dfe1c
Remove pause logic form junos_netconf tests (#57966)
We can switch to wait_for / meta, as using pause can lead to race
conditions on slower / faster hardware.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Guillaume Martinez ec7b18952b gitlab_runner: Fix idempotency when creating runner (#57833) 5 years ago
hexdump0x0200 81f0b70f11 junos_netconf: fix check mode, fixes #57929 (#57930) 5 years ago
Kevin Breit d24e9ab4bb meraki_content_filtering - Add support for querying (#57273)
* Added querying functionality

* Fix PEP8 and documentation

* Increment version added

* Fix version info
5 years ago
Felix Fontein f56cf72e2b
ufw: remove from sanity ignores (#57910)
* Remove from pylint ignore list.

* Make sure that option is called the same as in the documentation.
5 years ago
Felix Fontein da6f6cc456 Fix missing doc type. (#57884) 5 years ago
ShachafGoldstein 66728cb93f win_get_url - Fix handling of restricted headers (#57892)
* fix 57880

* ADded test

* Remove host header from test

* TEst error

* Fix tests

* fix user agent test
5 years ago
Will Thames 924352a051 ecs_cluster test suite refactor (#57716)
* Combine testing policies

Because of the maximum of 10 policies per group, need to
consolidate testing policies as best we can.

* 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

* refactor ecs_cluster test suite

move from runme.sh technique to virtualenv

use ec2_instance rather than ec2 module to
avoid need for boto
5 years ago
Alicia Cozine 5658b2ee3e
Adds custom 404 with cowsay image (#57422)
* Adds custom 404 with image, updates CI reqs, sets version latest for TOC links on 404 page
5 years ago
Ganesh Nalawade 4a3e14f90b More iosxr integration zuul CI test fixes (#57909)
* Ignore `<rpc-reply>` node from candidate and
  running configuration in xml diff

* Add route-policy as prerequisite to BGP coonfiguration
  in integration test
5 years ago
Abhijeet Kasurde cf623fa62f
Terraform: Fix unbound local error (#57044)
* Added Unit tests
* Fixed regression

Fixes: #56934

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Paul Belanger 7f536630eb
Use wait_for in prepare_junos_tests.yaml (#57073)
This should reduce the amount of time we are waiting for netconf to come
online.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Jordan Borean d0c4914469
win_shell - fix space escaping for custom executable (#57455) 5 years ago
Ganesh Nalawade 0d2ffdd5a6
Fix iosxr netconf integration test (#57882)
* Modify testcase to work with Zuul CI enviornment
5 years ago
Matt Clay 597d943dad Remove needs/ssh alias from callback_default test.
The test does not require ssh.
5 years ago
Matt Clay 37ea47c848 Fix python injection when using a virtualenv. 5 years ago
Sam Doran 84075fe351 Change RHEL8 image name to match changes in ansible-test (#57807)
* Change RHEL8 image name to match changes in ansible-test

Continue to use the beta version of RHEL 8 until we fix tests that are breaking with the GA version.

* Skip ufw integration test on RHEL 8 Beta
5 years ago
Sam Doran 4f61654fc5 Change default test container to version 1.8.1 5 years ago
Pierre-Louis Bonicoli 3fb4c91d4c validate-modules: ignore existing E337/E338 errors 5 years ago
Pierre-Louis Bonicoli c289006e05 validate-modules: new module: fail if 'type' isn't documented
Don't require 'type' when:
- parameter name starts with an underscore
5 years ago
Nilashish Chakraborty af25274d6a
Remove backup from iosxr replace_config test (#57830)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Gonéri Le Bouder 7d85cbcc6c vmware: test-suite fixes
Minor fixes for the test-suite found during the integration with the CI.
5 years ago
bobdoah 33d0d36eaa AWS: Fix KeyError in aws_secret lookup (#54792) 5 years ago
Jill R 7ce85ee9e8
vcenter test provider handle config vars handling (#57813)
Make vcenter test provider handle config file vars the same regardless of
whether it comes from static config or from worldstream provisioning
5 years ago
The Magician ab0a548b0c Bug fixes for GCP modules (#57728) 5 years ago
The Magician 625ef22dd9 New Module: gcp_tpu_node (#57729) 5 years ago
Kevin Breit a85750dc98 Meraki - Convert response keys to snake_case from camelCase (#53891)
* Initial proposal for new parameter option for response format
- output_version parameter dictates the response key case
- new is snake_case, old is camelCase
- If new, conversion is done at the end of module execution
- This is purely a proposal and not a final draft

* Add support for ANSIBLE_MERAKI_FORMAT env var
- If env var is set to 'camelcase' it will output camelcase
- Otherwise, will default to snakecase
- Added note to documentation fragment
- As of now, all module documentation needs to be updated

* Fix pep8 errors and remove output_version args

* Restructure check in exit_json so it actually works

* Add changelog fragment

* Change output_format to a parameter with env var fallback
- ANSIBLE_MERAKI_FORMAT is the valid env var
- Added documentation

* Convert to camel_dict_to_snake_dict() which is from Ansible
- Fixed integration tests

* Fix yaml lint error

* exit_json camel_case conversion handles no data
- exit_json would fail if data wasn't provided
- Updated 3 integration tests for new naming convention

* convert_camel_to_snake() handles lists and dicts
- The native Ansible method doesn't handle first level lists
- convert_camel_to_snake() acts simply as a wrapper for the method
- There maybe a situation where nested lists are a problem, must test
- Fixed integration tests in some modules

* A few integration test fixes

* Convert response documentation to snake case
5 years ago
Sam Doran 99fd7821b3 Split azure_rm_virtualmachine integration tests to prevent timeouts (#57250) 5 years ago
Mariusz Mazur 51add5aa79 kubevirt: enable/update tests + fix merge_dicts() (#57685)
* Actually run the unit tests and separate them into two files

* Re-add recursion to merge_dicts()

* Update tests to work with current code
5 years ago
Abhijeet Kasurde 00604d3f2c
VMware: Fix vmware_guest_move undefined VM name error (#57582)
* Updated testcase
* Added check mode support
* Added check for mutual exclusive for Name and UUID

Fixes: #57580

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
René Moser 5143f52def
vultr: vultr_ssh_key_facts -> info (#57571)
* vultr: deprecate vultr_ssh_key_facts

* vultr: rename tests

* vultr: adjust tests

* vultr: new vultr_ssh_key_info module

* vultr: test: vultr_ssh_key_info: improve tests

* update docs
5 years ago
Kevin Breit 17c475b101 meraki_ssid - Improve change reporting (#56201)
* Improve change reporting for meraki_ssid
- Documentation is more clear about dependencies
- Not all change reports are accurate without new algorithm
- Improved integration tests

* Rename changelog fragment

* Enable all tests in integration tests
- Fix type merging

* Add more integration tests for code coverage

* Update URL creation
5 years ago
Martin Krizek 1fa7bfcd5d Fix --diff to produce output when creating a new file (#57744)
* Fix --diff to produce output when creating a new file

Fixes #57618

* Make the check more defensive
5 years ago
Kevin Breit a50b3d7695 meraki_syslog - Module properly handles net_id parameter (#57286) 5 years ago
Kevin Breit 87169c4aa4 meraki_vlan - Enable check mode (#54627)
* Add support for check mode

* Add diff support
- diff support is based on "have" and "want" data structures.
- Review needs to be done on the diffs for accuracy and usefulness.
- Changed change mode changed responses to be accurate.

* Remove config template based integration tests
5 years ago
Kevin Breit b13e5242e0 meraki_mr_l3_firewall - Fix integration test cleanup (#57562) 5 years ago
Stefan Horning 77ec0549b0 New module for AWS CodeBuild (#47187)
* New AWS module for the CodeBuild service, called aws_codebuild

* Integration test for new aws_codebuild module
5 years ago
Stefan Horning 33a26d31fd New module for AWS CodePipeline (#47189)
* New module for AWS CodePipeline

* Added integration test for new aws_codepipeline module
5 years ago
Chris Van Heuveln 205f6b1699 nxos_pim_interface: Add 'bfd' support (#57133)
* nxos_pim_interface: Add 'bfd' support

* PEP fixes

* fix copyright date

* bfd states changed from T/F to enable/disable/default
5 years ago
ShachafGoldstein 7880be240f Remove usage of global var log_path for win_domain_* modules (#57092)
* Remove usage of global var log_path

* Add changelog and edit ignore.txt

* win_pagefile: not using testPath

* Revert "win_pagefile: not using testPath"

This reverts commit c8bc10234048257414454905e1c860a8f57a3b3f.

* PSLint error

* Update win_domain_membership.ps1

* Update win_domain_controller.ps1
5 years ago
ShachafGoldstein d2909d5ef0 win_scheduled_task: Fix start/end boundry triggers to allow for timezone sync (#57282)
* Fix 49327

* Add a test

* Join test

* Test issue

* Fix missed assertion
5 years ago
The Magician ecbd1173b9 New Module: gcp_cloudscheduler_job (#57262) 5 years ago
Martin Krizek e8948f7655
Actually run valid_include_keywords test (#57687) 5 years ago
Jill Rouleau aba06b893b Add proxy vars to vcenter integration test config 5 years ago
Paul Belanger 07e1bd8fe7
Fix ios_smoke failure (#57665)
Set ansible_buffer_read_timeout to be larger then
ansible_command_timeout, as both appliance / controller are on the same
physical network and we are not triggering ansible_command_timeout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
René Moser 8c3382ec70
vultr: vultr_os_facts -> info (#57565)
* vultr: vultr_os_facts: rename to info

* vultr: vultr_os_facts: rename tests to info

* vultr: adjust tests

* vultr: new vultr_os_info module
5 years ago
René Moser 0ca50c7d6f
vultr: vultr_user_facts -> info (#57564)
* vultr: deprecate vultr_user_facts

* vultr: vultr_user_facts: rename to info

* vultr: adjust tests

* vultr: new vultr_user_info module
5 years ago
ShachafGoldstein a87495d07c win_pagefile: not using testPath (#57093)
* win_pagefile: not using testPath

* Added changelog
5 years ago
Enno Gröper 1ed7a654ba Improve testing of FactCache (#55739)
* Improve testing of FactCache
5 years ago
Felix Fontein 13f73adef5
AWS: _facts -> _info (part 4) (#57651)
* Rename ec2_vpc_dhcp_option_facts -> ec2_vpc_dhcp_option_info.

* Rename ec2_vpc_endpoint_facts -> ec2_vpc_endpoint_info.

* Rename ec2_vpc_igw_facts -> ec2_vpc_igw_info.

* Rename ec2_vpc_nacl_facts -> ec2_vpc_nacl_info.

* Rename ec2_vpc_nat_gateway_facts -> ec2_vpc_nat_gateway_info.

* Rename ec2_vpc_net_facts -> ec2_vpc_net_info.

* Rename ec2_vpc_peering_facts -> ec2_vpc_peering_info.

* Rename ec2_vpc_route_table_facts -> ec2_vpc_route_table_info.

* Rename ec2_vpc_subnet_facts -> ec2_vpc_subnet_info.

* Rename ec2_vpc_vgw_facts -> ec2_vpc_vgw_info.

* Rename ec2_vpc_vpn_facts -> ec2_vpc_vpn_info.

* Update module defaults, add changelog and porting guide.

* Update BOTMETA.
5 years ago
Sloane Hertel 598a058afe
[FactCache] define first_order_merge method (#55781)
* Add first_order_merge method

Add test for updating a key that already exists

* changelog
5 years ago
Matt Clay 1e6edf2ccc Limit tests to paramiko < 2.5.0. 5 years ago
Felix Fontein 804d5eaf8e
AWS: _facts -> _info (part 3) (#57635)
* Rename ec2_ami_facts -> ec2_ami_info.

* Rename ec2_asg_facts -> ec2_asg_info.

* Rename ec2_customer_gateway_facts -> ec2_customer_gateway_info.

* Rename ec2_eip_facts -> ec2_eip_info.

* Rename ec2_elb_facts -> ec2_elb_info.

* Rename ec2_eni_facts -> ec2_eni_info.

* Rename ec2_group_facts -> ec2_group_info.

* Rename ec2_instance_facts -> ec2_instance_info.

* Rename ec2_lc_facts -> ec2_lc_info.

* Rename ec2_placement_group_facts -> ec2_placement_group_info.

* Rename ec2_snapshot_facts -> ec2_snapshot_info.

* Rename ec2_vol_facts -> ec2_vol_info.

* Update module defaults, add changelog and porting guide.

* Forgot one occurence of ec2_instance_facts.

* Update BOTMETA.

* Break too long line.
5 years ago
Felix Fontein fc4bbff6e1
AWS: _facts -> _info (part 2) (#57626)
* Rename cloudwatchlogs_log_group_facts -> cloudwatchlogs_log_group_info.

* Rename elasticache_facts -> elasticache_info.

* redshift_facts -> redshift_info.

* Rename route53_facts -> route53_info.

* Rename rds_instance_facts -> rds_instance_info.

* Rename rds_snapshot_facts -> rds_snapshot_info.

* Rename iam_mfa_device_facts -> iam_mfa_device_info.

* Rename iam_role_facts -> iam_role_info.

* Rename iam_server_certificate_facts -> iam_server_certificate_info.

* Rename elb_application_lb_facts -> elb_application_lb_info.

* Renaming elb_classic_lb_facts -> elb_classic_lb_info.

* elb_target_facts -> elb_target_info.

* Rename elb_target_group_facts -> elb_target_group_info.

* Update porting guide.

* Add changelog.

* Fix module defaults (both for this PR and #57613).

* Two fixes.
5 years ago
Abhijeet Kasurde 3bee49a3bb Remove trailing new line while including vars (#57605)
While including var files using _raw_params adds additional new line
character, which makes Ansible to fail to include that file in.
This fix removes extraneous new line character while parsing the var file.

Fixes: #57593

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Ganesh Nalawade a867ced4de Fix junos integration zuul CI failures (#57309) 5 years ago
Felix Fontein 51229eb99c
AWS modules: _facts -> _info (#57613)
* Rename aws_acm_facts -> aws_acm_info.

* Rename aws_az_facts -> aws_az_info.

* Rename aws_caller_facts -> aws_caller_info.

* Rename aws_kms_facts -> aws_kms_info.

* Rename aws_region_facts -> aws_region_info.

* Rename aws_sgw_facts -> aws_sgw_info.

* Rename aws_waf_facts -> aws_waf_info.

* Adjust docs.

* Add changelog and update porting guide.
5 years ago
Anton Nikulin 4fa93d5b9b FTD configuration module: fix a bug with response parsing (#57480)
* Update dependence's name to firepower-kickstart

* Check response type before getting attributes

* Add unit test for construct_ansible_facts method

* Update error message
5 years ago
Felix Fontein 039eb892ba
Second batch for _facts -> _info rename (#57020)
* Second batch of _facts -> _info.

* Forgot one reference.
5 years ago
Sajna Shetty e25269e1b3 Adding dell ome device_info module (#53438)
* Adding device_facts module for contribution

* changes added for pylint error

* Updated code to solve ansible-test compile error

* Changes to avoide comile error added

* Review Comments changes update

* Avoided blank line

* pylint error changes

* Removed ansible_facts return in error case

* Updated description

* modules renamed

* changing from ansible_facts to device_info

* avoide pep8 error

* Updated sample output

* version changed to 2.9

* Changed Copyright license to BSD

* Changed 3-clause BSD license to 2-clause BSD

* Added unit test support for ome_device_info

* version change

* removed pylint error in unit test modules

* Avoid Sanity error for unit test modules

* updated version
5 years ago
Chris Archibald a58570f1bc na_ontap_snapshot_policy: Add ability to multiple schedules (#57366) 5 years ago
ECRR 5cc6486a2b Merge authentication options back into a single field to prevent losing options beyond the first (#57507)
* Merge authentication options back into a single field to prevent losing options beyond the first

* Add integration test and changelog

* Fix multiple options for local type connections. Also fix sorting errors between local type connections that lack a src

* Build again because of github problems?

* Add spaces before comments
5 years ago
René Moser c001391555
vultr_server: implement support for IDs to match resources (#55762) 5 years ago
Felix Fontein c50a75a41e
acme_*: new test container, tests for IP certificates (#57530)
* Bump container version.

* Use new URLs.

* Add IP certificate tests.

* Disable IPv6 IP from IP certificate.

Background: in CI, the ACME test container apparently has no IPv6 support.
Without IPv6 support, Pebble can't connect to validate, and thus validation
fails.
5 years ago
Matt Clay be84cada09 Upgrade tests to use default-test-container 1.8.0.
ci_complete
5 years ago
Sloane Hertel cd77ea3c7f
File module - fix unicode paths and add a test (#57558)
* File module - Fix unicode paths

* Add a test for unicode paths for the file module
5 years ago
Zim Kalinowski 93a85b6c86 Additional rename fixes (#57527)
* adding symbolic link

* missing renames

* reverted version_added
5 years ago
Matt Clay 79685a4a2d
Use Python 3.7 to run ansible-test coverage in CI. (#57555)
Generating XML for coverage reports on Python 3.7 uses far less
memory than on Python 2.7. This change should avoid the MemoryError
we've been seeing in the nightly coverage runs.
5 years ago
Matt Clay b211b24862 Move azure_rm_autoscale test from group 2 to 5. 5 years ago
Matt Clay 7d9cac8e47 Fix azure_rm_virtualnetwork integration test.
Previously the test would fail when run after another test which also
created a virtual network tagged with the 'testing' tag.
5 years ago
Matt Clay 767e02f9fe Fix yamllint failure. 5 years ago
Sumit Jaiswal 04bfcd08a8 PR to fix the IOS_NTP integration TC failure (#57481)
* ios_ntp tc fail

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

* ios_ntp tc fail

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

* fix for local connection

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Iain Madder 91d326cb68 Update file.py's initial_diff() to list existing when state: absent (#56353) 5 years ago
tcraxs 07d446825a New module postgresql_sequence (#55027)
* postgresql_sequence: initial commit with new module and tests

* change return variables and adjust tests

* fix sanity checks

* fix linter errors

* change formatting functions and put params alphabetically

* add new examples and remove restrict option
* remove restrict option
* remove `required: false`
* add links to documentation
* change some minor parts in documentation
* add new integration tests for
** drop cascade
** change owner

* change usage of owner and created a test case for set owner during creation

* remove some documents and use docsfragments

* add aliases for minvalue and maxvalue

* change to warn if sequence not exists but should be removed

* use connect_to_db from module_utils/postgres.py

* add checkmode for several tests

* fix psycopg2 import and connect_to_db

* add a test for drop nonexistent sequence

* change get_info funcrtion to use only one SQL statement

* rewrite the module for cleaner code
* remove psycopg2
* change check_mode behavior
* add docstrings for class and methods
* add test for create sequence with owner in check_mode

* fix typo in set_schema()

* fix docu and cleanup the code
* adjust documentation for state, schema and newschema
* remove mutually_exclusive for 'absent'
* remove unused code comments
* remove warning for drop non-exicsting sequence
* change autocommit condition

* adjust state documentation
5 years ago
Matt Clay 03d64cd9ea Fix azure_rm_resourcegroup integration test. 5 years ago
Chris Van Heuveln bd844bc11c nxos_interface_ospf: Add bfd support (#56807)
* nxos_interface_ospf: Add bfd support

Add support for `bfd` state in `nxos_interface_ospf`

- Feature Pull Request

`nxos_interface_ospf`

* Fix pep issues

* sanity loop: syntax

* bfd states changed from T/F to enable/disable/default

* doc hdr fixes
5 years ago
Matt Clay b2791718e5 Use bintray to install erlang for rabbitmq tests. 5 years ago
Matt Clay 047fd3cfbc Revert "Disable the rabbitmq tests for now"
This reverts commit 5f47ab958f.
5 years ago
Toshio Kuratomi 5f47ab958f Disable the rabbitmq tests for now
The erlang-solutions repository is broken for Ubuntu18 (They did not
sign their repository metadata).  For now, disable the rabbitmq tests
which depend upon that.  I'll open a PR with a revert of this commit.
We can watch it to see when it passes in Ci to know that the
erlang-soutions repository has been fixed
5 years ago
Matt Martz 728fce0c44 Perf improvement for Templar.is_template (#57489)
* Faster is_template
5 years ago
Brian Coca b9b0b23015
safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests
5 years ago
mjmayer 0dfc21c826 [elb_application_lb tests] narrow ami filter #43375 (#57432) 5 years ago
Junyi Yi bd48a7fb73 Implement a new module to support Batch Account (#55074)
* Implement a new module to support Batch Account.

* Fix the schema definition.

* Fix some lint errors.

* Normalize line endings.

* Remove not-recommended idempotency check.

* adding stubs for discussion

* Add one more output attribute.

* Leverage `idempotency_check` and `normalize_resource_id`.

* Fix line is too long error.

* normalize resource id implementation

* normalizing resource id fix indentation

* Fix linting issues.

* Fix runtime errors of Azure Python SDK.

* Add info module to Batch Account.

* Remove info module per suggestion.

* adding initial comparison function

* fix in idempotency check

* batch account update to support idempotence

* don't modify azure_rm_common for timebeing to avoid excessive ci

* adding first ci

* added more description on comparison function

* fixed storage account name

* fix

* fixed indent in common function + batch account name unpacking

* fix bug

* fixing sanity

* updated class relations

* fix in common

* updated disposition

* Add two more updatable/disposition in module_arg_spec

* updated common file

* Fix documentation for auto_storage_account.

* fixed line too long

* fixed keyvault reference

* fixed batch account creation

* fix pep8

* Regenerate code according to the feedbacks.

* test deleting batch account

* Add auto-generate comments to test file.

* renamed delete task, removed unstable

* clean up storage account
5 years ago
Chris Van Heuveln 7aa0d26fda nxos_bfd_global / NxosCmdRef initial commit (#56317)
* nxos_bfd_global: initial commit

This is an initial POC with just a few commands included.  The code has been written somewhat generically so that it can act as a best practices template for re-use in future modules. The implementation follows the yaml cmd_ref style to define each command's getter/setter/type/default. It supports platform-specific defaults.

The basic logic is to collect all relevant data in a `cmd_ref` dict and pass that around to various methods.

In the BFD case the devices don't provide JSON output so we have to screen-scrape with show runs.

BFD does not support present/absent states so there is no state param.

BFD has three different property types to handle. We can add add'l types as needed:

- int
- int_list (list of ints)
- str (needs support for 'no' keyword)

* Use get_capabilities to find platform type

* PR comment fixes, round 1

* Minor cleanups

* nxos_bfd_global: create NxosCmdRef in module_utils

This commit just takes the latest bfd global code and moves the bulk
of the code into new `class NxosCmdRef` in `module_utils/nxos/nxos.py`.

The only remaining code in `nxos_bfd_global.py` are the calls from `main()`.

* Add remaining command properties and documentation

* update argument_spec

* Add check for _exclude; add sanity test

* Add targets files for bfd

* Context and state absent updates

* Add dict support to cmd_ref

* Changed remaining list commands to dict usage

* Add idempotence check for dict

* Fix existing overwrite bug

* Move pattern matching logic into its own method

* add support for 'command: absent'

* Add `get_platform_shortname`; update BFD platform-specific settings

* /absent/deleted/

* /sh/show/ in prepare_nxos_tests

* add dict check to get_platform_shortname

* Add normalize_defaults()

* UTs for bfd_global

* support yaml for both py2/py3

* update cmd_ref doc header

* Fix python2.6 incompatibility with dict comprehensions

* Fix bfd_global doc header (yaml syntax fail)

* more shippable fixes

* yet more shippable fixes

* shippable: remove r' ' wrappers

* docfix - remove ':'

* escape regex ctl chars in yaml table

* remove extra blank lines

* Fix str(None) issue

* Command context updates

* import PY2,PY3 instead of import sys

* fix ordereddict import & parent_context

* try/except for yaml import

* fix import issue for ordereddict

* remove epdb

* nxosCmdRef_import_check() workaround for shippable

* fix PEP ws errors
5 years ago
Will Thames f65ac2cf23 Add tests for #56147 (#57256)
Tests are separate for easier backporting
5 years ago
Marcus Watkins 6e94b472e8 Fix #56640: Map k8s ansible keys to api keys (#57418)
* Fix #56643: Map ansible keys to api keys

* Remove errant print line

* Fix pep8 issue

* Fix doc line

* Added test for validate_certs -> verify_ssl translation for k8s module
5 years ago
Ian Wienand 6f06fc9945 openssh_keypair: make fingerprint result a string (#57295)
The extant documentation says that the fingerprint return value is a
single string, but it is currently being returned as a split list.
Convert the returned value to a string as documented, and add some
basic test-case coverage for the return values.
5 years ago
smile37773 c6097a268c rename modules azure_rm_..._facts to azure_rm_..._info (#57395) 5 years ago
Mike Wiebe 870d8bf10b Fix nxos_vtp_version test (#57358) 5 years ago
Mike Wiebe 7c73dd3e78 nxos_install_os: Fix nxapi local failures (#55993)
* Fix nxapi failures

* Remove logit debug calls

* Remove msg_timestamps

* Fix code alignment issue
5 years ago
Matt Clay 817ec5ab48 Add PyYAML check for libyaml support. 5 years ago
Matt Clay d758d5bab1 Disable code-smell tests on Python 2.6. 5 years ago
Matt Clay 490edbdc48 Add python version checking when using --tox. 5 years ago
Matt Clay 58f6604efa Support passing CFLAGS and LDFLAGS. 5 years ago
Matt Clay 7a4dc4b1b0 Comment on OBJC_DISABLE_INITIALIZE_FORK_SAFETY. 5 years ago
Matt Clay d80ef9e64b Update typed-ast version to support Python 3.8. 5 years ago
Matt Clay d9fcf95758 Add missing Python 2.6 constraint for voluptuous. 5 years ago
Matt Clay 14f8aa622e Add missing constraints for hcloud requirement. 5 years ago
Andrey Klychkov ea9a0f36f3 postgresql_table: 57352 bugfix, add schema handling (#57391)
* 57352 bugfix, add schema handling

* 57352 bugfix, added a changelog fragment

* 57352 bugfix, added tests for rename

* 57352 bugfix, fixed tests

* 57352 bugfix, fixed typos, cosmetic changes
5 years ago
xuxiaowei0512 05e6339c49 option is marked as required but specifies a default (#57257)
* required and default are conflicting
5 years ago
Kevin Breit 919f70c357 New module - meraki_malware (#56929)
* Initial commit for meraki_malware module
- Allows for manipulation of malware configuration

* Add full documentation and improve code coverage

* Add diff support

* Type change

* Sanity check fixes

* Convert org_id from str to int for consistency

* Sanity fixes again

* Fix argument type errors

* Remove ignore items for some Meraki modules so shippable is happy
5 years ago
Kevin Breit 8bcf9b5734 meraki_network - Restructure execution logic (#56818)
* Restructure meraki_network to be simpler and work for all int tests

* Enable all integration tests and enhance error reports

* Slight tweaks to integration tests
5 years ago
Daniel Mellado Area 091bebcbf7 Add support for vlan update on ovs bridges (#57168)
This commit adds support for vlan update on openvswitch_bridge module.
5 years ago
Kevin Breit 72f2d05b6f meraki_content_filtering - Enable check mode (#54638)
* Add support for check mode.

* Add diff support
- Need to analyze diff for accuracy
- Updated check mode changed value

* Improve test coverage

* Remove a duplicate integration test
5 years ago
Kevin Breit 6da2d40500 meraki_admin - Enable check mode (#54499)
* Add support for check mode

* Add changelog fragment

* Add diff support
- Fix a few changed status
- Removed auth_key check since that's done in module_utils now
5 years ago
Ed Costello 30aeab4709 Make aws_ses_identity module work when region is provided via environment or config. (#51627)
fixes #51531
5 years ago
Martin Krizek 18f2ed63e0
file: fix setting relative paths for src for hard links (#56055) 5 years ago
Martin Krizek 705d0201cf
file: fix setting attributes for symlinked file (#57217) 5 years ago
Jordan Borean b5b75daaa5
win_chocolatey - honour version when bootstrapping chocolatey and fix package listing (#57208)
* win_chocolatey - honour version when bootstrapping chocolatey

* skip upgrade all step

* Fix install latest step

* Remove test changes now that Chocolatey is released

* tweak the package version detection
5 years ago
Matt Clay b1e6ad9754
Limit Python 2.6 units to modules & module_utils. (#57377) 5 years ago
Jill R 47cfbd6605
Add integration test provider for vmware (#55772)
* Add integration test provider for vmware

This change adds a new remote cloud provider option for vmware,
supporting dynamic environments running on worldstream.nl as well as
static environments specific by the user in a cloud-config template.
5 years ago
Chris Archibald 57b3160f13 new feature (#57320) 5 years ago
Abhijeet Kasurde ee8a607cca ipaddr: Handle network address in ipmath (#57149)
* Updated testcase, documentation

Fixes: #54457

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Chris Van Heuveln 6bb13bbb84 nxos_vlan: fix broken purge behavior (issue #57101) (#57229)
* nxos_vlan: fix broken purge behavior (issue #57101)

Symptoms/Analysis:
- `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1.
- `nxos` devices do not allow removing vlan 1 and raise a cli exception error
- Previous fix #55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g.
 - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true`
 - results in proper purging but vlan 4 is not created

Solutions:
- ignore vlan 1 when purging
- remove the `not purge` check from state present logic

Added additional unit tests and integration tests.
Tested against all regression platforms.

* PEP fixes

* Add agg_show_vlan_brief.txt fixture

* Add warning for removing vlan 1

* change method name check
5 years ago
Matt Clay 858e3a7272 Correct virtualenv usage in integration tests. 5 years ago
Felix Fontein 7b40b569b2
Rename memset_*_facts to memset_*_info (#57030)
* Rename memset_*_facts to memset_*_info

* Add changelog.
5 years ago
Stefan Horning ddfaa83ccf s3_bucket: add encryption capabilities to the module (#55985)
* s3_bucket: add encryption capabilities to the module
5 years ago
Andrey Klychkov 3e06013eb6 unittests for module_utils.common.removed.removed_module function (#57214) 5 years ago
Mike Wiebe 87422ea7e7 nxos_snmp_user, nxos_snmp_host integration test fixes. (#57201)
* Fix nxos_snmp tests

* Add imagetag check for nxos_snmp_user test
5 years ago
Sam Doran 2e0229a4b6 ansible-vault: convert vault_password_files to list to prevent traceback (#57186)
* Convert vault_password_files to a list

* Add changelog and tests
5 years ago
Sloane Hertel 21cd24a0dd improve conditional warnings (#57190)
* Fix order for warning on templated conditionals

Fix bare variable warnings when the variable is a boolean

* changelog

* Add tests for cases that should and should not give warnings

If the behavior may change when the default behavior for CONDITIONAL_BARE_VARS becomes False there should be a warning. Boolean type conditionals will not change in behavior so don't warn.

* oops, forgot to add files

* typo
5 years ago
Andrey Klychkov 96bf243265 New module postgresql_copy: copy data between a file and a table (#56835)
* New module postgresql_copy

* New module postgresql_copy: added tests

* New module postgresql_copy: changed tests

* New module postgresql_copy: doc format fixes

* New module postgresql_copy: fixes

* New module postgresql_copy: added upper, PostgreSQL

* New module postgresql_copy: fixed description

* New module postgresql_copy: added note about superuser

* New module postgresql_copy: remove SQLParseError

* New module postgresql_copy: fixed opt_need_quotes type

* New module postgresql_copy: fixed check_mode

* New module postgresql_copy: small fix
5 years ago
René Moser 0c66a5d3ca
cloudcscale_floating_ip: add types (#56924) 5 years ago
rajaspachipulusu17 6b2688245e Pluribus Networks ipv6security raguard port module with UT (#57033)
* Pluribus Networks ipv6security raguard port module with UT

* Dox fix
5 years ago
rajaspachipulusu17 b8a317c527 Pluribus Networks vrouter packet relay module with UT (#57155)
* Pluribus Networks vrouter packet relay module with UT

* Doc fix
5 years ago
Gonéri Le Bouder e460a219cd VMware: vmware_evc_mode: fix the functional tests (#56875)
* Updated vmware_evc_mode tests
* Remove extraneous line in main.yml

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein c54d79bc13
Extend docker_image tests. (#57090) 5 years ago
Abhijeet Kasurde c8eda7773e
VMware: Update vmware_guest_powerstate (#57000)
* Updated documentation
* Updated testcases
* Updated example
* Updated logic
* Provided option to specify task name, task description, task enable status etc.

Fixes: #56987

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein 7cd229aa97
Fix assignments in docker tests. (#57249) 5 years ago
Matt Martz 8bd4e2a144 cert validation fixes - Attempt 2 (#55953)
* Attempt 2 of cert validation fixes

* Remove unused code

* Cleanup the tmp cert using atexit

* Fix linting issues

* Only add SSLValidationHandler when not HAS_SSLCONTEXT

* Catch value errors on non PEM certs

* Only catch NotImplementedError to avoid masking issues

* set self._context even with PyOpenSSLContext for conformity

* Fix error building

* normalize how we interact with the context we create

* Remove unused code

* Address test for py3.7 message difference

* open_url should pass the ca_path through

* Account for new error in url lookup test

* Guard some code behind whether or not we are validating certs

* Make _make_context public

* Move atexit.register up to where the tmp file is created
5 years ago
Sviatoslav Sydorenko 4c7fff315e
Fix module_utils.common.test_collections testsuite
PR #57181
5 years ago
Rohit ae033f1ec3
vyos interfacefix and test cases (#57169)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
5 years ago
Sebastiaan Mannem 223f509ea3 Issue 56430 (#57147)
* Adding integration test for 127.0.0.1/32 and ::1/128.

* Making sure file is not corrupted when render fails

* Fixes #56430

* Adding changelog for MR 57147/Issue 56430
5 years ago
Andrey Klychkov bf25889bfd test_postgres: fix typos 5 years ago
Andrey Klychkov 01ed7a489a Add unit tests for lib/ansible/module_utils/common/text/converters.py (#56915)
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
5 years ago
Will Thames ac1895453f Add test case for k8s cascading deletes (#55987)
* Add test case for non-cascading deletes

Deleting a DaemonSet does not delete associated pods,
even though it should

* Add coverage module when using pip

Otherwise tests seemingly fail
5 years ago
Kevin Breit 5008e1d479 meraki_config_template - Enable check mode (#54502)
* Add support for check mode

* Check mode returns proper changed status
- Added is_template_valid()
- Restructured check_mode so it will always return data
- Check mode should show proper changed status
- Code is untested and integration tests need to be expanded

* Fix deleting networks
- Add integration tests for deleting networks
- Refine tests based on changed/unchanged

* Remove one task from integration test
5 years ago
Kevin Breit 4df53f869e meraki_network - Add support for disableRemoteStatusPage (#48971)
* Add support for disableRemoteStatusPage
- New feature in the Meraki API
- Yes, it's a double negative, I may fix at some point

* Remove double negative
- All disables became enable and logic is reversed
- This isn't yet tested

* Switching computers!!!

* Apply changes to make the logic work, even reversed

* Attempt to fix some formatting errors

* Add documentation fragment

* Fix whitespace

* Add disable_my_meraki back, with deprecation notice

* Edit changelog notice

* Update deprecation version

* Update example to be a block and change deprecation message.

* Remove duplicate delegate_to

* Change deprecation notice.
5 years ago
Felix Fontein c47e9d22b4
Rename one_image_facts -> one_image_info (#57035)
* Rename one_image_facts -> one_image_info.

* Add changelog.

* Forgot symlink.
5 years ago
Ian Wienand 39945b8570 Make query with errors='ignore' return a blank list (#57038)
The jinja2 query() function (or lookup with wantslist=True, which is
the same thing) should always return a list.

However, if you combine a query with errors='ignore' and take the
error path, the current code returns a None value.  This is important
in a case such as

 - name: Conditional include file
   import_tasks: '{{ item }}'
   vars:
     params:
       files:
         - path/file1.yaml
         - path/file2.yaml
   loop: "{{ q('first_found', params, errors='ignore') }}"

If neither file1.yaml or file2.yaml exist, this should do nothing by
returning an empty list to the loop.  Currently if you run the above
task you'll get a rather unhelpful:

 Invalid data passed to 'loop', it requires a list, got this instead: .

This change ensures that when a query ignores an error, it returns a
empty list.  The errors='ignore' case is tested in several variants
with first_found.  The extant (but deprecated) "skip: True" for
first_found doesn't seem to be explicitly tested; a test is added here
to avoid regressions before removal in 2.12.

This fixes a regression you'll hit if you follow the suggestion in the
deprecation message included with
e17a2b502d to use errors=ignore over
"skip: True" for first_found.  This change adds an example that points
out the query/lookup difference and also fixes the error message to
not mention the now deprecated "skip: True".

Closes #56775
5 years ago
Kevin Breit 7864df8cb9 meraki - Rewrite update requirement check (#48394)
* Rewrite idempotency check
- Check now operates recursively and works on multiple types
- Order of lists matter

* Remove blank line for lint

* Fixed idempotency checks in meraki_ssid
- New sanitize() method for finding keys unique in compared dicts
- Fixed bug in meraki_ssid where SSID specified by number breaks
  - This will require a backport
- Converted ignored_keys from tuple to list

* Made changes required for idempotency

* Add changelog fragment

* Add unidirectional option for testing

* Disable option 1 check

* General fixes for is_update_required testing
- Added commented out debug statements in method
- Fixed ignored_keys modifications

* Remove old commented algorithm
5 years ago
Daniel Mellado Area 0ada6b8d8d Fix junos_facts test (#57065)
This commit fixes a non-passing junos_facts integration test, as it was
using a non-ordered frozenset to assert its result.
5 years ago
Nathaniel Case 1b66a13186
Fix flow in eos_l2_interface (#57059)
* Also fix test debug labels
5 years ago
The Magician a837cc5694 Bug fixes for GCP modules (#55976) 5 years ago
The Magician 713ac29054 Bug fixes for GCP modules (#56689) 5 years ago
Paul Belanger 6f1ff8eb8e Add missing scp dependency for ios_file tests (#56956)
This was required to be installed by a human, out side of our testing.
Add it so ansible-test can now manage.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Paul Belanger 94e007ed77 ansible-test: use become for connection=local on ios_user (#56960)
ios_user requires escalated privledges, rather then doing this in the
inventory, we can just add it into the playbook tasks.

Also add missing provider settings for authorize.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Felix Fontein 61b48778a7
Rename _facts -> _info (#57028) 5 years ago
Felix Fontein d8dcd20294 docker_container: fix container creation with networks_cli_compatible=yes (#56687)
* Fix behavior.

* Add changelog.

* Add simple test to prevent #56620.
5 years ago
Andrey Klychkov baac1df935 New module mysql_info - Gather information about MySQL servers (#55434)
* New module mysql_info: collect info about MySQL server instance

* mysql_info - CI tests

* mysql_info: fixes

* mysql_info: fixes Decimal

* mysql_info: fixes Decimal converters.py

* mysql_info: fixed err conn message and check_mode

* mysql_info: added decimal.Decimal to lib/ansible/parsing/ajson.py

* mysql_info: convert Decimal to float

* mysql_info: fix

* mysql_info: fix

* mysql_info: returned the args list as it was

* mysql_info: fix typo

* mysql_info: fixes

* mysql_info: removed aliases for login_db

* mysql_info: changed RETURN condition info

* mysql_info: fixed doc

* mysql_info: fixed role's parsing

* mysql_info: fixed role's parsing

* mysql_info: fixes

* mysql_info: fixed integration tests
5 years ago
ShachafGoldstein f137527201 $result.reboot_required = $feature_result.RestartNeeded (#56419)
* $result.reboot_required = $feature_result.RestartNeeded

* Update relevent PSLint ignores

* CI Problem with pslint and ignore.txt
5 years ago
Paul Belanger 89b73cb535
ios_ntp: Switch interface to GigabitEthernet0/1 for tests (#56964)
* ios_ntp: Switch interface to GigabitEthernet0/1 for tests

Lets use an interface we know that exists for testing, in some cases
Loopback0 maybe not be configured.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>

* ios_ntp: properly register result variable for testing

This is currently broken, and tests don't work. Fix this by properly
registering the result variable.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Felix Fontein 7a0af34ba9
First batch _facts -> _info rename. (#56822) 5 years ago
Paul Belanger 4f8abde081 Fix syntax issue with ios_ntp tests (#56958)
This was missing a yaml anchor.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
rajaspachipulusu17 19a78bdc7b Pluribus Networks vrouter bgp module with unit test cases (#56434)
* Pluribus Networks vrouter bgp module with unit test cases
* Sanity fixes
5 years ago
Lukas Kämmerling 7f08de6b6c hcloud_volume attach step should be idempotent (#56906) 5 years ago
Paul Belanger d7f4f886f8 ansible-test: ios_command cli test should only be network_cli (#56955)
We do not support testing under ansible_connection=local

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
SirFerdek 6a50c6aae4 docker_network: Integration tests for IPAM config idempotence (#56975)
Integration tests for pull request #56901 which fixes found issues with idempotence.
5 years ago
Martin Krizek 484c023316
ansible-test: prefer shlex.quote (#56823) 5 years ago
Andrey Klychkov 86354ff1fb postgresql: remove depricated lib (#56641) 5 years ago
Wojciech Wypior fca2a4c68b adds ltm policy to bigip facts (#56926)
facts no longer return changed but queried status in results
5 years ago
Brian Coca 30210e7de0
added tests for log_plays (#56811)
* added tests for log_plays

* grep for warning

* Update tests to work with ansible-test.
5 years ago
Yury V. Zaytsev d88d71e4b1 route53_zone: return existing zone id in check mode (#56702)
* Returns zone ID for existing zone or `null`
* route53_zone: add module unit tests
* route53_zone: add compatibility with Python 2.6 to the unit tests
* route53_zone: address pycodestyle warning (add blank line)
5 years ago
Nathaniel Case 7834da41ff
Move eos l3 test IP addresses to documentation ranges (#56726) 5 years ago
Matt Martz 9c5b72147e
Validate types before asserting lengths (#56882) 5 years ago
Gonéri Le Bouder 6bb21c3db0 vmware: test-refactoring
- In order to keep the integration with `ansible-test`, we prefer to avoid any
  interaction with the Ansible inventory file.
- split up the prepare_vmware_tests/defaults/main.yml in two
  configuration files: one for vcsim and one for a real environment
- remove all the access to hostvars
- directly interact with the ESXi to mount/umount the datastore
  https://github.com/ansible/ansible/pull/56516
- record the virtual machine folder in the environment configuration
- vmware_guest_move: Use https://github.com/ansible/ansible/pull/55237
5 years ago
Gonéri Le Bouder 8cee127ee4 vmware_host_datastore: ability to target a ESXi
Until now, the module was only able to interact with vcenter. This
commit adds the ability to directly target an ESXi without the
`esxi_hostname` parameter.
5 years ago
Sam Doran 8f4f3750fe
Ensure uri module always returns status even on failure (#56240)
- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
5 years ago
Brian Coca 1da47bfa8c
Prevent vars premature templating (#56117)
Avoid premature vars templating
  * added tests
  * avoid 'is template' warning in vars, since we want them for latter templating
5 years ago
Abhijeet Kasurde 26d38dd642 VMware: Add folder param in vmware_datastore_cluster
* Make datacenter as alias and optional
* Add folder param to place datastore cluster in specific folder
* Updated examples
* Updated tests

Fixes: #48010

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Nathaniel Case cebb363fcc eos_l2_interface handle "Interface does not exist" (#56787)
* Quick and dirty attempt to handle eapi error

* Well this should probably change

* Hopefully this works correctly?

* Fix check_rc handling with httpapi

* Add tests that should hopefully cover the error

* Fix warnings

* Improve tests
5 years ago
Jordan Borean 124400f319 win_get_url: ignore defender false positive in tests (#56812) 5 years ago
tknipper11 54aa6f3921 ACI CDP Interface Policy Module Creation (#54818)
* initial commit

* Fix typo in integration test which caused an assertion to fail

* Updated integration testing

* Fix Ansible Sanity Errors

* Changed version added to 2.8 from 2.9

* added from __future__ import absolute_import, division, print_function
__metaclass__ = type
5 years ago
Yunge Zhu 831d3c7b62 add azure_rm_keyvault_info (#55497) 5 years ago
Brian Coca 69b2d7e0f3 fix collection adjacent loading with --playbook-dir (#56194)
* added inventory adjacent test
5 years ago
Dag Wieers 4f89c1d508
Revert "ACI: Implement encoded query_string" (#56783)
This reverts commit 1690af04fe.
5 years ago
Abhijeet Kasurde 459776eb82
VMware: Add folder option for vmware_dvswitch (#56707)
* Added folder param
* Mark datacenter as optional parameter
* Updated docs
* Updated tests

Fixes: #54986

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Will Thames 4065692e13 k8s minor bug fixes (#56168)
Ensure `wait_condition`s with `Status: Unknown` actually
complete

Return k8s object after wait rather than k8s object before
wait when object is patched.
5 years ago
Martin Krizek 77f997474a yum: use Custom Group in integration tests (#56439) 5 years ago
Jakob Ackermann 3b4b2e5021 [docker] support the lookup of images by digest (#56649)
* [docker] images: add support for lookup by sha256 digest

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

* [tests] docker image by digest: work on a minimal test case

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

* [docker] group branch conditions per lookup

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

* [misc] add a news fragment for the added digest lookup for docker images

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
5 years ago
Will Thames 8e1dd58c2b Allow python_requirements_facts to cope with packages with dashes (#56166)
* Allow python_requirements_facts to cope with packages with dashes

```
python_requirements_facts:
  dependencies:
    - kubernetes-validate
```

should work as expected

* Ensure tests run for python_requirements_facts
5 years ago
Matt Martz 493cf817a9 Don't rely on netloc for determining hostname and port, just use hostname and port (#56270)
* Add changelog fragment
* Fix IPv6 address parsing for py2.6, and add tests
* make sure hostname isn't None
5 years ago
The Magician b712b01f6e Bug fixes for GCP modules (#55973) 5 years ago
The Magician 8d82df56ff Bug fixes for GCP modules (#55974) 5 years ago
The Magician d4b29e7838 Bug fixes for GCP modules (#55975) 5 years ago
The Magician e598eeeebe Bug fixes for GCP modules (#55977) 5 years ago
Zim Kalinowski b37ae35ba0 azure_rm_azurefirewall (#56359)
* azure_rm_azurefirewall

* a few updates

* fixed mistake

* updated docs, fixed syntax

* updated priority

* use checkmode for idempotence test, as it's very long

* fix check mode
5 years ago
EvgenyF ea4842c0d3 Changing the license to Apache 2 5 years ago
Martin Krizek 34e9d6781b Templar: encapsulate _available_variables (#55435)
Ensure variables are reset between iterations
5 years ago
rajaspachipulusu17 8c29c78e22 Pluribus Networks vrouter loopback interface module with UT (#56450)
* Pluribus Networks vrouter loopback interface module with UT

* Sanity fixes
5 years ago
rajaspachipulusu17 7a615a9e0e Pluribus Network vrouter ospf module with unit tests (#56435)
* Pluribus Network vrouter ospf module with unit tests

* Sanity fix

* Doc fixes
5 years ago
Andrey Klychkov 386cef18ed module_utils.postgres: added unittests (#56381) 5 years ago
Andrey Klychkov f1b5836836 lib/ansible/parsing/ajson.py: added UNIT-tests (#56398) 5 years ago
Matt Clay 470371d009 Remove unused cloud config files.
These files have no associated cloud config plugin for ansible-test.
5 years ago
anasbadaha 5a7bce1f8d Adding New Model onyx_qos for Configuring QoS on Onyx Switches (#55127)
* Adding New Model onyx_qos for Configuring QoS on Onyx Switches

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

* Fix Pep8 Failures in onyx_qos

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

* Fix Pep8 Failures phase 2

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

* Fix Samer's Comments on onyx_qos Module

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

* Fix Shippable Comments Phase 3

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

* Fix Current Version 2.9

Signed-off-by: Anas Badaha <anasb@mellanox.com>
5 years ago
Matt Martz 576593e175
Whitelist listen as a valid keyword on TaskInclude (#56586)
* Whitelist listen as a valid keyword on TaskInclude. Fixes #56580

* Move 'listen' to HandlerTaskInclude

* Remove trailing newline
5 years ago
Nathaniel Case 63e33f7e71
Fix eos_l2_interface idempotency (#56531)
* Attempt to handle just mode trunk properly

* Add test for trunk-only config and clean up tests

* Add missing eapi tests and remove references to provider as we do not test local
5 years ago
Lukas Kämmerling 6c1a255d98 Fix hcloud tests 5 years ago
Martin Krizek c6b40f4d40
register: fail when invalid var name is specified (#56456) 5 years ago
Yuwei Zhou 6c1dbbe554 Fix the test syntax (#56557) 5 years ago
Kevin Breit 2a187f362a meraki - Unchanged requests now return the original data (#53576)
* Unchanged requests now return the original data

* Add changelog fragment

* Add integration tests for returned data for meraki_network

* Add integration tests for returned data

* Improve idempoetent output
- Make MX l3 rules always show default rule
- Add integration tests

* Add integration tests for returned data on meraki_network

* Improved idempotency in a few modules and improved tests
5 years ago
mjmayer c8e179fbf1 Aws waf region (#48953)
* Add waiter for AWSRegional

* Add support for WAF Regional

* Add support for regional waf web acl

* Remove set_trace, pep formatting

* Add paginator for regional_waf

* Change name of param for waf_regional

This is more in line with how AWS refers to the service. Additional
 changes made to how client is called. Used ternary to reduce if
 statements

* Change parameter name to waf_regional

* Add support for removal waf regional condition

* Change parameter from cloudfront to waf_regional

* Added state: absent waf rule

* Remove set_trace

* Add integration tests for waf regional

* WIP: adding region parameter to tests

* Add support for waf facts module

* Add region to waf regional integration tests

* Update security policy for waf regional testing

* Add type to documentation for waf_regional param
5 years ago
Gonéri Le Bouder 32620b7e00 vsphere_copy: fix the E309 error (#56537)
Resolve the two following errors:

ERROR: lib/ansible/modules/cloud/vmware/vsphere_copy.py:0:0: E309 version_added for new option (host) should be '2.9'. Currently None
ERROR: lib/ansible/modules/cloud/vmware/vsphere_copy.py:0:0: E309 version_added for new option (login) should be '2.9'. Currently None
5 years ago
Pilou 98246f6032 consul modules: update documentation (#56408)
* consul modules: Python 2.6 is always required on managed node, document all types, improve parameter descriptions, fix typos
* consul_kv: add doc for retrieve parameter
5 years ago
s-hamann 730456b402 Add seed parameter to random_mac filter (#51841) 5 years ago
Matt Clay a910d19533 Temporary fix for vsphere_copy CI failure. 5 years ago
Kevin Breit d59eb9edab meraki_switchport - Improve reliability (#54275)
* Rewrite much of the execution of meraki_switchport
- Previous versions had problems with idempotency and allowed_vlans

* Modified payload creation
- Parameter map is used
- propsed is created using .copy()
- Much cleaner this way

* Add whitespace for lint

* Add bugfix snippet for changelog
5 years ago
Matt Martz 4b0014166b Bump erlang ping to 1:20.3.8.18-1 5 years ago