summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils
Commit message (Collapse)AuthorAgeFilesLines
* Add partition uuid to facts for Linux. (#16986)Erik Berg2016-08-081-0/+14
| | | Works by looking for partition name in /dev/disk/by-uuid
* YAML treats some unquoted strings as booleans. For instance, (#16961)Toshio Kuratomi2016-08-051-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | uri: follow_redirects: no Will lead yaml to set follow_redirects=False. This is problematic when the module parameter is not a boolean value but a string. For instance: follow_redirects = dict(required=False, default='safe', choices=['all', 'safe', 'none', 'yes', 'no']), Our parameter validation code ends up getting follow_redirects="False" instead of "no". The 100% fix is for the user to quote their strings in playbooks like: uri: follow_redirects: "no" But we can fix quite a few common cases by trying to switch "False" back into the string that it was specified as. We only do this if there is only one correct choices value that could have been specified. In the follow_redirects example, a value of "True" only maps back to "yes" and a value of "False" only maps back to "no" so we can do this. If choices also contained "on" and "off" then we couldn't map back safely and would need to force the module author to change the module to handle this case. Fixes parts of the following PRs: * https://github.com/ansible/ansible-modules-core/pull/4220 * https://github.com/ansible/ansible-modules-extras/pull/2593
* Merge pull request #16879 from alikins/gce_module_utilsRyan Brown2016-08-042-2/+4
|\ | | | | Fix import of gce/gcdns without a libcloud module
| * Fix import of gce/gcdns without a libcloud moduleAdrian Likins2016-07-292-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The module level function defs for gcdns_connect() and gce_connect() provide a default arg for 'provider' that references into the libcloud module. If the libcloud modules were not installed, the gce/gcdns python modules would throw ImportError. Let the provider arg default to None and if not provided, set it to the default libcloud.compute.types.Provider.* value if the modules are installed.
* | Fix the security rules name duplication of azure_rm_common. (#16897)Hidetoshi Hirokawa2016-08-041-3/+3
| |
* | added y/n to list of module booleansBrian Coca2016-08-041-2/+2
| |
* | refactored ethtool data to allow for other callersBrian Coca2016-08-041-18/+18
| |
* | added pid to backup file name to avoid collisionsBrian Coca2016-07-291-1/+1
| |
* | Fix syntax error in json/jsonarg type parserRyan S. Brown2016-07-281-1/+1
|/ | | | | | The lack of a comma caused the statement to always evaluate as a `TypeError` when python interpreted `value (list, tuple, dict)` to call value with the arguments list, tuple, and dict.
* Refactored gce util module to support other GCP services (#15924)William Albert2016-07-283-82/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring of the existing GCE utility module to support other projects on Google Cloud Platform. The previous gce.py module was hard-coded specifically for GCE, and attempting to use it with other projects in GCP failed. See https://github.com/ansible/ansible/pull/15918#issuecomment-220165913 for more detail. This has also been an issue for others in the past, although they've handled it by simply duplicating some of the logic of gce.py in their own modules. - The existing gce.py module was renamed to gcp.py, and modified to remove any imports or other code that refers to libcloud.compute or GCE (the GCE_* params were retained for compatibility). I also renamed the gce_connect function to gcp_connect, and modified the function signature to make supplying a provider, driver, and agent information mandatory. - A new gce.py module was created to handle connectivity to GCE. It imports the appropriate libcloud.compute providers and drivers, and then passes them on to gcp_connect in gcp.py. The constants and function signatures are the same as the old gce.py, so compatibility with existing modules is retained. - A new gcdns.py module was created to support PR ansible/ansible-modules-extras#2252 for two new Google Cloud DNS modules, and to demonstrate support for a non-GCE Google Cloud service. It follows the same basic structure as the new gce.py module, but imports from libcloud.dns instead.
* jsonarg bikeshed to json, arg type implies 'arg'Brian Coca2016-07-261-0/+1
|
* Adding ethtool info to Ansible interface facts (#16513)Joe (rook)2016-07-241-2/+21
| | | | | This will give the user details on how the interfaces are configured. They user could query to see if TSO, GSO, etc are enbaled on an interface.
* Find places where ziploader is used and change them to ansiballz so that ↵Toshio Kuratomi2016-07-213-3/+3
| | | | people aren't confused when they google for information.information (#16715)
* Merge pull request #16728 from privateip/netcfgPeter Sprygada2016-07-151-1/+3
|\ | | | | minor update to the default comment tokens in netcfg
| * minor update to the default comment tokens in netcfgPeter Sprygada2016-07-151-1/+3
| | | | | | | | | | * adds checkout /* and */ as comment delimiters * now raises exception if invalid output keyword value is used
* | adds new function to check config for unsupported commandsPeter Sprygada2016-07-151-0/+13
|/ | | | | | Some commands fail when being set so the load_config function will now filter those commands out and return them in the result key as filtered.
* add common argument save_config to vyos_argument_specPeter Sprygada2016-07-141-6/+6
|
* Fix find_image() not matching on tagChris Houseknecht2016-07-111-2/+3
|
* removed redundant True/False cause `arg.lower()`Brian Coca2016-07-111-2/+2
|
* add new features to ios shared modulePeter Sprygada2016-07-111-67/+109
| | | | | | | | * add load_config() for loading a set of configuration commands * add load_candidate() function for loading a candidate config * updates shared module to provide NetworKModule instead of get_module * fixes Cli transport implementation for 2.2 refactor * updates ios documentation fragments with new options
* adds additional capabilities to diff of network configsPeter Sprygada2016-07-091-99/+91
| | | | | | * diff functions now split out for easier troubleshooting * added dumps() function to serialize config objects to strings * difference() can now expand all blocks instead of just singluar blocks
* adds restconf transport option to ios shared modulePeter Sprygada2016-07-093-6/+174
|\ | | | | | | | | | | | | | | | | | | | | includes changes from PR ansible/ansible#16636 and refactors for the NetworkModule changes new features * ios now supports transport=restcon will additional arguments * ModuleStub refactored into common network shared module * import temporary get_module() function (to be removed prior to 2.2 final)
| * EOS new ModuleStubNathaniel Case2016-07-071-5/+4
| | | | | | | | As per #16575
| * Implement IOS restconfPeter Sprygada2016-07-071-2/+159
| |
| * New ModuleStub solutionNathaniel Case2016-07-071-0/+7
| |
* | add helper factory function to avoid breaking network modules in develPeter Sprygada2016-07-092-48/+55
|\ \ | | | | | | | | | | | | | | | | | | This is a temporary change to keep the get_module() function until all of the network module refactoring is completed to avoid breaking them in devel. The get_module() function should not be used and will be removed before 2.2 final.
| * | Refactor network and eos module_utils to use a subclass instead of factory ↵Toshio Kuratomi2016-07-062-48/+47
| | | | | | | | | | | | function to create the NetworkModule
* | | make timeout decorator for facts have a configurable duration (#16551)jctanner2016-07-081-0/+9
| |/ |/| | | | | | | | | * Add a gather_timeout parameter * update example ansible.cfg * fix play level fact gathering too
* | Net mod ios (#16426)Nathaniel Case2016-07-074-292/+100
|/ | | | | | | | | | | | | | * Update IOS with new NetworkModule * Remove redundant EOS code * `authorize` can get rolled into NetCli * Fix up IOS to where EOS is. * Update IOSXR for NetworkModule * collections is unnecessary
* cloudstack: handle unicode API results in has_changed (#16601)René Moser2016-07-061-5/+13
| | | | | | * cloudstack: handle unicode API results in has_changed * cloudstack: add more case sensitve keys
* Merge pull request #16573 from privateip/networkPeter Sprygada2016-07-061-3/+10
|\ | | | | captures the responses from running commands and adds response to object
| * captures the responses from running commands and adds response to objectPeter Sprygada2016-07-041-3/+10
| | | | | | | | | | | | The Command object can now store the response from executing the command to allow it to be retrieved later by command name. This update will update the Command instance with the response before returning.
* | Merge pull request #16587 from privateip/netcfgPeter Sprygada2016-07-051-6/+7
|\ \ | | | | | | minor bug fixes found in netcfg
| * | minor bug fixes found in netcfgPeter Sprygada2016-07-051-6/+7
| | | | | | | | | | | | | | | * fixes issue with converting config to lines * fixes issue with returning text config with single line
* | | bug fixes in vyos shared modulePeter Sprygada2016-07-051-10/+18
|/ / | | | | | | | | | | * fixes lots of bugs with get_config function to perform correctly * refactors load_config into load_candidate * adds load_config function to convert commands to NetworkConfig
* | Merge pull request #16423 from privateip/netcfgPeter Sprygada2016-07-041-48/+39
|\ \ | | | | | | bug fix in netcfg replace method to handle whitespace argument
| * | updates netcfg to remove dependency on collections modulePeter Sprygada2016-07-041-50/+39
| | | | | | | | | | | | | | | This fixes the netcfg shared lib to be compatable with python versions prior to 2.7.
| * | bug fix in netcfg replace method to handle whitespace argumentPeter Sprygada2016-07-041-1/+3
| |/
* | Merge pull request #16574 from privateip/vyosPeter Sprygada2016-07-041-3/+8
|\ \ | | | | | | add get_config function to vyos shared module
| * | add get_config function to vyos shared modulePeter Sprygada2016-07-041-3/+8
| |/ | | | | | | | | | | This adds a new shard function get_config to retrieve the device configuration either from module arguments or remotely from the device.
* | adds new method to return specific response from command to netcmdPeter Sprygada2016-07-041-0/+14
|/ | | | | | | This adds a new method that will return the output from a specified command that has already been excuted by the CommandRunner. The new method, get_command takes a single argument which is the full name of the command to retrieve.
* Merge pull request #16559 from chouseknecht/azure-rc5Chris Houseknecht2016-07-041-6/+6
|\ | | | | Fix authentication via params and env variables.
| * Fix authentication via params and env vars. Update guide to RC5.Chris Houseknecht2016-07-021-6/+6
| |
* | Merge pull request #16558 from chouseknecht/azure-rc5Chris Houseknecht2016-07-021-74/+60
|\ \ | |/ | | Update and pin to azure-2.0.0rc5
| * Update and pin to azure-2.0.0rc5chouseknecht2016-07-021-74/+60
| |
* | Added and-quit to all commit statements. (#16411)Stian Vikan2016-07-011-1/+1
| |
* | removes dependency on collections module from eos (#16485)Peter Sprygada2016-06-301-4/+4
|/ | | | This removes the dependency on the Python collections module to make it fully compliant with version prior to py2.7
* removes dependency on collections module from netcmdPeter Sprygada2016-06-281-15/+5
| | | | | This change removes the dependency on collections so netcmd is compatable with python versions prior to py2.7
* add holders to partitions (#16446)Lars Fredriksen2016-06-281-10/+15
| | | | | | * add holders to partitions * make holder gathering a function
* Merge pull request #15992 from ogenstad/asaPeter Sprygada2016-06-271-0/+194
|\ | | | | Module util, template action and doc fragment for Cisco ASA