Commit graph

21341 commits

Author SHA1 Message Date
Will Thames
42368ce310 rds_instance_facts module
Create rds_instance_facts module using boto3.

Create common rds.py module_util library to be used by
rds_instance_facts and future RDS modules.

rds_instance_facts: use latest AWS helper methods

* Use `module.client` with `retry` to create AWS connection
* Return tags, using AWSRetry helper to backoff
* Use paginator to describe DB instances
* Further improve exception handling
* Fix RETURN documentation

update version_added

Co-authored-by: Michael De La Rue <jababubic.margoteen@spamgourmet.com>
2018-05-16 22:21:47 -04:00
Jordan Borean
2f70360698
Add windows module for changing the hostname (#40295)
Co-authored-by: Ripon Banik <riponbanik@users.noreply.github.com>
2018-05-17 11:41:37 +10:00
Jordan Borean
5c39c3b2d1
Module basic.py to create parent dirs of tmpdir if needed (#40201)
* Module basic.py to create parent dirs of tmpdir if needed

* Added warning to dir creation

* Assert if make_dirs was called or not in unit tests
2018-05-17 09:52:46 +10:00
jctanner
5df370243d
Fix case (#40272)
* Github logins are case sensitive

* Fix login case across all modules
2018-05-16 19:51:55 -04:00
Sertaç Özercan
6e4a2b17de [new module] Managed Azure Container Service (AKS) (azure_rm_aks) (#35888)
* add aks module and integration tests

* linting

* update tests

* sanity check

* make some changes to AKS module

* make integration test work

* add fact

* add resource_group name

* add fact test

* fix test

* fix test

* linting

* changed line endings for facts

* output kubeconfig

* Update azure_rm_aks.py

* update integration test aliases

* update aliases

* add cloud_environment and auth_source to args

* Fix comments from Jborean93 (#3)

* update

* fix

* fix

* fix

* fix

* update doc

* fix
2018-05-16 16:08:27 -07:00
Jordan Borean
837aada4a8 win_updates: fix typo with download failure and whitelist on multiple updates (#40283) 2018-05-16 18:04:58 -04:00
Adam Patt
223a4c0685 Fixes #19392: allow commands to be specified as lists. new syntax is documented as well. (#40261)
* Fixes #19392: allow commands to be specified as lists.  new syntax is documented as well
2018-05-16 13:37:39 -07:00
Tim Rupp
b325e9900c
Adds BIGIQ application HTTPS WAF module (#40270)
This module can be used to manage HTTPS WAF applications on a BIGIQ
2018-05-16 12:49:21 -07:00
Tim Rupp
1f2cfb0a91
Adds the BIGIQ application HTTPS offload module (#40269)
This module allows you to manage HTTPS offload applications on a BIGIQ
2018-05-16 12:26:59 -07:00
Tim Rupp
5e7878a6a1
Adds various fixes for f5 modules (#40208)
* Adds stty expansion for cli commands
* minor fixes
* Make bigiq rest client work correctly
2018-05-16 12:14:12 -07:00
John Sutterfield
d5a5e37fcf Add fallback check for IAM role temp creds (#40240)
* Add fallback check for IAM role temp creds
2018-05-16 14:27:49 -04:00
Toshio Kuratomi
6227c2ac75
More file refactoring (#40114)
* Set src in the state functions rather than the toplevel

A good API should only require passing one version of a piece of data
around so do that for src

* Move the rewriting of path into additional_parameter_handling

When the path is a directory we can rewrite the path to be a file inside
of the directory

* Emit a warning when src is used with a state where it should be ignored
2018-05-16 10:41:11 -07:00
Ricardo Carrillo Cruz
5ae77337a1
Rename persistent_connection_timeout to connect_timeout in INI section (#40260) 2018-05-16 19:01:24 +02:00
Toshio Kuratomi
ca4147f2cc Fixes #34893 (#40166)
Fixes several bugs exposed in #34893
* Fixes relative path handling in copy so that it splits directories and
  reconstructs the correct file path
* Return failed in the proper circumstances
2018-05-16 11:09:32 -05:00
Fabian von Feilitzsch
4373b155a5 Move k8s modules to dynamic backend (#39632)
* Move k8s modules to dynamic backend
2018-05-16 10:57:36 -05:00
Tim Rupp
4f19e6f436
Adds the BIGIQ FastL4 UDP application module (#40257)
This module allows you to manage FastL4 applications on a BIGIQ
2018-05-16 07:53:54 -07:00
Tim Rupp
398c57e70d
Adds the BIGIQ application fastl4 tcp module (#40216)
This module allows you to manage FastL4 TCP Applications on a BIGIQ
2018-05-16 07:39:41 -07:00
Tyler Bigler
db4ae20e8b ios_command: Correct answer example and consolidate docs on command param. (#40158)
* Correct answer example as 'c' cancels, not confirms. Moved command note to be in line with command docs.

* Correct example to escape square brackets. Remove '\r' mention as it does not get passed correctly.

* Add carriage return example since it works with double quotes.

* Remove colon which was breaking docs rendering.
2018-05-16 15:39:07 +01:00
Anil Kumar Muraleedharan
f60731e27e Lenovo cli expansion - Modify command acronyms to full commands (#40218)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Editing cli commands to expanded form. Changing username and password fields as per Ansible standards.
2018-05-16 15:25:58 +01:00
Tyler Bigler
39bed45baf ios_facts: Add check to skip lldp neighbors if lldp doesn't exist or isn't enabled. (#40109)
* Add check to skip lldp neighbors if lldp doesn't exist or isn't enabled.

* Re-enable check_rc on ios' run_commands
2018-05-16 09:33:57 -04:00
Ricardo Carrillo Cruz
62e1c14edc
Pull persistent connection parameters via get_option (#39367)
* WIP Pull persistent connection parameters via get_option

* Fix pep8

* Add use_persistent_connection setting to paramiko_ssh plugin

* Add vars section to persistent_command_timeout setting and prevail provider values over config manager

* Use persistent_command_timeout on network_cli instead of timeout

* Fix unit tests

If we don't call loader to get network_cli, then _load_name is never
set and we get KeyError.

* Pull persistent_command_timeout via config  manager for ios connection local

* Pull persistent_command_timeout via config manager on connection local
2018-05-16 14:59:01 +02:00
Ganesh Nalawade
865f2c5990
Fix junos_config confirm timeout issue (#40238)
* Fix junos_config confirm timeout issue

* Fix unit test
2018-05-16 18:14:23 +05:30
Trishna Guha
979f1e5ed1
save_snapshot_locally nxos_snapshot (#40227)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-16 14:59:23 +05:30
Deepak Agrawal
86c945a628
network_put and network_get modules (#39592)
* Initial commit

* Socket Timeout and dest file handler

* sftp handling

* module name change as per review

* multiple thread tmp file overwite problem

* Integration test suite for network_put

* add additional testcase for dest argument

* fix pylint/pep8/modules warnings

* add socket timeout for get_file

* network_get module

* pep8 issue on network_get

* Review comments
2018-05-16 14:38:43 +05:30
Yuwei Zhou
05c4f5997e azure_rm_securitygroup cannot create rules that allow IP address prefixes (#40070)
* support mutilple ip prefixes

* fix lint

* order is no matter

* remove alias

* fix
2018-05-16 16:28:14 +08:00
Tim Rupp
5ae499466b
Adds BIGIQ Fast HTTP module (#40213)
This module can be used to manage Fast HTTP applications on a BIGIQ
2018-05-15 22:43:40 -07:00
Tim Rupp
576ad58b0f
Adds the BIGIQ application HTTP module (#40211)
This module can be used to manage http applications on a BIGIQ
2018-05-15 22:20:07 -07:00
vigiroux
0b3ed626b3 empty lines in csvfile means row has no items in list; check row len first. (#40089) 2018-05-15 17:26:53 -05:00
Tobias Wolf
25a48fb89e Allow Unicode chars to be dumped by yaml stdout callback (#40188)
* Allow Unicode chars to be dumped by yaml stdout callback

Allow Unicode in yaml.dumper to support printing strings unescaped with
\uxxx chars.

Cf. https://stackoverflow.com/a/29600111

* Switch from decode('utf-8') to the more compatible to_text()
2018-05-15 15:23:13 -07:00
Colin Nolan
3dd33e7417 Corrects environment variable in example. (#40162) 2018-05-15 17:22:07 -05:00
Kevin Breit
cd89bc5941 New module - meraki_network (#39782)
* New module for CRUD functionality of networks in a Meraki environment
- Relatively full integration test suite
- More functions to come

* Fix indent for PEP8.

- Look into why this didn't show on a local PEP8 test

* Dag requested changes.
- Removed a section in get_net as its backend isn't implemented
- Documentation modifications
2018-05-15 22:42:09 +02:00
Kevin Breit
aa8aee538e Meraki: Improved integration testing and results (#39761)
* Improved integration testing and results
- Added get_org() function to return data for single org
- Added a lot of new integration tests
- Changed result now shows, still probably could be better

* Fix formatting errors for PEP8
2018-05-15 22:41:09 +02:00
Sloane Hertel
b8a93c12e2 [aws_s3] Fix uploading src option on the target machine to a bucket (#39023)
* Fix backward compatibility for uploading src option on the target machine to a bucket

* Allow the module to handle errors for nonexistent files
2018-05-15 15:36:48 -04:00
Ryan Brown
ede47910f8 Add better handling for errors causing integration test instability (#40184)
* Add better handling for errors causing integration test instability
2018-05-15 15:31:19 -04:00
Sean Cavanaugh
0dc73e7822 add SVI example for Cisco IOS/IOS-XE platform (#40021)
on networktocode slack there was a user that wanted an example of how to add a switch vlan interface.  This will work and was tested on a 3850 cisco ios switch
2018-05-15 14:07:23 -05:00
Michael Miko
a363406d27 New zabbix_group_facts module (#39654) 2018-05-15 20:05:27 +02:00
David Beck
07d6daf787 [Fix] Commented out Section due to no Quotes (#24258)
Variables are not being passed into ansible unless they are quoted since yaml will automatically interpret them as comments
2018-05-15 12:20:09 -04:00
Madhura-CSI
b85970b2b0 New Module: ec2_vpc_vpn_facts (#35983)
* New module: ec2_vpc_vpn_facts

* Add integration tests for ec2_vpc_vpn_facts and the IAM permissions

* Add retry to VPC removal

* Use unique name for VGW

* Always clean up after tests and add retries
2018-05-15 12:13:46 -04:00
Nathaniel Case
f04c876ecd
Nxos fixes (#40117)
* Alter nxos_nxapi tests to test the right thing

* Defend #40027
2018-05-15 11:55:47 -04:00
Peter Oliver
caddf863df pkg returns 4 for "nothing to do" (#23007)
* pkg returns 4 for "nothing to do"

We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances.

We need to rename the response `rc`, because that name is reserved by
Ansible to indicate a failure if it is non-zero.

Fixes ansible/ansible#22781 and ansible/ansible-modules-extras#932.

* Don't rename `rc` to to `pkg_rc`, and instead override the failure state.

* Drop mention of renamed variable in `pkg5` module.
2018-05-15 11:52:54 -04:00
Martin Krizek
def434b5c3
apt_repository: fix rendering default mode in docs (#40152) 2018-05-15 17:36:23 +02:00
Eric Thiel
67acffb5f2 Fixes to improve ios_system idempotency (#38303)
Added detection of additional formatting for domain_name, domain_search,
lookup_source, and lookup_enabled on some software versions. In each
case they failed to detect existing commands with a '-' in it.

Fix: #38301
2018-05-15 10:27:40 -04:00
Jaak Ristioja
248bc0a4e8 modules, cloudengine: Fixed typo: ansilbe -> ansible 2018-05-15 13:42:04 +02:00
Abhijeet Kasurde
553cf4cdfc rabbitmq_binding: Update documentation (#40062)
This fix updates rabbitmq_binding documentation

* change 'exchange' to 'binding'
* Some minor doc fixes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-15 03:52:55 -04:00
Abhijeet Kasurde
453358af3b jenkins_job_facts: Add validate_certs argument (#40065)
This fix adds validate_certs argument in jenkins_job_facts module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-15 03:39:47 -04:00
Sumit Jaiswal
9c0825a4cf
Infoblox ipv6 support feature (#39668)
* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open	

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)

* infoblox ipv6 support changes

* infoblox ipv6 support changes

* for fixing pep8 errors

* moving ipaddr check to utils

* adding ipv6addr check

* increasing space to resolve pep8 error

* modified the playbook examples to valid ones

* Update nios_network.py
2018-05-15 08:24:48 +05:30
Greg Sheremeta
291c89382c fix typo in nmcli doc (#40116)
fix typo in nmcli doc, balence -> balance
2018-05-15 07:52:59 +05:30
Dag Wieers
3cdd5da247
xml: Fix validate-modules issue (#40121) 2018-05-15 02:29:48 +02:00
Jordan Borean
d6eb642e88
win_template: fix issue where dest was specified as a directory (#39887) 2018-05-15 09:59:51 +10:00
Jordan Borean
e0813d7d47
become win: better error messages and docs update (#39936)
* become win: better error messages and docs update

* Fix syntax error and added changelog fragment
2018-05-15 09:33:36 +10:00
Jordan Borean
44ab948e5d
create module tmpdir based on remote_tmp (#39833)
* create module tmpdir based on remote_tmp

* Source remote_tmp from controller if possible

* Fixed sanity test and not use lambda

* Added expansion of env vars to the remote tmp

* Fixed sanity issues

* Added note around shell remote_tmp option

* Changed fallback tmp dir to ~/.ansible/tmp to make shell defaults
2018-05-15 09:31:21 +10:00
Jon Dufresne
1d640182c6 Update all pypi.python.org URLs to pypi.org (#38988)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-05-14 17:41:47 -05:00
Zim Kalinowski
b20a88c39d fix problem with documentation and param definition difference (#40067)
* fix problem with documentation and param definition difference

* removed some E324 from ignore.txt

* fixed mistake

* remove one more E324

* removed function app

* fixing append tags

* leaving append tags for later
2018-05-15 07:01:08 +10:00
Toshio Kuratomi
38ab36a625 Revert "Configurable list of facts modules (#31783)" (#40022)
This reverts commit 95655fae5c.
2018-05-14 13:46:14 -07:00
Nikita Chepanov
9514a618b7 Add copy module support for filesystems without chmod (#40099)
* only relevant to remote_src=True
* separate file content copying from file stats copying
* raise exception on mode='preserve', ignore otherwise

Fixes: #19731
Signed-off-by: Nikita Chepanov <nchepanov@bloomberg.net>
2018-05-14 13:17:38 -07:00
Jake Jackson
7d221c4663 updating win_chocolatey.py docs examples (#40101)
<!--- Your description here -->
Edit to the notepadplusplus example. 

Removed `.install` as per chocolatey documentation, the package is just notepadplusplus. 

docs found here: https://chocolatey.org/packages/notepadplusplus
+label: docsite_pr
2018-05-15 05:55:23 +10:00
Ramki Subramanian
3955e528b1 ec2_ami_copy: add tag_equality option for idempotence using tags (#40088)
* Allow idempotent use of ec2_ami_copy

When `tag_equality` is set true, use tags to determine
if AMIs in different accounts are the same, and don't
copy the AMI twice if they are the same.

Use AnsibleAWSModule and make imports more consistent
with other modules

* Update version added

* More code review changes

* Review changes - Recommended way to start EC2 connection
2018-05-14 15:11:48 -04:00
suacide24
dbb4493f17 removed eth on port-channel (#40090) 2018-05-14 21:09:44 +02:00
Martin Krizek
6d984c7988 low_level_execute_command: add stderr_lines 2018-05-14 12:05:03 -04:00
Rémy Léone
afc196acf1 Add a User-Agent string to the API request (#38587) 2018-05-14 09:55:47 -05:00
Dag Wieers
19977e80f0 Get rid of obsolete SEQUENCETYPE-check (#40078)
And small cosmetic change to examples.
2018-05-14 10:22:15 -04:00
Felix Kaechele
a8bdcd19f0 firewalld: amend docs for python3 only hosts (#40048)
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
2018-05-14 08:38:10 -05:00
Robin Roth
d6e711b1de Allow empty list of names in pip module (#38789)
pip 10 gives exit code 1 for empty argument lists (pip < 10 gave exit 0)
see also https://github.com/pypa/pip/pull/4210

To still allow playbooks to pass when giving empty lists, don't call
pip in that case, but show a warning.
2018-05-14 14:51:10 +02:00
Robin Roth
42953c40ce Pip: Make main method smaller (#38788) 2018-05-14 14:49:41 +02:00
Trishna Guha
5eb6e3c611
nxos module doc fragment for authorize,auth_pass (#40074)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-14 17:23:26 +05:30
Abhijeet Kasurde
f484c1e8af
Remove redundant import from netapp module_utils (#39495)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-14 16:18:07 +05:30
Abhijeet Kasurde
e53d9b0017
icinga2_feature: fix module in check_mode (#39853)
* icinga2_feature: fix module in check_mode

* modify check_mode logic

Fixes: #39830

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-14 16:14:42 +05:30
Abhijeet Kasurde
79c7d462c1
VMware: Check device type explicitly (#38729)
Check datatype of device instead of comparing them directly in
vmware_guest. Also, added testcases to check this behavior.

DPVG is not supported in current version vcsim

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-14 16:12:31 +05:30
Trishna Guha
5cf61d7401
ios cliconf plugin fix regex for version (#40066)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-14 12:40:04 +05:30
saichint
6fac574f17 fix nxos_ping issues (#40028) 2018-05-14 11:29:18 +05:30
Zim Kalinowski
5d2c23e2a3 fix for security group description crash (#38108) 2018-05-14 13:55:25 +08:00
Sietse Visser
d25420bbb9 Fix for Azure loadbalancer tags. (#39963)
* Fix for Azure loadbalancer tags.

It was possible to add tags to an Azure loadbalancer, but the tags were never set in Azure.
This patch fixes that.

* Pass shippable tests

* azure_rm_loadbalancer_facts requires rg

Getting facts of all loadbalancers via azure_rm_loadbalancer_facts requires a resource group.
This fix adds the rg as parameter to the list() call.

* Revert changes in azure_rm_loadbalancer_facts

The changes belong to another pull request.
2018-05-14 13:18:15 +08:00
Yuwei Zhou
c84e3e70ab location name (#40055) 2018-05-14 11:46:45 +08:00
Abhijeet Kasurde
57f6abdb84
VMware: new module: vmware_host_powerstate (#36577)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-12 21:09:53 +05:30
markusbloch
a199c9b04f add state parameter to patch module (#33692)
* add state parameter to patch module

* add "version_added" to state parameter docu

* fix state parameter call

* change version_added to 2.6
2018-05-12 04:58:12 -04:00
Peter Farmer
16994bbdca cloudstack: use paging for listVirtualMachines (#40018)
Paging wasn't implemented, so once a cs domain has over 500 (default page size) VMs, Ansible can no longer find newly created VM.
2018-05-12 09:46:49 +02:00
Tim Rupp
06f76d6407
Removes ignores for f5 (#40038)
Removes ignores for f5 from unit tests and fixes any issues that
are being suppressed by the ignores
2018-05-11 17:12:17 -07:00
Tim Rupp
383a4f026e
Various f5 modules fixes (#40037)
* Add members to bigip_gtm_pool
* Add monitors to bigip_gtm_pool
* Add availability_requirements to bigip_gtm_pool
* Refactor bigip_gtm_pool
* Normalize the product value returned by gtm facts
* Corrected various documentation
* Updated various F5 coding conventions
* Add partition to bigip_static_route
* Added more unit tests
2018-05-11 14:07:28 -07:00
Tim Rupp
61e7c77dec
Various bigip gtm server and vs enhancements (#40033)
* Refactor bigip_gtm_virtual_server
* Add translation_address to bigip_gtm_virtual_server
* Add translation_port to bigip_gtm_virtual_server
* Add availability_requirements to bigip_gtm_virtual_server
* Add monitors to bigip_gtm_virtual_server
* Add virtual_server_dependencies to bigip_gtm_virtual_server
* Add link to bigip_gtm_virtual_server
* Add limits to bigip_gtm_virtual_server
* Add partition to bigip_gtm_virtual_server
* Fix bigip_gtm_server to correctly create other server types
2018-05-11 13:38:04 -07:00
Tim Rupp
1aa248f4e2
Adds various features to bigip virtual server (#40031)
* Add type to virtual_server
* Add address_translation to virtual_server
* Add port_translation to virtual_server
* Add ip_protocol to virtual_server
* Add firewall_enforced_policy to virtual_server
* Add firewall_staged_policy to virtual_server
* Add security_log_profiles to virtual_server
2018-05-11 13:09:59 -07:00
Tim Rupp
d312c2aed7
Various bigiq fixes (#40024)
Udpdating coding conventions
2018-05-11 12:59:29 -07:00
Tim Rupp
ea77c0d4f5
Adds the bigiq regkey license assignment module (#40025)
This module can be used to assign licenses to a bigip from a bigiq
regkey pool
2018-05-11 12:12:59 -07:00
Tim Rupp
00a6b19e58
Fixes and additions for f5 modules (#39986)
Small fixes in the f5 module utils. I believe the action plugins now
work consistently across types of connections
2018-05-11 11:45:42 -07:00
Brian Coca
8654508cbd
added check mode spport to package_facts (#39801)
* added check mode spport to package_facts

fixes #39789

* also service_facts
2018-05-11 14:04:08 -04:00
Brian Coca
95655fae5c
Configurable list of facts modules (#31783)
* configurable list of facts modules

 - allow for args dict for specific modules
 - add way to pass parameters
 - avoid facts poluting test
 - move to 'facts gathered' flag
 - add 'gathering' setting tests
2018-05-11 13:59:54 -04:00
Alex Stephen
7c510a2549 New Module: GCP Compute Instance Templates (#38907) 2018-05-11 10:50:32 -07:00
Martin Krizek
dccb0d035b
vault: check dir existence before creating a file (#40010) 2018-05-11 19:29:44 +02:00
lu1as
21004d86f9 "route" has to be the first option in ufw command (#31756)
For supporting deletion of ufw routes, route option has to be placed before delete option
2018-05-11 16:21:27 +01:00
Tim Rupp
48e5791860
Minor fixes and additions to f5 modules (#39987)
* Fixes to docs
* Fix escaping quotes in bigip_command
* F5 coding conventions cleanup
* “warn” and “chdir” parameters added to bigip_command
2018-05-11 07:55:48 -07:00
znantho
fff7915faa [aws][doc] Update documentation for wait_timeout option (#39875)
Based on the documentation, 'wait_timeout' is 'Used in conjunction with instance_ids option'.  This lead me to believe that I could not use this parameter to try and solve the 'Waited too long for ELB instances to be healthy' error I was experiencing.
2018-05-11 07:44:46 -07:00
Toshio Kuratomi
03194880c1 Set prev_state in the state functions
This seems a little like duplicating code since all of the called
functions need it but prev_state isn't part of argument parsing so it
doesn't belong in the toplevel main() function.
2018-05-11 06:35:03 -07:00
Toshio Kuratomi
9be31fc79b Don't pass b_path into state functions; those transform to byte strings on their own
It feels like this repeats itself because it pulls the creation of
a byte string for path into every state function.  However, it actually
cleans the API by only passing a single parameter for a thing (the path)
instead of sending it in twice.
2018-05-11 06:35:03 -07:00
Toshio Kuratomi
e17ee368e3 Improve comments about file_commmon_arguments 2018-05-11 06:35:03 -07:00
Toshio Kuratomi
160f2ace51 Switch from calling exit_json() to returning results
Well organized programs should only have a few successful exit points.

This commit moves all of the successful exit points for the file module
into the main() function.  Other functions return their results to the
main function which can then choose whether there is more procesing to
do before exit or not.
2018-05-11 06:35:03 -07:00
Toshio Kuratomi
cac11f9b80 Port away from fail_json()
Use an exception to return failures rather than fail_json().  This way
we can easily catch the failures if the calling code decides it can deal
with it.  This has the side effect of making it easier to unittest this
code as we can catch the expected exceptions instead of having to catch
the interpreter exiting and then parse stdout for the expected data.
2018-05-11 06:35:03 -07:00
Brian Coca
fc57f7bd5f fix comma 2018-05-11 09:18:31 -04:00
Ed Schaller
5ac41ee8d8 Fix interfaces_file to accept allow-* (#37847) 2018-05-11 13:47:06 +01:00
Felix Fontein
d14d4d8cab Improving documentation: make more general (less Let's Encrypt specific), and improve formatting. (#39979) 2018-05-11 03:45:11 -04:00
Martin Krizek
2db375e4aa
apt_key: clarify the keyring option in docs (#39950) 2018-05-11 07:45:20 +02:00
Martin Krizek
b2929f0eba
Fix callback._dump_results to dump vaulted data v2 (#39975) 2018-05-11 07:44:29 +02:00
Monty Taylor
fea71d2767 Update Jesse Keating's github id (#39904)
Jesse is no longer j2sol, he's now omgjlk.
2018-05-11 07:38:15 +02:00
Tim Rupp
c5fa718174
Adds bigip_device_license module (#39985)
This module can be used to license and unlicense BIGIP devices. This
does not include licensing them via BIGIQ. To do that, use BIGIQ modules
2018-05-10 21:44:59 -07:00
Zim Kalinowski
a8b4ce5c5d fixed data disk issue crash (#39716) 2018-05-11 11:44:34 +08:00
Toshio Kuratomi
4e2876be9f Initial refactor of the file module
* Separate the logic for each state into separate functions
* Start the process of separating out initialization (pre-processing of
  parameters that cannot be done via arg spec) from the logic to
  implement each state.
* Start the process of raising exceptions for errors and returning
  result values from each state implementing function   Goal is for all
  fail_json's to be consolidated into exception handlers at the toplevel
  and for there to be only one exit_json() at the toplevel.
2018-05-10 14:48:28 -07:00
Toshio Kuratomi
6b6c4914d2 Initial cleanup of file module
* Remove use of six.b as Python-2.6+ have byte literals.
* Make AnsibleModule a global object so we'll have access to it in all
  the functions we're going to break this up into.
* Rework the parameters so things that are in file_common_args are used
  from file_common_args or the reason for deviation is documented.
* Remove validate as a parameter: this should be taken care of by
  removing it from params before the copy and template action plugin
  invoke file.
* Rename diff_peek to _diff_peek as it is an internal parameter.
* add module_name execute_module call to assemble so that it is more greppable
2018-05-10 14:48:28 -07:00
Toshio Kuratomi
d994595660 Make the copy module pass correct parameters to file module 2018-05-10 14:48:28 -07:00
Toshio Kuratomi
b9a00372c2 Categorize FILE_COMMON_ARGS
Some file_common_args are not common to all file modules.  Divide the
args into categories for a future refator of this into a separate
file_argspec.
2018-05-10 14:48:28 -07:00
Tim Rupp
4d691e9d7b
Various fixes and features for bigip modules (#39972)
* Removed forwarders parameter that did not work
* Updated coding conventions
* Added ssl_cipher_suite and ssl_protocols to bigip_device_httpd
* Added more unit tests
2018-05-10 10:59:49 -07:00
Jacob McGill
67f387bc3b Update default for dscp to not allow APIC to handle it (#39970) 2018-05-10 19:57:20 +02:00
Tim Rupp
742fd3a91a
Adds misc fixes for gtm facts module (#39966)
Codifies some parameters and fixes f5 coding conventions
2018-05-10 09:57:27 -07:00
Tim Rupp
84136c0248
Adds the bigip gtm monitor bigip module (#39965)
This module can be used to manage bigip monitors on a bigip's GTM
2018-05-10 09:57:17 -07:00
Tim Rupp
08516df29d
Adds bigip gtm monitor firepass module (#39964)
This module can be used to manage firepass monitors on a bigip's GTM
2018-05-10 09:30:06 -07:00
Tim Rupp
115ba79f10
Adds the bigip gtm monitor https module (#39943)
This module is used to manage the HTTPS monitors on a GTM
2018-05-10 08:47:12 -07:00
Tim Rupp
4f703cf299
Adds module for F5 gtm tcp half open monitors (#39939)
This module can assist in managing TCP half open monitors in GTM
2018-05-10 08:46:53 -07:00
Tim Rupp
632a39232c
Adds the bigip gtm monitor tcp module (#39942)
This module can be used to manage tcp monitors on GTM
2018-05-10 08:46:23 -07:00
Rostyslav Davydenko
5f7c7becde aci_l3out: Add initial ACI l3Out implementation (#37570)
* Initial implementation of ansible ACI L3Out module

* Small documentation and parameter name fixes

* fix copy-paste error

* fix sanity for version_added = 2.6

* Removed deprecated options. Added PIM protocol support

* aci_l3out: add more examples and query option

* Handle DSCP option properly
2018-05-10 16:29:49 +02:00
Alex Stephen
7cfbf43f4b New Module: GCP Compute Instances (#38906) 2018-05-10 07:29:13 -07:00
Tim Rupp
868c2630dd
Adds bigip gtm monitor http module (#39944)
This module can be used to manage http monitors on a GTM
2018-05-10 06:26:13 -07:00
Martin Krizek
a1620ee2e0
git: clarify the archive option in docs (#39956) 2018-05-10 14:39:42 +02:00
Matthew Stone
e80ea39903 Adding slxos_l2_interface module (#39309) 2018-05-10 13:17:35 +01:00
Matthew Stone
fb457b4200 Adding slxos_linkagg module (#39190) 2018-05-10 13:06:57 +01:00
Ikrom
9254f67f3e Update firewalld.py (#39951)
Typo fixed

+label: docsite_pr
2018-05-10 12:13:53 +02:00
Trishna Guha
f1103a7a02
remove purge from nxos_logging doc, argspec (#39947)
* remove purge from nxos_logging doc, argspec

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

* shippable

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-10 15:28:37 +05:30
Matthew Stone
a8156c52d4 Adding slxos_interface module (#39123)
* Adding slxos_interface module

* Fixing sanity checks

* Fixing slxos_config tests for fixture change in slxos_interface
2018-05-10 10:09:42 +01:00
Ricardo Carrillo Cruz
56c5567912
Exit admin mode properly on iosxr_config (#39594)
Fixes #38811

When using 'admin' in iosxr-config, we need to pass an end
to config terminal session but also pass exit so we exit admin
mode.
2018-05-10 10:36:37 +02:00
Dag Wieers
d7f3d3b867
Fix module validation checks and remove old params (#39926)
This PR includes:
- Fixes to the majority of module validation issues
  (deliberate inconsistencies between docs and arg_spec)
- Removal of deprecated parameters 'method' and 'protocols'
- A few typos in the documentation

There are still some left-over validation errors, some are deliberate
(like doc strings as default to indicate ranges, etc.)
2018-05-10 08:47:08 +02:00
Tim Rupp
64ee8da3f1
Adds the bigip_gtm_pool_member module (#39937)
This module can be used to manage individual pool members on a bigip's
GTM installation
2018-05-09 19:13:52 -07:00
Kami Gerami
3d315244af urls: fix typo in examples section (#39777) (#39778) 2018-05-10 12:02:17 +10:00
Tim Rupp
ad5fdf5eb7
Fixes for bigip_gtm_wide_ip (#39931)
Added the irules parameter. Misc corrections of invalid parameter
names and internal behaviors.
2018-05-09 17:28:07 -07:00
Andrew Gaffney
1cf07028d4
Don't display host pattern warning for empty groups (fixes #35255) (#39927) 2018-05-09 14:13:48 -05:00
Brian Coca
cbb6a7f4e8
Enabled unsafe and vault in JSON (#38759)
* allow to load json marked as unsafe or vault

 * centralized json code/decode, add vault support
 * use generics to allow for more varied inputs
 * allow inventory to dump vault w/o decrypting
 * override simplejson also
 * add entry for unsafe also
 * load vaulted and unsafe json, support unvaulting if secrets provided
2018-05-09 14:01:51 -04:00
Andrew Gaffney
ff16e993be Fix task banner with 'actionable' callback when using templates in name (#38165)
This fixes #31074.
2018-05-09 13:57:28 -04:00
Anil Kumar Muraleedharan
3c32b483bc Fix for NameError (#39665)
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
2018-05-09 17:09:25 +01:00
scottmishra
2b2bfc8032 Update panos_security_rule.py (#39036)
<!--- Your description here -->

+label: docsite_pr
2018-05-09 09:49:41 -05:00
Dave
5f0e6b2dc3 Update panos_op.py (#39013)
<!--- Your description here -->
The examples were apparently pasted from panos_object and the module name wasn't updated.
+label: docsite_pr
2018-05-09 09:47:42 -05:00
Kevin Breit
c36aa6ae50 Panos/doc fragment (#37696)
* Create PanOS module documentation fragment

- Module documentation fragment currently holds 3 parameters
- It most likely won't be used in every single module since there is
some variance

* Modified PanOS module for use doc_frags

- Where documentation is consistent, module documentation now uses a
documentation fragment instead of all documentation being contained in
the module.

* Formatting and syntax error fixes

Updated some formatting errors to make ansibot happy.

* Revisions for grammar
2018-05-09 09:13:22 -05:00
Chris Smolen
75304bd121 Update ios_system.py (#39623)
<!--- Your description here -->
Typo in the example of `domain_search`, was `domain-search`should be `domain_search`
+label: docsite_pr
2018-05-09 14:44:27 +01:00
Filippo Civiletti
c32aef74d5 expect: Fix typo in examples (#39900) 2018-05-09 13:55:17 +02:00
Abhijeet Kasurde
c164069079
VMware: new module : vmware_tag_facts (#39889)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-09 13:38:26 +05:30
Martin Krizek
bf702e6d88
dnf: handle error when latest pkg not found (#39720)
* dnf: handle error when latest pkg not found

* Add integration test
2018-05-09 10:05:00 +02:00
Abhijeet Kasurde
3c389aee73 VMware: Add more robust logic to deal with VM moref (#39462)
This fix adds more robust logic to deal with virtual machine
managed object and its comparsion.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-09 00:53:01 -04:00
Matt Martz
ea489b3f33
Update missed private doc for import_role (#39873) 2018-05-08 15:46:45 -05:00
Toshio Kuratomi
3e64036684 Fix encoding issue when parsing plugin examples
This caused a non-fatal traceback when building, for example, the module
documentation for the debug module.
2018-05-08 12:21:52 -07:00
Pilou
2397ca1a7e Fix unset ansible_virtualization_role (#39514)
Error was:
AttributeError("'str' object has no attribute 'startwith'",)

Closes #39138
2018-05-08 23:39:38 +05:30
Piotr Płazieński
0296c8466a Don't update cpu/memory allocation in configspec if there is no change. (#39790)
Fixes #38941
2018-05-08 21:54:50 +05:30
Nathaniel Case
c6270e15a6
Remove provider (and transport, where applicable) from consideration when not using connection=local (#39555)
* Remove provider (and transport, where applicable) from consideration

* Add tests that misplaced transport does not fail task
2018-05-08 12:06:37 -04:00
Matt Martz
384a0d8b01
Deprecate private for include_role (#39821) 2018-05-08 10:31:56 -05:00
Trishna Guha
f08332acb4
nxos enable mode (#39355)
* nxos enable mode

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

* fix prompt

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

* Add authorize,auth_pass

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

* remove byte string from exec_cli_command

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

* Add on_become test

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

* removed_in_version

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-08 15:31:02 +05:30
Felix Fontein
83df7249fd Renaming letsencrypt -> acme_certificate (#39816)
* Renaming letsencrypt -> acme_certificate.

* Also renaming in BOTMETA.yml.
2018-05-08 09:17:40 +02:00
saichint
e3bfbe5875 fix nxos_snmp_user issues (#39760)
* fix nxos_snmp_user issues

* shipppable fix
2018-05-08 11:57:12 +05:30