Commit graph

9690 commits

Author SHA1 Message Date
Rohit
2f996fc6e2
vyos_config bug fix #66110 (#66122)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-01-03 17:35:37 +05:30
Matthew Davis
5493ea590c make concurrent aws_acm integration tests not clash (#64660)
* add uuid for aws_acm test resources, allow concurrent tests

* remove debug task in aws_acm int test
2020-01-02 17:06:56 -07:00
Hannes Ljungberg
f31b8e08b2 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-01-02 09:23:36 -05:00
Andrew Klychkov
fc2d7ae63e mysql_db: fix doc formatting (#66087) 2019-12-30 10:36:00 +05:30
Felix Fontein
17ef253ad1
docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

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

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

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.
2019-12-29 23:16:17 +01:00
Mike Wiebe
c2fed8603c Fix nxos_user roles bug (#65962) 2019-12-27 15:51:17 +05:30
Rohit
52f3ce8a80
allowing banner without stripping spaces (#62573)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-12-27 12:43:09 +05:30
Abhijeet Kasurde
4d1a57453e
homebrew_cask: Update documentation and examples (#66073)
* properly document ``upgrade`` option as an alias to ``upgrade_all``, and not a separate option
* Update documentation.
* Update examples.

Fixes: #34696

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-27 10:08:18 +05:30
Abhay Kadam
2fa8f9cfd8 Fix env lookup plugin error on utf8 values (#65541)
This commit fixes issue #65297.

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

* Added integration tests for lambda_info module

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

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2019-12-21 20:29:05 -05:00
Mads Jensen
a0e6bf366e Use context manager for file handling in misc files. (#65372)
The file handles are left open in those files.
2019-12-21 13:01:38 +01:00
Pilou
7ee3103a86 clc_aa_policy: deprecate unused 'wait' parameter (#64367) 2019-12-20 23:46:53 -05:00
Matt Clay
342b9953bc Disable failing azure_rm_storageaccount test. 2019-12-20 16:11:21 -08:00
Matt Clay
9ea5b539b6 Add ansible-test constraint to avoid coverage 5.0+ 2019-12-20 11:55:54 -08:00
Toshio Kuratomi
2b6d94c4c8 Change the check_pyyaml() function to return the features of pyyaml that we check 2019-12-20 10:29:03 -08:00
Toshio Kuratomi
ece306b201 Add a sanity test for yaml to make sure we can parse all yaml
Check that all yaml we ship is parsable by the pyyaml c backend.  Since
Ansible uses Pyyaml for docs and playbooks, if the yaml files aren't
parsable, they will error out if they were used.

Warn and skip yamllint if libyaml backend is not present

Ignore new errors in examples until someone can fix them
2019-12-20 10:29:03 -08:00
Sam Doran
18130e1419
user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
2019-12-20 13:09:22 -05:00
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
2019-12-19 16:30:44 -07:00
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>
2019-12-19 15:06:16 -07:00
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
2019-12-19 14:50:44 -05:00
Mario Lenz
fec883dfff VMware: Add advanced settings to vmware_cluster_ha 2019-12-19 14:19:45 -05:00
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
2019-12-19 14:10:51 -05:00
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.
2019-12-19 13:52:51 -05:00
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.
2019-12-19 11:41:41 -07:00
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
2019-12-19 10:45:22 -07:00
Justin Ossevoort
14ebceec25 Fix 'Assert CNAME failure' assertion (#65875) 2019-12-19 12:12:38 -05:00
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
2019-12-19 12:07:25 -05:00
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.
2019-12-19 11:30:00 -05:00
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.
2019-12-19 11:30:00 -05:00
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>
2019-12-19 18:01:22 +05:30
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
2019-12-18 15:53:57 -05:00
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
2019-12-18 13:18:23 -07:00
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
2019-12-18 12:08:22 -07:00
Nilashish Chakraborty
ae0df67539
Add debug (#65909)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-12-19 00:36:32 +05:30
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>
2019-12-18 13:32:56 -05:00
Prasad Katti
b8729b2544 cloudformation integration tests (#65643) 2019-12-17 15:27:52 -07:00
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>
2019-12-17 14:10:52 -05:00
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
2019-12-17 14:01:03 +05:30
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
2019-12-17 12:12:55 +05:30
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.
2019-12-17 11:51:29 +05:30
Sara-Touqan
d0d8fca334 Supporting SNMP Users Configurations in Ansible (#63778) 2019-12-17 11:50:58 +05:30
Sara-Touqan
fe354ed183 Supporting general ntp configurations in Ansible (#63724)
* Supporting general ntp configurations in Ansible

* Modifying ntp module
2019-12-17 11:50:32 +05:30
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>
2019-12-17 11:49:56 +05:30
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
2019-12-17 11:24:33 +05:30
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
2019-12-17 12:43:03 +10:00
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
2019-12-17 09:06:54 +10:00
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
2019-12-16 11:28:24 -05:00
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
2019-12-16 19:15:41 +05:30
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>
2019-12-16 08:24:38 -05:00