Commit Graph

171 Commits (09066f1518bea7b92865196ea2fe64f45e7ce73c)

Author SHA1 Message Date
chouseknecht be2a50547e Moved Conditional class to netcfg. 2016-12-08 11:24:05 -05:00
Peter Sprygada ab210862f0 initial add of junos_template
This adds a new module, junos_template, that can read in a template
config and push the changes to the device.  It can also backup the
current config.  This module is implemented over cli
2016-12-08 11:24:05 -05:00
Peter Sprygada fb7d5e798c initial add of junos_command module
This adds a new module, junos_command that can be used for sending commands
to Juniper JUNOS based devices.   The junos_command module is implemented
over a cli transport
2016-12-08 11:24:05 -05:00
Peter Sprygada 8303eadff1 update eos_config doc string and return values
This change update the return values from eos_config to be consistent with
all network config modules.  This will now return updates and responses
from the module
2016-12-08 11:24:04 -05:00
Peter Sprygada eb5f9c216b update eos_template doc string and return values
This updates the return values form eos_template to be consistent
across all template modules.  This change now returns updates and
respones
2016-12-08 11:24:04 -05:00
Peter Sprygada 279ca048ae update eos_command doc strings and return values
This change updates the returns values from eos_command to be consistent
with network modules. It now returns stdout, stdout_lines and failed_conditionals
2016-12-08 11:24:04 -05:00
Peter Sprygada 79b50f5cf8 update nxos_config doc strings and return values
This commit unifys the return values for the nxos_config module to always
return updates and responses
2016-12-08 11:24:04 -05:00
Peter Sprygada 4873e8ab12 update nxos_template doc strings and return values
This updates the nxos_template doc string to unify the return values
across all network modules.  This change now returns stdout, stdout_lines
and failed_conditionals
2016-12-08 11:24:04 -05:00
Peter Sprygada 00d3e33dbf update nxos_command doc strings and return values
This modifies the return values to make them consistent across all
network command modules.  The module now returns stdout, stdout_lines
and failed_conditionals
2016-12-08 11:24:04 -05:00
Peter Sprygada 25d724a88d update ios_template doc strings and return values
Sets the return values from ios_template to be consistent with the rest
of the network modules.  Return values are now updates and responses
2016-12-08 11:24:04 -05:00
Peter Sprygada d33b840ec6 update ios_config doc strings and return values
This changes the return values to be consistent across all network
config modules. The return values are now updates and responses
2016-12-08 11:24:04 -05:00
chouseknecht c690b318da Adding nxos_nxapi module. 2016-12-08 11:24:03 -05:00
Michal Svab 0676ecc03c Clarify get_url timeout documentation 2016-12-08 11:24:03 -05:00
chouseknecht e66a74531f Adding eos_eapi module. 2016-12-08 11:24:03 -05:00
Peter Sprygada bc9aacd832 bug fix for eos_config module
This addresses a bug in the eos_config module that would prevent it
from running properly.  The module should now properly process the config
and the candidate
2016-12-08 11:24:03 -05:00
Peter Sprygada c5255a1d9e initial add of ios_template module
This adds a new module for working with IOS devices and building configurations
using templates.
2016-12-08 11:24:03 -05:00
Peter Sprygada 69ab2e8909 initial add of ios_config module
This adds a new module ios_config that can be used for configuring
IOS devices.
2016-12-08 11:24:03 -05:00
Peter Sprygada cca8a24d7e bug fix on parameter in eos_config
The eos_config module has a bug where its trying to pass an argument
that doesn't exist.  This fixes that problem, removing the offending
keywork argment
2016-12-08 11:24:03 -05:00
Peter Sprygada 7700ec1f4c fixup docstring in nxos_config module 2016-12-08 11:24:03 -05:00
Peter Sprygada 9a90721720 initial add of new module eos_template
The eos_template module works by allowing configurations to be pushed
to Arista EOS devices that can be templated by the Ansible Jinja2
template engine
2016-12-08 11:24:02 -05:00
Peter Sprygada 022bcbd9e8 initial add of nxos_template module
The nxos_template module worksw by allowing configurations to be pushed
to Cisco NXOS devices over CLI or NXAPI and templated using the Ansible
Jinja2 template engine
2016-12-08 11:24:02 -05:00
Barry Peddycord III 7f86da31b9 Removing alpha-stage modules. 2016-12-08 11:24:02 -05:00
Peter Sprygada 029786a4c5 initial add of new module nxos_command
This adds a new module nxos_command that can be used to send arbitrary
commands to NXOS devices.  The module includes an argument that allows
the responses to be evaluated and causes the module not to return
control to the playbook until a set of conditions has been met.
2016-12-08 11:24:02 -05:00
Scott Suehle d9a071089b Adding files to ansible core modules. 2016-12-08 11:24:02 -05:00
Peter Sprygada d3b826dda2 initial add of eos_command module
This adds a new module eos_command to network/eos.  The eos_command module
is used for sending arbitrary commands to Arista EOS devices.  It includes
arguments that allow the module to wait for specific values before the
module returns control to the playbook or fails
2016-12-08 11:24:02 -05:00
Peter Sprygada ad7704c802 initial add of eos_config module
This adds a new module for pushing configuraitons to eos devices in a
reliable and repeatable fashion.  It includes support for templating
configurations and backing up the current config prior to pushing out
changes.  This module works over either CLI or EAPI.

This PR has a dependency on ansible/ansible PR #14009 being merged
2016-12-08 11:24:02 -05:00
Peter Sprygada 97f666d58d initial add of new nxos_config module
This adds a new module for managing configuraiton files for Cisco NXOS
devices.  It provides configuration file management including templating
and backing up the current configuration.

This PR has a dependency on ansible/ansible PR # 14012
2016-12-08 11:24:02 -05:00
techraf 7d09792758 Added 'backup' parameter to get_url module 2016-12-08 11:24:00 -05:00
Brian Coca 42d0ce8744 corrected version_added for new temp_dest feature 2016-12-08 11:23:50 -05:00
cspollar 7ac010977b Fixed typo in uri module example 2016-12-08 11:23:50 -05:00
sysadmin75 12c2c2b436 Adds tmp_dest option to get_url module. Addresses the issue in ansible/ansible#9512 2016-12-08 11:23:45 -05:00
Toshio Kuratomi f6353a548c Document and return an error if httplib2 >= 0.7 is not present. We
can't use httplib2 0.6.x and below because they do not verify TLS
certificates and thus are insecure.

Fixes #1875
2016-12-08 11:23:44 -05:00
Toshio Kuratomi d5f3ac2a1d Remove debugging 2016-12-08 11:23:41 -05:00
Toshio Kuratomi 931fa9b6b2 xmlcharrefreplace is only for encoding, not for decoding :-( 2016-12-08 11:23:41 -05:00
Brian Coca 0540769677 specified that uri must be uppercase 2016-12-08 11:23:41 -05:00
Brian Coca 5b1a508d6a restored quotes to checksum description to avoid breaking docs 2016-12-08 11:23:39 -05:00
muszynski@so1.net 2e3ad2b80a description for the get_url module describing checksum verification before file download 2016-12-08 11:23:39 -05:00
Sam Mingo 75473c0fd0 Update get_url.py
Fixed typo with header parameter to get_url in the documentation.
2016-12-08 11:23:35 -05:00
Colin Hutchinson 9d77cef5be Remove the sample SHA256
putting a full sha256 made the width of the table in the generated docs not fit on some screens
2016-12-08 11:23:34 -05:00
Toshio Kuratomi 1f9580f257 Quote checksum description to fix docs 2016-12-08 11:23:30 -05:00
muffl0n 6482d1344a Allow additional hashing algorithms. Directly use hashlib and check if used algorithm is supported. 2016-12-08 11:23:28 -05:00
Brian Coca 3b94910d4e minor doc fixes to get_url 2016-12-08 11:23:26 -05:00
Brian Coca e5fe763474 fixed version added 2016-12-08 11:23:26 -05:00
Dan 5b4e7c797f Added header support
Added the ability to pass custom http headers to the fetch_url method.
2016-12-08 11:23:25 -05:00
Brian Coca f15ce1433a added version_added to body_format in uri 2016-12-08 11:23:25 -05:00
Brian Coca 87c8d016dc added version_Added to get_url's force_basic_auth 2016-12-08 11:23:22 -05:00
Iiro Uusitalo d6fc0ac5be uri.py is not using module_utils/urls.py from ansible core 2016-12-08 11:23:21 -05:00
Hennadiy (Gena) Verkh 098126807d Update uri.py
Added methods 'TRACE', 'CONNECT' from https://www.rfc-editor.org/rfc/rfc2616.txt, section 5.1.1
Added method 'REFRESH'
2016-12-08 11:23:19 -05:00
Hennadiy (Gena) Verkh 852c232b2d Removed method restriction in uri module 2016-12-08 11:23:19 -05:00
Iiro Uusitalo b92dabb9fb Refactor force basic auth, now all modules which use fetch_url() can use force_basic_auth 2016-12-08 11:23:19 -05:00
James Meickle 8197d7e640 Change uri debug example 2016-12-08 11:23:15 -05:00
Annika Backstrom 6b2c89a422 Force redownload if sha256sum does not match 2016-12-08 11:23:13 -05:00
Toshio Kuratomi 5118d0e3b1 Add note about redirects proxies
Fixes #1574
2016-12-08 11:23:12 -05:00
Toshio Kuratomi 2e7dcf3317 Small cleanups. * Import url(lib|parse|lib2) if needed by the module rather than relying on module_utils.urls to do so. * Remove stdlib modules from requirements * Use the if __name__ conditional for invoking main() 2016-12-08 11:23:11 -05:00
murdochr aae140e6cd Change docs to reflect correct when syntax for matching variable strings as per MD's forum post as this fails with unhelpful error otherwise.
https://groups.google.com/forum/#!topic/ansible-project/D2hQzZ_jNuM
2016-12-08 11:23:11 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Toshio Kuratomi b6257f73b4 Properly flip default for verifying server cert. Add nice error messages when the cert is invalid 2016-12-08 11:23:02 -05:00
Toshio Kuratomi a4497a7ddf Change uri module to validate ssl certs by default 2016-12-08 11:23:02 -05:00
whiter 8ee2102993 Doc update to highlight use of body_type parameter 2016-12-08 11:23:02 -05:00
Toshio Kuratomi 9eac68b417 Fix problem writing binary content to a temporary file in the uri module.
Fixes https://github.com/ansible/ansible/issues/10938
Fixes https://github.com/ansible/ansible/issues/7606
2016-12-08 11:23:00 -05:00
Schmitt Christian cc71372182 Removed the wrong Note
Currently as already in the description, this module works with proxy settings.
2016-12-08 11:22:54 -05:00
Sébastien Bocahu f88f895795 Removes YAML body_format option
It would require adding a dependency to the YAML module while it might
not provide much benefit (has anybody seen a HTTP API taking YAML as
input ?)
2016-12-08 11:22:51 -05:00
Sébastien Bocahu 4af3b60167 Add body_format for handling of JSON and YAML body
body_format is a new optional argument that enables handling of JSON or
YAML serialization format for the body argument.
When set to either 'json' or 'yaml', the body argument can be a dict or list.
The body will be encoded, and the Content-Type HTTP header will be set,
accordingly to the body_format argument.

Example:

- name: Facette - Create memory graph
  uri:
    method: POST
    url: http://facette/api/v1/library/graphs
    status_code: 201
    body_format: json
    body:
      name: "{{ ansible_fqdn }} - Memory usage"
      attributes:
        Source": "{{ ansible_fqdn }}"
        link: "1947a490-8ac6-4bf2-47c1-ff74272f8b32"
2016-12-08 11:22:51 -05:00
zitterbacke 264a16d822 fix uri modul for JSON-escape quotation marks
consider the following response body (content) of a REST/JSON webservice containing escaped quotation marks:

```json
{ "key": "\"works\"" }
```

decoding this string not as raw will lose the backslash as JSON escape. later json.loads will fail to parse.

Inspired by [this thread](https://groups.google.com/forum/#!topic/ansible-project/kymtiloDme4) on the mailing list and the following python shell code:

```python
import json
string=r'{ "key": "\"works\"" }'
json.loads(string)
json.loads(string.decode('raw_unicode_escape'))
json.loads(string.decode('unicode_escape'))
```
2016-12-08 11:22:47 -05:00
Dan Rue d3c686d632 Do not mark "skipped" when changed is false
When using the "creates" option with the uri module, set changed
to False if the file already exists. This behavior is consistent with
other modules which use "creates", such as command and shell.
2016-12-08 11:22:43 -05:00
Toshio Kuratomi 104b2d684c Add text/json as a mimetype to try deserializing
Fixes #503
2016-12-08 11:22:33 -05:00
Toshio Kuratomi 34d65647bf Move from md5 to sha1 to work on FIPS-140 enabled systems 2016-12-08 11:22:25 -05:00
Michael DeHaan 677ed39cb4 Renames. 2016-12-08 11:22:25 -05:00
Michael DeHaan ef2a2b9093 package files 2016-12-08 11:22:22 -05:00
Michael DeHaan 213e518165 file extensions! 2016-12-08 11:22:22 -05:00
Michael DeHaan c7eec45b73 Restructuring. 2016-12-08 11:22:22 -05:00