Commit graph

2872 commits

Author SHA1 Message Date
Nathaniel Case
a197125954
Nxos restore provider to nxapi tests (#41818)
* Quick and dirty sed to add provider

* Manually verify the rest of the cases

* Add missing provider
2018-07-02 09:43:51 -04:00
Ganesh Nalawade
1659951710
Fix eos integration test failure (#42188)
* Fix error message in eos_config integration test
* Fix set_become invoke login in httpapi connection plugin
2018-07-02 18:49:45 +05:30
Kevin Breit
380d08af5d Fix integration tests (#42088)
- Integration test assertions had some invalid variables
2018-07-02 10:47:57 +02:00
Sam Doran
fb55038d75 Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change
2018-06-29 17:15:43 -07:00
David Soper
5f5fbffe8a UCS Server UUID pool modules and integration tests (#41743)
* UCS Server UUID pool modules and integration tests

* change version added to 2.7

* Doc and result changed updates from review.
2018-06-29 15:49:47 +02:00
David Soper
f8f22f77ed Fix issue with vNIC redundancy templates (#36608)
* Fix bug with redundancy templates and add integration tests for redundancy templates.

* vlan_list absent state support and fix for vlans as strings in vlan_list
2018-06-29 15:48:48 +02:00
John McDonough
bf932a852b Module for UCSM Manager Timezone Management (#36974)
* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Addressed PR comments and added integration tests

* fixed mismatched default value between doc and argument_spec

* changed main() to call run_module()

* Change version to 2.7

* updated integration aliases indicating unsupported testing

* updates to DOCUMENTATION
2018-06-29 15:43:52 +02:00
saichint
bd9b8b422d fix nxos_gir issues (#41809)
* fix nxos_gir issues

* review comments
2018-06-28 10:11:45 +05:30
Eitan Akman
fb7882bf86 Issue #39860: Add 'not_contains' method to parsing.py (#39874)
* Issue #39860: Add 'not_contains' method to parsing.py

* Issue #30860 Adds self.negate to Conditional class in lib/ansible/module_utils/network/common/parsing.py

* Issue #39860 Fix singleton-comparison issue per sanity tests

* Issue #39860 'test/integration/targets/nxos_command/tests/cli/not_comparison_operator.yaml' integration test

* Issue #39860 Add unit tests to '../../test/units/module_utils/network/common/test_parsing.py'

* Issue #39860 Fix singleton comparison issue

* Fix E302 expected 2 blank lines, found 1

* Issue #39860 Add license header to unit tests

* Issue #39860 Move integration test to 'test/integration/targets/nxos_command/tests/common/'; remove unnecessary comment from unit test

* Issue #39860 remove unnecessary comment from unit test
2018-06-27 10:21:17 +05:30
Andrew Saraceni
bcb49f2575 Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)
* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs
2018-06-27 10:54:27 +10:00
Jordan Borean
cc97e89620
Revert "win_security_policy: allow removing values (resolves #40869) (#41125)" (#41986)
This reverts commit f2bd6b6bfd.
2018-06-27 09:37:37 +10:00
jamessemai
f2bd6b6bfd win_security_policy: allow removing values (resolves #40869) (#41125)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison
2018-06-27 09:13:31 +10:00
Matt Martz
1401fa74cc
Cache items when task.loop/with_items is evaluated to set delegate_to vars (#41969)
* If we evaluate task.loop/with_items when calculating delegate_to vars, cache the items. Fixes #28231

* Add comments about caching loop items

* Add test for delegate_to+loop+random

* Be more careful about where we update task.loop
2018-06-26 15:10:04 -05:00
Troy Murray
15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
2018-06-26 14:09:23 -04:00
Kevin Breit
7ab3f755ce Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly
2018-06-26 12:14:01 +02:00
Pierre-Louis Bonicoli
358c759bd9 test: manual tower projects don't require creds 2018-06-26 11:24:34 +02:00
Jordan Borean
2af36412f9
runas + async - get working on older hosts (#41772)
* runas + async - get working on older hosts

* fixed up sanity issues

* Moved first task to end of test for CI race issues

* Minor change to async test to be more stable, change to runas become to not touch the disk

* moved async test back to normal spot
2018-06-26 14:40:49 +10:00
Sam Doran
4b5b4a760c
Account for empty string regexp in lineinfile (#41451)
* Use context managers for interacting with files

* Account for empty string as regexp

Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line.

* Store line parameter in a variable

* Add tests
2018-06-25 17:57:05 -04:00
Sam Doran
eaae1318f8
Skip if insertbefore BOF until later (#41767)
If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.
2018-06-25 16:24:41 -04:00
Martin Krizek
a8d4bf8642
Fix rabbitmq_* integration tests (#41836) 2018-06-25 21:29:45 +02:00
Jordan Borean
2e46688bca
win_chocolatey: always return the rc return value (#41883) 2018-06-25 08:23:31 +10:00
David Passante
f30e0b833d cloudstack: new module cs_disk_offering (#41795) 2018-06-23 01:15:26 +02:00
Sijis Aviles
ba3db90e3a Fix: wildcard excludes in unarchive with tar archives (#40935)
* fix: exclude using wildcards for tar archives

Fixes #37842, #22947

* fix: Remove quote() as it munges the exclude format

* test: Refactor to use single archive structure

A common structure archived by different methods should simplify some of
the feature tests.

* test: Use common archive layout to validate exclude feature

* test: Use the same exclude checks for zip/tar archives
2018-06-22 08:28:14 -07:00
Olivier Bourdon
06b73ff8f1 Add random_mac string filter (#39775)
Add new filter to generate random MAC addresses from
string prefix. See docs/docsite/rst/user_guide/playbooks_filters.rst
for more detailed infos.
2018-06-21 15:56:54 -05:00
Matt Clay
5880404151 Disable remaining failing rabbitmq_* tests. 2018-06-21 13:50:36 -07:00
Matt Clay
00ab12dca2 Disable failing rabbitmq_plugin test. 2018-06-21 12:52:06 -07:00
Loïc
b61b113fb9 new provider: ownca (#35840) 2018-06-21 12:41:00 +05:30
Sloane Hertel
c4a6bce69f ecs_service: make assign_public_ip option a boolean (#41759) 2018-06-21 12:17:01 +10:00
Deepak Agrawal
e91cee1a31
net_put module: add default mode to copy binary files (#41476)
* add default mode to copy binary files

* sanity fix

* add version for new options
2018-06-20 16:02:49 +05:30
Kevin Breit
543a7469b7 New module - meraki_switchport (#41634)
* Initial commit for meraki_switchport module
- Query or modify swichport configurations
- Further optimizations are available
- Integration tests will require manual editing of file for others

* Remove blank lines
2018-06-20 09:48:30 +02:00
Kevin Breit
b8c39a0875 New module - meraki_config_template (#41633)
* Implement configuration template management
- Queries or removes templates
- Can bind or unbind templates to networks
- Module is idempotent only for binding and unbinding
- Meraki does not allow template creation via API
- Integration test is tedious b/c previous bullet point
- Fixed bug in construct_path() so it won't set self.function

* PEP8 changes

* Re-enable some integration tests, use variables, and fix broken code
2018-06-20 09:47:31 +02:00
Kevin Breit
618c3c508f New module - meraki_vlan (#41632)
* Initial commit of meraki_vlan module
- Create, delete, modify, and query VLANs within a network
- Support for all allowed objects in the VLAN data structure
- Meraki defaults networks to have VLANs disabled and there is no
way to use the API to enable VLAN support. It must be enabled
manually.

* Fix formatting error in documentation

* Formatting changes and added documentation

* PEP8 fix
2018-06-20 09:46:15 +02:00
Kevin Breit
7c888b86ba New module - meraki_device (#41631)
* Initial commit for meraki_device module
- Allow claiming, removal, updating, and querying of devices
- Integration tests are included
- Integration tests are not complete because physical gear is required
- Integration tests also require Meraki subscriptions

* Added support for serial number query without network

* Added support for net_id and net_name

* Changes recommended by ansible-test for PEP8 and documentation

* Remove duplicate state in example

* Fix typo
2018-06-20 09:44:50 +02:00
Kevin Breit
564fe87b29 Improve support for org_id in module (#41519)
- Faster performance since it reduces number of API calls
- Also simplified some of the execution
2018-06-20 09:41:53 +02:00
Kevin Breit
cccaf951fa Improved support for parameter testing and checks for org_id (#41517) 2018-06-20 09:40:10 +02:00
Kevin Breit
4a0b8f5123 Added support for passing org_id instead of org_name (#41518)
- Faster execution if passed instead of org_name
- Updated documentation
- Added additional integration tests
2018-06-20 09:39:25 +02:00
Matt Clay
dce708e63e Temporarily disable gem test on osx.
Disabled due to lack of newer TLS version support on the test system.
2018-06-19 16:58:12 -07:00
Sloane Hertel
1268ce4d4f [ecs_service] fix assign_public_ip network configuration to module parameter rather than fixed string (#41689)
Fix parameter name

Use suboptions

document suboptions

Add a test to assert assign_public_ip is configurable
2018-06-19 14:35:53 -04:00
Nilashish Chakraborty
837c216587
Fix vyos_vlan aggregate issue & added tests (#41638)
* Fix vyos_vlan aggregate issue & Added tests

* Fix #2 for vyos_vlan aggregate issue
2018-06-19 18:50:28 +05:30
Deepakkothandan
5a72eef0a3 [ecs_service] fix assign_public ip for network configuration (#41685)
* fix assign_public ip for ecs_service

* used module.botocore_at_least instead of distutils
2018-06-19 08:46:40 -04:00
Andreas Calminder
75e9b76c15 accept + and - modifiers for file attributes (#40061)
* accept + and - modifiers for file attributes
* tests for adding/removing file attributes
2018-06-14 06:31:14 -07:00
Trishna Guha
8ab0d654f3
don't retrieve config in running_config when config is provided for diff (#41400)
* don't retrieve config in running_config when config is provided for diff

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix for eos, nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-06-14 18:02:19 +05:30
saichint
79dd206b3e fix reload smu issue (#41270)
* fix reload smu issue

* review comments
2018-06-14 09:17:33 +05:30
Zim Kalinowski
5b0bb91c72 reappied changes in a new pr (#41228) 2018-06-13 15:42:29 +08:00
Matt Clay
d6ba139713 Disable failing acme_account integration test. 2018-06-12 18:06:47 -07:00
Toshio Kuratomi
a5fd86cf6d Tasks that are expected to fail need to begin with a special string 2018-06-12 16:31:10 -07:00
Brian Coca
336b3762b2 no_log even when task_result doesn't provide key
- now also checks task property
 - added reproducer to tests for unreachable status on item loop
2018-06-12 10:25:30 -07:00
Matt Martz
ad0827e5c0
When using ANSIBLE_JINJA2_NATIVE bypass our None filtering in _finalze (#41408)
* When using ANSIBLE_JINJA2_NATIVE bypass our None filtering in _finalize. Fixes #41392

* Add tests for _finalize bypass

* Address python3 failures in tests
2018-06-12 08:46:23 -05:00
Zim Kalinowski
e9214725fb more integration test improvements (#41184) 2018-06-12 10:52:07 +08:00
Pilou
5d7afe9d95 Default squash actions add pip (#41390)
* pip tests: remove trailing spaces

* pip tests: use Jinja tests

* fixup! pip tests: remove trailing spaces

* pip tests: use 'command' instead of 'shell' module

* pip tests: remove unused variable

* pip tests: use a package with fewer dependencies

sampleproject has one dependency: 'peppercorn' and peppercorn doesn't
have any dependency.

* pip tests: check that 'name' param handles list

* pip: squash package parameters

Note that squashing will be removed in 2.11, new code should directly
use a list with the 'name' parameter.
2018-06-11 19:58:13 -04:00
Shinichi TAMURA
bcd6b5c6f8 BSDTimezone: distinguish UTC and Etc/UTC (#41234)
* Fixed BSDTimezone to distinguish UTC and Etc/UTC

* Added test for timezone to disinguish UTC vs Etc/UTC
2018-06-11 10:27:50 -04:00
Abhijeet Kasurde
c021fd8e84 VMware: Allow user to select disk_mode (#38951)
* VMware: Allow user to select disk_mode

This fix allows user to select disk modes for given disk configuration
in the given VM.

Fixes: #37749

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

* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-10 22:37:30 -04:00
Matt Martz
76867730bf
Don't ignore a duplicate host for an already processed include (#40361)
* Don't ignore a duplicate host for an already processed include, assume that the repetition indicates a new include. Fixes #40317

* Add intg tests to ensure duplicate items in loop are not deduped

* Add note about relative indexing
2018-06-08 15:36:22 -05:00
Thierry BOUVET
8b9fe42c72 Add new module to create/update a docker swarm. (#38280)
* Add new module to create/update a docker swarm.

* Fix ansible-test sanity

* Fix requirements

* Fix requirements

* Add tag for author

* Test integration test.

* Fix main.yml

* Add linux arch

* Add template

* Fix test result

* Integration test to create/remove a swarm manager

* fix join test

* Downgrade docker-py

* fix rhel

* Fix review documentation.

* Fix whitespace

* Check docker installation.

* test docker install

* check

* Remove docker socket

* Fix docker install

* Fix sanity test

* Rebase

* Add docker_swarm maintainer

* Fix review

* Fix new version.

* Add docker default values

* Fix description.

* Reworked documentation

* Fix YAML error

* Rebase

* Fix example for update state.

* Fix idempotent states. Fix states: present/absent.

* Fix sanity

* Fix variables sanity

* Update example for absent state.

* fix sanity

* Wrap the contents of error message in to_native.


Co-authored by: Dag Wieers <dag@wieers.com>
2018-06-08 10:45:09 -04:00
Ganesh Nalawade
1ce484831b
Fix junos_config integration test (#41304)
*  Change the ip address in fixture files
   as per PR #40554
2018-06-08 13:16:47 +05:30
Sloane Hertel
89cea78e30 Fix async for aws_s3 - fixes #40281 (#40826)
* Fix async for aws_s3

* Add a test that async is able to be used on aws_s3 tasks
2018-06-07 15:09:22 -04:00
Will Thames
46886f8249 Improve aws_s3 permission handling for non S3 (#38574)
* Test case for missing permissions

* Update aws_s3 module to latest standards

* Use AnsibleAWSModule
* Handle BotoCoreErrors properly
* Test for BotoCoreErrors
* Check for XNotImplemented exceptions (#38569)

* Don't prematurely fail if user does not have s3:GetObject permission

* Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
2018-06-07 13:13:10 -04:00
Matt Martz
c403f01971
Revert #39365, improve error messaging (#41208)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path
2018-06-07 09:00:50 -05:00
Will Thames
b235cb8734 aws_eks_cluster: New module for managing AWS EKS (#41183)
* aws_eks: New module for managing AWS EKS

aws_eks module is used for creating and removing EKS clusters.

Includes full test suite and updates to IAM policies to enable it.

* Clean up all security groups

* appease shippable

* Rename aws_eks module to aws_eks_cluster
2018-06-07 08:44:04 -04:00
Deepak Agrawal
12be102758
DCI failures (#41241) 2018-06-07 15:55:03 +05:30
Trishna Guha
34e4071eca
increase timeout for connection reset by peer issue with httpapi (#41224)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-06-07 12:46:51 +05:30
Zim Kalinowski
bc690df11e using lighter resource (#41223) 2018-06-07 14:11:00 +08:00
Kevin Breit
2be2a572d6 Meraki utility now loads() JSON (#40856)
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-

* PEP8 changes

* Remove debug line for push
2018-06-06 18:24:14 +02:00
Deric Crago
ba848e018c bump version of 'vcenter-test-container' to '1.3.0' (govmomi v0.18.0) (#41151)
* leave vmware_guest_powerstate tests enabled, but revert changes from: 66743f33
* leave VM poweroff tests enabled, but revert changes from: 87d6bdaf
* bumped 'vcenter-test-container' version to '1.3.0'
* updated test task names based on PR feedback
2018-06-06 08:24:21 -07:00
Will Thames
f61164406e [aws] Support custom KMS keys in aws_s3 module (#35761)
* Allow the use of 'aws:kms' as an encryption method
* Allow the use of a non standard KMS key
* Deduce whether AWS Signature Version 4 is required rather than specifying with a parameter
2018-06-06 11:22:52 -04:00
Will Thames
a60fe1946c Remove ECS policies from AWS compute policy
The compute policy was exceeding maximum size and contained
policies that already exist in ecs-policy.

Look up suitable AMIs rather than hardcode

We don't want to maintain multiple image IDs for multiple regions
so use ec2_ami_facts to set a suitable image ID

Improve exception handling
2018-06-06 20:51:50 +10:00
Michael Mayer
fbcd6f8a65 Add Fargate support for ECS modules
Fargate instances do not require memory and cpu descriptors. EC2 instances
 do require descriptions. https://botocore.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_task_definition

Fargate requires that cpu and memory be defined at task definition level.
EC2 launch requires them to be defined at the container level.

Fargate requires the use of awsvpc for the networking_mode. Also updated,
the documentation regarding where and when memory/cpu needs to the assigned.

The task_definition variable for the awspvc configuration colided with
the ecs_service for the bridge network. This would cause the test to fail.

Add testing for fargate

Add examples for fargate and ec2
2018-06-06 20:51:50 +10:00
David Moreau Simard
828e33f419 Do not consider an empty version string as a version (#41044)
When using an empty string as the version argument, the module would
before attempt to run something akin to:

    pip install module==""

This changes the behavior to:

    pip install module

Fixes #41043
2018-06-06 09:52:43 +02:00
saichint
9abc3dbec4 nxos_rpm module (#40849)
* Add nxos_rpm feature

* fix timing issues

* fix timing issues

* shippable fix

* review comment

* review comments fixes

* typo fix
2018-06-06 10:09:38 +05:30
Nathaniel Case
02135d5278
Nxos test reorganize (#41089)
* Remove local from most cli tests

* Readd local tests to nxapi until httpapi passes
2018-06-05 07:37:24 -04:00
Andrew J Huffman
fb61680ccd Updating tower_job_template.py (#38821)
* Updating tower_job_template.py

* tower_job_template: Update parameter version_added to 2.7

* Ensure that unset credentials aren't passed

Passing empty strings for unset credentials causes ValueErrors as
the API expects an integer. Don't pass unset credentials
2018-06-05 15:33:51 +10:00
Adrien Fleury
fc2c8a4ec8 Module: Tower inventory source module (#37110)
* tower_inventory_source: Add support for the inventory source via ansible-tower-cli.

* Add test coverage for tower_inventory_source.

* Update version_added to 2.7
2018-06-05 15:32:54 +10:00
saichint
6733bffd5d fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change
2018-06-05 10:56:32 +05:30
Deepak Agrawal
2db6a8c26a
iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)
* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import
2018-06-05 07:56:53 +05:30
Nathaniel Case
92a95368fe
Fixes to ios_logging (#41029)
* Logging size may not show up in config

* This is much simpler

* Avoid repetition in tests

* Both options of buffered are optional
2018-06-04 07:32:23 -04:00
Abhijeet Kasurde
4d200fb5ac
Use msg instead of var (#40810)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-04 12:46:23 +05:30
Zhikang Zhang
b578bf9e20 Fix test-module failing to validate args (#41004)
* Fix test-module failing to validate args

The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.

* Add a integration test for test-module.

Prior to this change, we don't have a test for test-module.

This change ensure the correctness of test-module script.
2018-06-01 12:02:56 -07:00
Matt Martz
da4ff18406
Support 'apply' to apply attributes to included tasks - Impl 1 (#39236)
* Support 'apply' to apply attributes to included tasks

* Cannot validate args for task_include

* Only allow apply on include_

* Re-enable arg validation, but only for include_tasks and import_tasks

* s/task/ir/

* Add tests for include_ apply

* Include context with AnsibleParserError

* Add docs for apply

* version_added

* Add free-form documentation back

* Add example of free-form with apply
2018-05-31 12:08:38 -05:00
Matt Martz
961484e00d
Add src parameter for uri module that can be used in place of body. Supports binary files (#33689)
* First pass at a src parameter that can be used in place of body. Supports binary files

* Add test for uri src body

* Bump version_added to 2.6

* Close the open file handle

* Add uri action plugin that handles src/remote_src

* Document remote_src

* Remove duplicate info about remote_src

* Bump version_added to 2.7
2018-05-31 11:43:00 -05:00
Nilashish Chakraborty
a013cdc747
Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review
2018-05-31 20:07:24 +05:30
jctanner
a9e53cdb68 Allow config to enable native jinja types (#32738)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2018-05-31 10:38:29 +02:00
Fabian von Feilitzsch
4d77878654 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-30 12:04:48 -05:00
Nathaniel Case
82dfa542c2
Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554)
* Remove 1.1.1.1 from *_config tests

* remove from *_smoke and *_system

* Miscellaneous other tests

* Remove from module documentation as well

* Remove from unit tests as well

* Remove accidental duplication from rebase
2018-05-30 13:03:20 -04:00
Nilashish Chakraborty
b9ea646839
Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements
2018-05-30 18:21:54 +05:30
Nathaniel Case
2272b6155c
Remove local from most eos tests now that provider is out (#40875) 2018-05-30 08:40:28 -04:00
Nathaniel Case
20f93816d6
Fix eapi tests to use become (#40838)
* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi
2018-05-29 14:18:03 -04:00
Trishna Guha
17b6ecf101
nxos_vlan fix (#40822)
* nxos_vlan fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* uncomment mode test as nxapi now has get_capabilities

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-29 21:44:19 +05:30
Mike Wiebe
9f026309a6 Update nxos_install_os module (#40102)
* Add nxos_install_os integration tests

* Update call to check timers

* Update check_ansible_timer method

* Modify network_cli integration tests

* Add timer check for nxos_install_os

* Add comments for clear_persistent_sockets

* Update connection info for tests

* More updates

* Restructure files for provider and non-provider testing

* Update env var name and add check for ISSU switchover
2018-05-29 21:07:57 +05:30
Zim Kalinowski
726d7fe4c3 removing unstable from container instance (#40780) 2018-05-29 15:11:26 +08:00
Zim Kalinowski
8544bc5b2a fixing three unstable integration tests (#40804) 2018-05-29 14:22:59 +08:00
cosmix
4ae4e80cc3 Add support for mysqldump --ignore-table switch (#33065)
* Add support for `mysqldump`'s `--ignore_table` switch.
* Fix documentation and default linter warning re: default parameter
* Add number to replacement field in cmd string
* Bump version_added to 2.7
2018-05-28 17:31:55 +05:30
Yuwei Zhou
7b9864776a Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable

* add test

* fix

* fix
2018-05-28 15:45:01 +08:00
Zim Kalinowski
dde48560fb fixing container instance sanity & integration tests (#40774) 2018-05-28 12:59:26 +08:00
Kevin Breit
e16490c9c0 [WIP] New module - meraki_admin (#39837)
New module - meraki_admin
2018-05-26 02:30:21 +02:00
Kevin Breit
d5b3ffc51e New module - meraki_snmp (#39882)
* Initial commit for meraki_admin module

* Initial commit for meraki_snmp module

* Update code to be operational for SNMP settings
- Add optional_ignore value to is_update_required for one-time fields
- Write documentation
- Perform checks and execute changes

* Minor fixes and test improvements
- Fix some documentation errors
- Implement and test for idempotency

* Removed meraki_admin which shouldn't be there, ansibot changes

* Rename params to be lower case
- Updated integration tests
- Changed CamelCase to lowercase and underscore

* Code cleanup changes based on comments from Dag.
2018-05-26 02:22:38 +02:00
Matt Clay
5838e88fa0 Fix timezone tests to restore timezone. 2018-05-25 17:13:05 -07:00
Ed Costello
c4536bc827 Support check mode in aws_ses_identity module (#38422)
* Port aws_ses_identity module to use AnsibleAWSModule

* Support Check Mode in aws_ses_identity

* Add tests for check mode

* Move feedback forwarding parameter check to before any changes are made.
2018-05-25 18:46:25 -04:00
Strahinja Kustudic
0781a7f68c Fixed check_mode status to be the same as normal execution (#40721)
* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
2018-05-25 17:06:11 -04:00
tranceitionalMynd
04e3c964fb Added executable parameter to the script module (#36969)
* Added interpreter parameter to the script module

* Let required and default parameters get documented implicitly for binary parameter

* Renamed interpreter parameter to executable
2018-05-25 14:40:48 -05:00
Strahinja Kustudic
de57fa71c1 Improve timezone module for none systemd Linux distributions (#38032)
* The module now correctly sets the timezone in both the config file and
in /etc/localtime; while hwclock is set in both the config and
/etc/adjtime.
* Module checks if the timezone is actually set by checking
/etc/localtime. Before it only checked if it was set in the config file.
* Fixed module not setting the timezone on RedHat systems if
/etc/localtime was a symbolic link.
* Fixed module failures in case of missing config files or incorrect data
in them.
* Added a lot of integrations tests to cover most of these situations.
2018-05-25 12:01:03 -05:00
Sloane Hertel
6fb128b235
Add elb_application_lb tests for modifying listeners (#40716) 2018-05-25 11:16:29 -04:00
jctanner
1d5fe326e8 Add a cloud provider and a set of smoketests for the NIOS modules (#40573)
* Add a cloud provider and a set of smoketests for the NIOS modules
2018-05-25 13:50:45 +01:00
Alex Stephen
362e622a4b New module: GCP Compute Disks (#38612) 2018-05-25 07:48:01 -04:00
René Moser
5dd3aa26ea
cs_instance: implement host migration support (#40309)
* cs_instance: implement host migration support

* fix build

* fail fast on update if user is not admin

* improve tests a bit

* expunge it

* fix typo

* disable temporarly verify for host on starting instance.
2018-05-25 11:20:04 +02:00
Felix Fontein
dec392793b Letsencrypt: add account management module (#37275)
* Removed superfluous space.

* Separating account init code from ACMEAccount constructor.

* Extracted module utils and docs fragment.

* Added new letsencrypt_account module.

* Ignore pre-1.0.0 versions of OpenSSL.

* Added account key rollover.

* Renaming letsencrypt_account -> acme_account

* Simplifying check for updating contact information.

* Rewriting docstring for ACMEDirectory.

* Changing license according to permissions given by individual authors in https://github.com/ansible/ansible/pull/37275.

* Updating BOTMETA.

* Preparing for change of ACME protocol currently discussed in ietf-wg-acme/acme.

* Updating documentation.
2018-05-25 01:55:24 -04:00
René Moser
e7709e169a
new module cloud_init_data_facts (#37932)
* add new module cloud_init_facts

* rename cloud-init facts

* simplify

* re-add tests

* make test run on ubuntu except 14.04
2018-05-25 07:44:24 +02:00
Rafael
c49b7d2a5d Fix opennebula test stub (#40436)
* Requesting fixture services from PYONE via environment varaibles

* moved all test functionality out of opennebula module utils
2018-05-25 07:42:14 +02:00
Peter Janes
67493ebdee Add a 'releasever' parameter for dnf. Fixes #33314. (#37493)
* Add a 'releasever' parameter for dnf. #33314

* Set a default value for releasever

* Fix a variable name typo
2018-05-24 23:22:53 -04:00
Adrian Likins
1613a739ad fix decrypted vault utf8 values (#37539)
* Fix errors decrypted non-ascii vault vars

AnsibleVaultEncryptedUnicode was just using b"".decode()
instead of to_text() on the bytestrings returned from
vault.decrypt() and could cause errors on python2
if non-ascii since decode() defaults to ascii.
Use to_text() to default to decoding utf-8.

add intg and unit tests for value of vaulted vars
being non-ascii utf8

based on https://github.com/ansible/ansible/issues/37258

Fixes #37258

* yamllint fixups
2018-05-24 23:22:46 -04:00
Simon
d95c572992 New Memset module to request DNS reloads (#40390) 2018-05-25 00:30:25 +02:00
Simon
08f670864a New Memset module to manage DNS zone domains (#40391) 2018-05-25 00:29:43 +02:00
Rob
858f0fc000 New module: AWS Network load balancer (#33808)
* New module - elb_network_lb

* Fix creating a load balancer without tags

* Linter

Fix purging tags

Remove extra imports

* add support for cross zone lb, doc update and fix tagging

* pep8 fixes

* Add integration tests for elb_network_lb module

* more pep8

* Remove non-applicable option for NLBs

* fix target protocol

* pep8
2018-05-24 16:38:34 -04:00
Sijis Aviles
529ef6446e fix: Ensure zip excluded files are not checked (#40120)
* fix: Ensure zip excluded files are not checked

Fixes #26279

* test: Verify unarchive excludes behaves as expected

* fix: Typos and whitespaces
2018-05-24 15:14:15 -05:00
Ryan Brown
046561bbb0 Split AWS Config modules (#40111)
* Adding module for AWS Config service

* adding integration tests

* Split resource types into their own modules

* Properly use resource_prefix and retry on IAM "eventual consistency"

* Add config aggregator module

* AWS config aggregator integration test fixes

* AWS config recorder module

* Config aggregation auth rule

* Use resource_prefix in IAM role name

* Disable config tests
2018-05-24 15:52:41 -04:00
Sloane Hertel
cba64f5869 Fix inventory plugin cache + add tests (#38229)
* Fix setting the cache when refresh_cache or --flush-cache are used

* Use jsonify function that handles datetime objects in jsonfile cache plugin

* Don't access self._options directly

* Add initial integration tests for aws_ec2 inventory plugin

* Add CI alias

* Fix and add a few more unit tests

* Add integration tests for constructed

* Fix typo

* Use inventory config templates

* Collect all instances that are not terminated by default

* Create separate playbook for setting up the VPC, subnet, security group, and finding an image for the host

Create a separate playbook for removing the resources

* Allow easier grouping by region and add an example

* use a unified json encode/decode that can handle unsafe and vault
2018-05-24 15:34:54 -04:00
Ryan Brown
858a1b09bb EC2_group module refactor (formerly pr/37255) (#38678)
* Refactor ec2_group

Replace nested for loops with list comprehensions

Purge rules before adding new ones in case sg has maximum permitted rules

* Add check mode tests for ec2_group

* add tests

* Remove dead code

* Fix integration test assertions for old boto versions

* Add waiter for security group that is autocreated

* Add support for in-account group rules

* Add common util to get AWS account ID

Fixes #31383

* Fix protocol number and add separate tests for egress rule handling

* Return egress rule treatment to be backwards compatible

* Remove functions that were obsoleted by `Rule` namedtuple

* IP tests

* Move description updates to a function

* Fix string formatting missing index

* Add tests for auto-creation of the same group in quick succession

* Resolve use of brand-new group in a rule without a description

* Clean up duplicated get-security-group function

* Add reverse cleanup in case of dependency issues

* Add crossaccount ELB group support

* Deal with non-STS calls to account API

* Add filtering of owner IDs that match the current account
2018-05-24 11:53:21 -04:00
Rob
49f569d915 New module: AWS Glue connection (#39492)
* New module = AWS Glue connection

* Add a few initial integration tests

* Add alias for CI

* module rename

* finish module rename

* add loop when getting glue connection again so we dont get None

* Limit number of retries to get new glue connection info
2018-05-24 11:35:24 -04:00
Trishna Guha
c2f7f36fc5
nxos_file_copy network_cli and httpapi fix (#40592)
* Leverage action plugin to pass credentials to nxos_file_copy for network_cli, httpapi

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* make sure local test uses provider

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* clarify action plugin comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add connection=local back to nxos_file_copy because that module is weird

Also blacklist it running on nxapi, because that is meaningless

* remove provider

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* blacklist nxapi

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-24 20:21:18 +05:30
wiso
160bf82544 Add NETCONF support for SROS devices (#40330)
* added NETCONF support for SROS devices

* corrected alu mapping

* fix pep8 in sros.py

* BOT META file updated
2018-05-24 15:44:39 +05:30
wiso
387a23c3d1 New ansible module netconf_rpc (#40358)
* New ansible module netconf_rpc

* add integration test for module netconf_rpc

* pep8/meta-data corrections

* usage of jxmlease for all XML processing
separation of attributes "rpc" and "content"

* removed unused imports
improved error handling

* fixed pep8

* usage of ast.literal_eval instead of eval
added description to SROS integration test for cases commented out
2018-05-24 15:25:02 +05:30
Deepak Agrawal
ea4a78b2a1
iosxr_command does not work with prompt and answer arguments (#40475)
* mismatch type between function arguments

* add testcase for prompt

* yamllint issues

* remove overwriting response in case of connectionError exception

* remove import of ConnectionError as it is not required
2018-05-24 13:18:29 +05:30
Trishna Guha
3fd9c46828
fix nxos_system test (#40643)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-24 12:00:04 +05:30
Yuwei Zhou
c95724fb0a Fixes some NIC problems: create without nsg, support loadbalancer (#38643)
* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* add document

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* Fixes some NIC bugs (#39213)

* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix

* fix indent

* Update azure_rm_networkinterface.py

* fix comment

* support 3 types to specific name and resource group

* avoid test racing

* fix test

* add sample

* add resource id test
2018-05-24 14:32:03 +10:00
Martin Krizek
0eece38cdf Fix any_errors_fatal in meta tasks (#36870) 2018-05-23 21:03:31 -05:00
Yuwei Zhou
a4db5c3ae8 Fixes #37330: support subnet can refer nsg in another resource group (#37627)
* support subnet can refer nsg in another resource group

* support 3 types of refer resources

* fix

* fix tyoe

* update example
2018-05-24 11:45:29 +10:00
Zim Kalinowski
2c60771096 introducing azure_rm_resource (#39274)
* introducing azure_rm_resource

* adding missing file

* fixed documentation

* fixed subresource

* don't support tags (yet)

* added api_version to the doc

* adding api version to the doc

* ignoring some doc checks

* fixing imports

* final sanity fixes

* adding idempotency

* fixed params

* missing query parameter

* some updates of azure_rm_resource

* try to update test for idempotency

* fixed test

* try to fix problem temporarily

* another approach

* fixed spelling

* fixed mistake

* refactored a bit

* fixes

* removed unnecessary code

* removed assert temporarily

* fixed documentation

* trying to fix import issues

* trying to fix import

* try to fix sanity

* removed unnecessary pass

* removed e324 ignores

* resolve conflicts in ignore.txt

* fixing ignore txt

* revert

* try different approach to idempotency

* updating tests

* fixed task

* fixes

* getting output value properly

* fix test

* missing change

* fixed bug, changed test

* fixed mistake

* fixed mistake
2018-05-23 16:55:57 -07:00
Nathaniel Case
f88412b7cd
Fix ios test pt. 2 (#40628)
* Add missing idempotence assert

* Remove dhcp with other addresses on ipv6
2018-05-23 18:33:36 -04:00
Jordan Borean
457bccf540 win_updates: add scheduled tasks back in for older hosts (#38708)
* win_updates: add scheduled tasks back in for older hosts

* Fixed up typo in category name error message

* Fixed up some minor issues after merge

* added changelog fragment

* Default to become but add override to use scheduled tasks

* Added basic unit tests for win_updates

* fix minor typos
2018-05-23 13:21:01 -07:00
Alan Rominger
5540a586dc test tower-cli verify_ssl config parameter (#37597) 2018-05-23 14:33:58 -05:00
Simon
450891a1e7 New Memset module to manage DNS zone records (#40392) 2018-05-23 18:36:57 +02:00
Nathaniel Case
67e0df81c1
This test is expected to fail (#40612) 2018-05-23 10:45:50 -04:00
Trishna Guha
8b317e77c2
fix nxos_system test (#40599)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-23 17:19:50 +05:30
René Moser
f71cea052d
cs_vpc: fix state=present to start vpc (#40587) 2018-05-23 08:53:58 +02:00
Senya
0a701ff746 Detect separate git dir and set git config path value appropriately
PR #38016

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2018-05-23 00:33:22 +02:00
Gyorgy Nadaban
7d2012fdd7 Implemented support for Repository selection when installing module (#39909)
* Implemented support for Repository selection when installing module

* Fixed AllowClobber check

* Fixing missing AllowClobber argument

* Fixed missing -Force switch

* Test installing package from custom repo

* Added custom repo variables

* Fixed repo registration

* Modified output check

* Modified output check

* Adding debug output

* Modified update handling

* Fixed output check

* Added missing PowerShellGet 1.6.0 install

* Added error handling

* Modified test output check

* Fixing output check

* Fixing output filter

* Implemented registering custom repo

* Fixing registering custom repo

* Fixing registering custom repo

* Fixing registering custom repo

* Tweaked module to shorten execution time

* Removed installing PowerShellGet 1.6.0

* Re-added Install-NugetProvider
2018-05-23 07:36:57 +10:00
Jordan Borean
f84f3de7c2
powershell: Respect remote_tmp path set by the user (#40210)
* powershell: Respect remote_tmp path set by the user

* Fixed up linting error and typo

* Added changelog
2018-05-23 07:12:32 +10:00
Jordan Borean
070a5557d1
always_run: removed deprecated always_run task option (#40470) 2018-05-23 07:10:36 +10:00
Nathaniel Case
e8d02a3a0f
Search all assigned ipv6 addresses instead of just the first (#40533)
* Search all assigned ipv6 addresses instead of just the first

* Add test for idempotency with multiple ipv6 addresses assigned
2018-05-22 12:00:16 -04:00
Alex Stephen
90588f4970 New module: GCP Compute Firewalls (#39032) 2018-05-22 10:55:12 -04:00
Alex Stephen
fd3ed6660e New module: GCP Compute Forwarding Rules (#38613) 2018-05-22 10:53:58 -04:00
Alex Stephen
c9b445c182 New module: GCP Compute Global Address (#38614) 2018-05-22 10:53:41 -04:00
Alex Stephen
d3222a97c8 New module: GCP Compute Global Forwarding Rules (#38615) 2018-05-22 10:53:12 -04:00
Alex Stephen
886f930e59 New module: GCP Compute Images (#38616) 2018-05-22 10:52:50 -04:00
Alex Stephen
41c9ba08a4 New module: GCP Compute Ssl Certificates (#38620) 2018-05-22 10:44:44 -04:00
Alex Stephen
43afb5465f New module: GCP Compute Instance Groups (#38617) 2018-05-22 10:39:49 -04:00
Alex Stephen
05c1257aeb New module: GCP Compute Target Pools (#38623) 2018-05-22 10:38:07 -04:00
Alex Stephen
e09c661ae5 New module: GCP Compute Url Maps (#38625) 2018-05-22 10:36:51 -04:00
Alex Stephen
e4bbcbbdae New module: GCP Compute Instance Group Managers (#38934) 2018-05-22 10:36:20 -04:00
Alex Stephen
79b8ed8622 Adding support for GCP Compute Target Ssl Proxys (#39033) 2018-05-22 10:31:45 -04:00
saichint
97070c9688 fix nxos_system issues (#40347) 2018-05-22 14:19:34 +05:30