Commit Graph

30080 Commits (eb4cc31ae579bd87f7b7f0e309180518f315ad20)
 

Author SHA1 Message Date
Jon Hadfield eb4cc31ae5 [cloud] migrate ec2_asg to boto3 and support application ELB target groups. (#19667)
* switch to boto3 and add support for application ELBs with target groups.

* use py23 compatible dict iterator.

* removing commented out fail_json calls

utilize sets to simplify logic

remove setting a redundant variable

add bounds checking in two places

add AWSRetry decorator - do we want this for other functions too?

change xrange to range so python3 doesn't fail

remove sorting lists of dicts; in python2 this returns None, in python3 this fails

* remove error variable from traceback.format_exc

* Remove boto2-style calls brought in by rebase

Old boto-style calls to `as_group` attributes break in boto3

Also remove module from legacy-PEP8 list

* Add  parameter to target_group_arn option

* Fix HAS_BOTO3 check

* use tags.items() instead of iteritems

* import botocore

* Fixed bugs in deleting autoscaling groups

* make changes in deleting autoscaling groups pep8

* more pep8

* fix version

* fix bugs so local integration tests run

* fix launch config check

* reflect changed status for ASG updates

* Fix existing exception handling and use traceback.

Fix imports

* line length

* Fix notification setup

* Fix mutually exclusive arguments
Only one of the AvailabilityZones and VPCZoneIdentifier arguments should be provided to the CreateAutoScalingGroup call.

* Allow desired_capacity, min_size, max_size, launch_config_name to be derived from the existing ASG if not specified

Remove code updating dict after ASG already uses it
7 years ago
Matt Clay 496280858d Revert "Temporarily disable test which fails in group run."
This reverts commit 99d328976d.
7 years ago
Matt Clay b8cb3f519b Detect and fix environment tampering in tests. 7 years ago
Matt Clay 99d328976d Temporarily disable test which fails in group run. 7 years ago
Abhijeet Kasurde 3d51081a59 Refactor nxos_reboot module (#24484)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Rob fd1debb869 Feature/aws helper function for tags (#23387)
* Add new helper function for comparing AWS tag key pair dicts. Also modify boto3_tag_list_to_ansible_dict function to be more generic when looking for key names because AWS sometimes uses 'Key', sometimes 'TagKey' and who knows what the future holds! Fixed modules to work with changes.

* Review changes

* Add some more doc to GUIDELINES for tags and fix var name for snaked values in ec2_group_facts
7 years ago
Trishna Guha b2a2f69a6e nxos_vrf_af fix and unit test (#24399)
* nxos_vrf_af fix and unit test

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

* ansibot told me to do this

* use sorted() as the test list elements differ in order for python2.x and 3.x
7 years ago
Trishna Guha 62eafa8837 fixes nxos_evpn_vni and unittest (#24372)
* fixes nxos_evpn_vni

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

* fixes pep8 issue and syntax error

* ansibot tole me to do this

* Unit test
7 years ago
Dag Wieers 748f27e597 expect: Add a pointer to the shell/script modules
This PR also includes:
- DOCUMENTATION and EXAMPLES cleanup

This fixes #21335
7 years ago
Matt Davis 0f4026d626 add Windows docs for winrm automatic kerb ticket mgmt (#24456) 7 years ago
Dag Wieers e855274dc8 win_psexec: Enable -nobanner option by default (#23422)
* win_psexec: Enable -nobanner option by default

PR also includes:
- Option `nobanner:` to remove this flag
- Improvements to Examples
- Improvement to Return Value
- Add types to all parameters now
- Add (limited) integration tests

* Move sysinternals into C:\Windows\Temp
7 years ago
Nathaniel Case 09b2964dee nxos_bgp_af updates (#24171)
* update docs
* clean up nxos-bgp_af
* Remove useless params from bgp_af
* Add bgp_af tests
7 years ago
Abhijeet Kasurde 2f26c5285a Refactor nxos_file_copy module (#24314)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
jctanner e9c2546ffe Add integration test targets for core supported modules (#24217)
A preliminary set of test targets for "core" supported module that had no independent tests. These will also help us ensure python3 compatibility for those modules and prevent future regressions.
7 years ago
Ondra Machacek a5020a40e5 Minor fixes for oVirt modules (#23452)
* cloud: ovirt: only image disk can be sparsified

* cloud: ovirt: add post-copy scheduling policy
7 years ago
René Moser 2ef6713abb cloudstack: new module cs_vpn_gateway (#23954)
* cloudstack: new module cs_vpn_gateway
* add integration tests for cs_vpn_gateway
7 years ago
Matt Martz d3249e7875 pep8 fixes for contrib (#24344) 7 years ago
Elijah Lynn c7ae6b9fd5 [cloud][inventory] Get tags for RDS instances. (#23989)
* Get tags for RDS instances.

Boto3 only at this time.

Relates to #11569, #14464.

* Add a check for boto3

* Fix HAS_BOTO3 error
7 years ago
Matt Martz 3324d0a4b0 Support auto_remove in docker_container (#22929)
* Support auto_remove in docker_container

* Fail if not docker>=2 and auto_remove=True, don't set auto_remove in host_config if not docker>=2

* Make quoting more readable in ansible errors
7 years ago
wiso 0a22dbd9d8 Update netconf_config.py (#24323)
* Update netconf_config.py

Implementation proposal for feature request #24220

* Update netconf_config.py

fixed pep8
added code proposal for #24221

* Update netconf_config.py

correct more pep8 related things
add some cosmetic changes
7 years ago
Matt Davis ead23783be slightly increase win_async_wrapper fire and forget sleeptime
* should fix Shippable timeouts when AWS CPU credits are low- right on the bubble of failure w/ 5s execution
7 years ago
Sloane Hertel 2618e6d516 ec2_elb_lb: allow elb scheme to be updated by restarting the resource - fixes #19116 (#22916)
* allow elb scheme to be updated by restarting the resource

use ensure_gone and require wait option

* fix pep8

* fix yaml

* requested changes

* fix fail_json
7 years ago
Martin Kopta e1d896052d unit test for #24330 (#24346) 7 years ago
Dag Wieers bc806ff479 Windows: Small fix to Add-Warning and Add-DeprecationWarning (#23520)
Simplified the logic, and fix the issue of having a nested list as
entry.

Also indicate that we deliberately want to retain $null values
(and i.e. do not want them to be turned into a boolean).
7 years ago
Brian Coca 91449ea231 removed autogenerated file and added to ignore 7 years ago
James Cammarata 192606c592 Updating version vars for releases 7 years ago
Adrian Likins 6f2cd64cff Include .git_keep files in role template skeleton (#24381)
setup.py will not install package_data this is just an empty
directory, even if the globs in package_data match it.

So the role skeleton that was being installed to galaxy/data/*/
was excluding the files/ and templates/ directories since they were
empty.

Since the skeleton dir doesnt include those dirs
'ansible-galaxy init' would not set them up.

So this adds a .* glob to those directories so the .git_keep
will be included as well, so that setup.py will create the otherwise
empty directoty. ansible-galaxy init already knows to ignore those
files, so no other changes are needed.

(Including the .git_keep files is a little odd, but the alternative
would be creating our own placeholder files. Since ansible-galaxy
already understands .git_keep files we just reuse that)

Fixes #23597
7 years ago
Ganesh Nalawade 5b3ea6562b Add junos integration test (#24404) 7 years ago
Feike Steenbergen c5adf08c40 Reference correct variable and key for role expiry (#23397)
Previously, this module could throw the following error message:
    NameError: global name 'current_roles_attrs' is not defined

The referencing key should also match the name of the column, which is
rolvaliduntil, not rol_valid_until
7 years ago
Abhijeet Kasurde a255cfd22a Check login_token for user before any operations (#23600)
Fix adds extra check if user is authorized or not while
using login_token.

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

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Benjamin Jolivot e99815e9f5 Fortios file only mode + integration tests (#23275)
* WIP file_mode

* WIP

* Add file_mode + integration tests

* fix pep8

* Update doc fragments
Create mutualy_exclusive param
Fix yamllint problem in tests

* Add aliases file + main playbook for fortios

* Install pyfg before running tests

* Install pyfg before running tests in role

* Remove pre_task as it's done in roles

* Force pyFG minimal version for python3

* role_path not role_dir :(

* Change requirements

* Specify Error type when error on import

* Bug in pygf library with python 2.5 (PR is waiting https://github.com/spotify/pyfg/pull/19)

* Bad requirement format

* still bad format -_-'

* remove test/integration/fortios.py (auto generated by tests)
missing new lines at end of file

* pyFG is now fixed in 0.50
7 years ago
Abhijeet Kasurde e342b281d8 Check if api_key and app_key before proceeding (#24336)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

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

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay d999d613cb Python 3 fixes for CloudStack modules and tests. (#24400) 7 years ago
Gaurav Rastogi 6aa32d3e9d Added no_log flag for all the sensitive fields. (#24386) 7 years ago
Matt Clay e6934e42be Update ansible-test change handling and CS plugin. (#24395)
* Use CloudStack simulator from Ansible repo.
* Recognize cloud specific ansible-test changes.
* Hide ansible-test cs notice in explain mode.
7 years ago
René Moser aaf4f04574 automated integration tests for cloudstack (#20552) 7 years ago
Dag Wieers b58cf0d23a windows: Various small documentation fixes (#23138) 7 years ago
Dag Wieers 5ab97b30cd powershell: Add support for list parameters (#23131)
This is a first implementation of list parameters.

It will convert a single string, or comma-separated value into an Array.
7 years ago
Matt Davis 98ff93b2db fix spurious warnings with ansible_winrm_kinit_X args (#24380)
* added to pywinrm arg whitelist
* clarified error text on kinit_mode error
* fixes #23822
7 years ago
James Cammarata ed56f51f18 Fixing security issue with lookup returns not tainting the jinja2 environment
CVE-2017-7481

Lookup returns wrap the result in unsafe, however when used through the
standard templar engine, this does not result in the jinja2 environment being
marked as unsafe as a whole. This means the lookup result looses the unsafe
protection and may become simple unicode strings, which can result in bad
things being re-templated.

This also adds a global lookup param and cfg options for lookups to allow
unsafe returns, so users can force the previous (insecure) behavior.
7 years ago
Dylan Silva 6f4f7011f1 Updates to docs for developers (#24034)
- Added items to index for TOC
- Changed some formatting on overview_architecture
- removed some out of date items from developing_modules_general
7 years ago
Nathaniel Case 830f19d444 nxos_bgp updates (#24270)
* Remove invoke from nxos_bgp
* Try to simplify get_existing
* Streamline state_present
* More testing, squash & compact get_value & get_custom_value
* Streamline main
* nxapi has problems reading CustomNetworkConfig directly
7 years ago
Ganesh Nalawade 4186b07d21 Fixes #24375 Add check to identify if diff is empty (#24377)
* Fix #24375 Add check to identify if diff is empty
7 years ago
Abhijeet Kasurde d072d91aed Use wait_timeout as integer in redshift module (#24279)
Fix stricts datatype of wait_timeout to int as module
is using it as integer.

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

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Gaurav Rastogi b1efad52a4 New module to setup cloud connector properties (#22225)
* New module to set up cloud connector properties

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
7 years ago
Gaurav Rastogi 1978795089 New module to setup string group. (#22223)
* New module to setup string group.

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
7 years ago
Abhijeet Kasurde 2425143cf2 Pep8 fixes for digital_ocean_*
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 9c5b55232c Pep8 fixes for Windows module (#24349)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay 86bf27511c Migrate cs_sshkeypair test to ansible-test. 7 years ago
Adrian Likins 5618f494a8 Fix docs/api sphinx-build err on 'make rpm' (#24334)
The makefile in docs/api/ had a top level check for the
'sphinx-build' tool, but the check was getting triggered
on 'make clean' when it is not needed and causing 'make rpm'
and similar builds to fail.

So this commit removes the check.

Fixes #24163
7 years ago