Commit graph

21148 commits

Author SHA1 Message Date
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