Commit Graph

9672 Commits (fc31b4e50672e6e6a09f68699afe24956a74aa43)

Author SHA1 Message Date
Mark Chappell 50eb4eec90 fix ec2_vpc_net test instability (#65184)
* Move ec2_vpc_net tests to group1, group2 is running much longer

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

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

elb_target_group.py: allow UDP, TLS, TCP_UDP proto

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

others:
- Added changelog fragments
- Integration test

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

* trim line length a bit

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

* rename changelog

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

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

* Add support for lifecycle policies to ecs_ecr

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

Fixes #32003

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

* Improve error message for ecs_ecr parsing errors

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

* Rename delete policy to purge policy

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

* Add version_added to purge_policy

* Remove changing results based on verbosity

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

* Ensure repository name is lowercase

* Fix deprecation cycle to 4 releases

* Use a YAML anchor for credentials

* Remove filters from assertions

* Add minimal permissions needed

* Updating version_added and deprecation cycle

The original PR sat while a few releases happened.

* Bumping version added and deprecation version

We missed the 2.8 release.

* Removing bare except:

This is not allowed and is generally bad practice.

* Fix lint errors

* update ansible release metadata

* Use the new alias deprecation scheme

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

* Add test coverage

This makes sure that lifecycle_policy is produced when passed in.

*Also a minor suggestion for simplification from PR.

* Restore changes from 62871 lost in rebase

* Add changelog

* Remove version_added for new purge_policy option

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

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

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

* duplicate cloudformation_info tasks with checkmode

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

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

Fixes: #51857

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

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

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

* Start running the tests within shippable

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

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

* Add a warning about running in parallel

* Minor review tweaks

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

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

* cloudformation_info updates

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

* Adding integration tests

* Remove unneeded debug statement

* Add myself to Authors

* rename stack-name to match iam policy limits

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

* removing .orig file from rebase

* fix stack name, underscore not allowed

* rename integration testsuite to cloudformation

rename per request

* add resource_prefix to resource names

* prefix stack name with ansible-test

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

* add single quotes around variable in test

* fix test for display name

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

* fix value to display name test

* rename main.yaml to main.yml before rebase

* Merge tests with  #65643

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

* fix assert on chageset check

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

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

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
anas-shami ec0885cf05 Onyx username (#63897)
* Support username command to config users and edit capabilities

* Add disconnected param to disconnect all session for such user

* Edit yaml examples, add types to docs and edit the version

* Add fullname attribute

* Add no_log to password field and mutually_execlusive relations

* Fix pep8 issue

* remove debug line
5 years ago
anas-shami 557c8ab161 support syslog remote module (#63195)
* support syslog remote module

* change enabled implementation and edit the tests, also support disable override class

* fix the level order and delete types from choices
5 years ago
Sara-Touqan 84572c3b67 Supporting ntp servers and ntp peers configuration in Ansible. (#63714)
* Supporting ntp servers and ntp peers configuration in Ansible.

* Modifing ntp servers and peers config.

* Modifying ntp peers and servers configuration.
5 years ago
Sara-Touqan d0d8fca334 Supporting SNMP Users Configurations in Ansible (#63778) 5 years ago
Sara-Touqan fe354ed183 Supporting general ntp configurations in Ansible (#63724)
* Supporting general ntp configurations in Ansible

* Modifying ntp module
5 years ago
Sara-Touqan 13d0ebd603 Supporting general snmp configurations in Ansible (#63723)
* Supporting general snmp configurations in Ansible

* Modifying SNMP General configurations.

* Fix pycodestyle issues

Signed-off-by: Sara Touqan <sarato@mellanox.com>

* Fix documentation errors

Signed-off-by: Sara Touqan <sarato@mellanox.com>
5 years ago
anas-shami 33338decf7 Feature/onyx syslog files (#62746)
* support syslog files

* nested doc fix

* required togother

* fix docs type dict

* add file-debug feature same as files logging

* remove duplicated validation and change dict key access method

* add format of upload url and change the way of getting data from dict
5 years ago
Micah Hunsberger a54e77193b New Windows Module: win_certificate_info (#64035)
* win_cert_stat initial commit with tests

* documentation fix.
first attempt windows server 2008 compatibility

* add formatted dates
removed debug tests

* make choices generic list

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

* fixed tests file

* fix timestamps returning null

* rename to win_certificate_info

* rename tests win_certificate_info

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

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

* Also add architecture symbols during compile time

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

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

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

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

* Add changelog
* Add integration test
* Update comment with expected sort order
5 years ago
Ganesh Nalawade 74e9b1e219
Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

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

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test
5 years ago
Paul Belanger 093d1500b9
Clean up flake8 for ansible.netcommon collection (#65842)
We noticed the following flake8 errors when we ran the migration script
for ansible.netcommon.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Suhas Bharadwaj 0a04a5efc2 adding the modules to /nxos/storage/ folder (#64269)
* adding the modules to /nxos/storage/ folder

* fix pep8 stuff

* fixed provider specific information from doc

* Fix integration tests

* Added tested against note

* Review comments

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

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

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

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

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

* Try to kindly convert interface port to the string

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

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
5 years ago
Paul Belanger 5046413b6d
Fix flake8 errors for iosxr tests (#65860)
These were noticed when we migrated to the cisco.iosxr collection.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Ola Nyström 8165ce6144 add prefix-list to ios_bgp af-mode (#62705)
* adding prefix-list to ios_bgp

* adding prefix-list to ios_bgp

* Fix copy-paste bug in test

* Adding neigbor 10.10.20.20 to global neighbor pool

* Added prefix_list_in and _out to documentation

* Rewrite bgp prefix_list test

* Bugfix in yaml data

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

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

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

remove older reference to credentials

* uncomment shell commands to enable/disable account settings

* Fix documentation and pep8 issues

* fix review items for ecs_task tags

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

* Add import for missing_required_lib function

* Tidy put-account-setting tasks and add permission

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

* update version added for ecs_task tags

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

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

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix
5 years ago
Paul Belanger ea164fdde7
Clean up flake8 errors on ios unit tests (#65782)
This was caught during our collection migration process.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Tad Merchant 493ec588ab Ec2 metric alarm boto3 and treat missing data (#62669)
* Converted ec2_metric_alarm to boto3. Added treat_missing_data option.

* Handle potentially non-existent alarm keys in ec2_metric_alarm module

* Add treat missing data to ec2_metric_alarms wth some tests

Continues the work of #23407

* Clean up ec2_metric_alarm main test playbook

* fix test suite and sanity checks

* more fixes for sanity tests

* fixes to ec2_metric_alarms requested in code review

* import ClientError from botocore, catch generic ClientError

* more fixes from review

drops extra dict in argument spec and set_facts for aws access

* Fix pep8 blank line issue

* switch to fail_json_aws, add idempotency test

* fix under indented continuation

* remove unsupported alias

* Add group to ec2_metric_alarm aliases

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

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

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

* add changelog

* mysql_info: add return_empty_dbs parameter

* fix
5 years ago
Paul Belanger 80333f9c4b
Clean up flake8 errors for eos unit tests (#65753)
These were found while migrating our content to eos collections.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Abhijeet Kasurde 41e19a4058
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides
non-existing limit file.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Sebastian Wagner a0cf42ae32 removed unnecessary ipv* address-family statements from vrf if the ip version is not used (#53866) 5 years ago