Commit Graph

275 Commits (d3097bf580e08db1f08ffb0b0adc7459201e5b2f)

Author SHA1 Message Date
chouseknecht f5a92e3565 Adding nxos_nxapi module. 9 years ago
Peter Sprygada 6c486cd341 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
9 years ago
Peter Sprygada 23f1d20a5c initial add of ios_template module
This adds a new module for working with IOS devices and building configurations
using templates.
9 years ago
Peter Sprygada d05ceb9e28 initial add of ios_config module
This adds a new module ios_config that can be used for configuring
IOS devices.
9 years ago
Peter Sprygada d64ae18307 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
9 years ago
Peter Sprygada 0df3a0e501 Merge pull request #2941 from privateip/module_eos_template
initial add of new module eos_template
9 years ago
Peter Sprygada 9ee5dc12b6 Merge pull request #2872 from privateip/module_eos_command
initial add of eos_command module
9 years ago
Peter Sprygada 6702496781 Merge pull request #2862 from privateip/module_eos_config
initial add of eos_config module
9 years ago
Peter Sprygada b7c2878136 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
9 years ago
Peter Sprygada fca78058db fixup docstring in nxos_config module 9 years ago
Peter Sprygada 82a051d150 Merge pull request #2897 from privateip/module_nxos_command
initial add of new module nxos_command
9 years ago
Peter Sprygada 6cddd47e67 Merge pull request #2942 from privateip/module_nxos_template
initial add of nxos_template module
9 years ago
Peter Sprygada ef8df6c0ec 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
9 years ago
Peter Sprygada 25dee10814 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
9 years ago
Peter Sprygada d29db07fab 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
9 years ago
Peter Sprygada 332c6a56c5 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
9 years ago
Peter Sprygada 32e238a8f0 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.
9 years ago
Michal Svab 2c3ef42d92 Clarify get_url timeout documentation 9 years ago
Barry Peddycord III a398a36a9d Removing alpha-stage modules. 9 years ago
Scott Suehle 48270402d3 Adding files to ansible core modules. 9 years ago
Brian Coca df222bed86 added missing version_added 9 years ago
techraf 49ec5a6a30 Added 'backup' parameter to get_url module 9 years ago
Brian Coca 1229adb36c Merge pull request #2609 from cspollar/devel
Fixed typo in uri module example
9 years ago
Brian Coca 292a83cba7 corrected version_added for new temp_dest feature 9 years ago
Brian Coca d2eaf33add Merge pull request #1887 from sysadmin75/9512_get_url_tmp_option2
Adds tmp_dest option to get_url module.
9 years ago
cspollar 34f7d7b068 Fixed typo in uri module example 9 years ago
Toshio Kuratomi 22c2789b72 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
9 years ago
Toshio Kuratomi 49ee5dd443 Remove debugging 9 years ago
Toshio Kuratomi 11833906b5 xmlcharrefreplace is only for encoding, not for decoding :-( 9 years ago
Brian Coca f33fba84c0 specified that uri must be uppercase 9 years ago
Brian Coca 144291120e restored quotes to checksum description to avoid breaking docs 9 years ago
JM 7943b3e6b0 description for the get_url module describing checksum verification before file download 9 years ago
Sam Mingo 7982d582d9 Update get_url.py
Fixed typo with header parameter to get_url in the documentation.
9 years ago
Colin Hutchinson ab50943887 Update get_url.py
use an abbreviated sha
9 years ago
Colin Hutchinson 880dc307b0 Remove the sample SHA256
putting a full sha256 made the width of the table in the generated docs not fit on some screens
9 years ago
Toshio Kuratomi 8412adc4f9 Quote checksum description to fix docs 9 years ago
muffl0n 4f0cf6d2ca Allow additional hashing algorithms. Directly use hashlib and check if
used algorithm is supported.
9 years ago
sysadmin75 cd8bfc7695 Adds tmp_dest option to get_url module.
Addresses the issue in ansible/ansible#9512
9 years ago
Brian Coca 587370e2e7 minor doc fixes to get_url 9 years ago
Brian Coca 76344db61e fixed version added 9 years ago
Dan 777d736baa Added header support
Added the ability to pass custom http headers to the fetch_url method.
9 years ago
Brian Coca 03a809a21c added version_added to body_format in uri 9 years ago
Brian Coca ca80b92233 added version_Added to get_url's force_basic_auth 9 years ago
Brian Coca 7ac642f406 Merge pull request #153 from woltage/devel
Refactor force basic auth, now all modules which use fetch_url() can use force_basic_auth
9 years ago
Brian Coca 11c6e6a3f5 Merge pull request #1179 from hver/devel
Allow custom methods in uri module
9 years ago
Iiro Uusitalo afd0222184 uri.py is not using module_utils/urls.py from ansible core 9 years ago
Iiro Uusitalo 4b1b10fa20 Refactor force basic auth, now all modules which use fetch_url() can use force_basic_auth 9 years ago
Hennadiy (Gena) Verkh f190f98b06 Update uri.py
Added methods 'TRACE', 'CONNECT' from https://www.rfc-editor.org/rfc/rfc2616.txt, section 5.1.1
Added method 'REFRESH'
9 years ago
Toshio Kuratomi 27e1aa7d10 Merge pull request #1634 from Eronarn/devel
Change uri debug example
9 years ago
Brian Coca b3d5479612 Merge pull request #687 from abackstrom/sha256-mismatch-redownload
get_url: Force redownload if sha256sum does not match
9 years ago
James Meickle 73390f8ecc Change uri debug example 9 years ago
Toshio Kuratomi 280ccfbb78 Add note about redirects proxies
Fixes #1574
9 years ago
Toshio Kuratomi 4519dd5f4d 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()
9 years ago
murdochr 9040c2f75c 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
9 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 9 years ago
Toshio Kuratomi 5983d64d77 Properly flip default for verifying server cert. Add nice error messages when the cert is invalid 9 years ago
Toshio Kuratomi 7fea93835c Change uri module to validate ssl certs by default 9 years ago
whiter ba35cb8173 Doc update to highlight use of body_type parameter 9 years ago
Toshio Kuratomi b307f7bcba 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
10 years ago
Tom Paine 97b64abf75 Update uri.py
Move choices from description to choices field.
10 years ago
Hennadiy (Gena) Verkh 1f37f2a152 Removed method restriction in uri module 10 years ago
Schmitt Christian 9ebef6275d Removed the wrong Note
Currently as already in the description, this module works with proxy settings.
10 years ago
Sébastien Bocahu b2d570e991 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 ?)
10 years ago
Sébastien Bocahu 6b20c3890f 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"
10 years ago
Brian Coca 42d91951cf Merge pull request #537 from zitterbacke/patch-2
fix uri modul for JSON-escape quotation marks
should fix #121
10 years ago
Dan Rue c2f731e5bd 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.
10 years ago
Annika Backstrom a935baf7dd Force redownload if sha256sum does not match 10 years ago
zitterbacke 22e1b26bea 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'))
```
10 years ago
Toshio Kuratomi 9c6826e928 Add text/json as a mimetype to try deserializing
Fixes #503
10 years ago
Toshio Kuratomi 6317d3a988 Move from md5 to sha1 to work on FIPS-140 enabled systems 10 years ago
Michael DeHaan 0be8798858 Renames. 10 years ago
Michael DeHaan 385a037cd6 package files 10 years ago
Michael DeHaan c8e1a2077e file extensions! 10 years ago
Michael DeHaan 417309a626 Restructuring. 10 years ago
Michael DeHaan 73123b69fa Move modules into subdirectory. 10 years ago
James Cammarata 1ef592ff00 Push the expanduser call on the source down to slurp rather than fetch
Also moves the calculation of the destination file name until after
the slurp of the file contents, since the source as returned by slurp
may now be different, so we want to use that expanded path locally.

Fixes #8942
10 years ago
Will Thames 25c5250025 get_url module: Add timeout parameter 10 years ago
George Yoshida cd0dae890c For content-disposition response header field, try to parse filename parameter even if it's not quoted. 10 years ago
Brian Coca ac14a8d6ad unified calls to fs function vs duplicate functions for file and
directory
10 years ago
James Cammarata a9c2eefd06 Remove erroneous set of status_code causing a traceback in module uri
Fixes #7416
11 years ago
Christian Berendt bbcfda8c18 [get_url] check against lowered stripped sha256sum
The content of the sha256sum attribute should be lowered before comparing it with the calculated sha256sum.

In the following example the used sha256sum uses ABC.. and not abc.. and the check failed. This should not happen.

```
TASK: [get_url url=http://ftp.fau.de/apache/hadoop/common/hadoop-2.4.0/hadoop-2.4.0.tar.gz dest=/home/vagrant/hadoop-2.4.0.tar.gz mode=0644 sha256sum=024326AC68A1A68B5566B10F95609EAAFD9F70CFEB37FCA0E97CBB1674E57C3A] ***
failed: [instance000] => {"failed": true}
msg: The SHA-256 checksum for /home/vagrant/hadoop-2.4.0.tar.gz did not match 024326AC68A1A68B5566B10F95609EAAFD9F70CFEB37FCA0E97CBB1674E57C3A; it was 024326ac68a1a68b5566b10f95609eaafd9f70cfeb37fca0e97cbb1674e57c3a.

FATAL: all hosts have already failed -- aborting
```
11 years ago
James Cammarata 89d61b8a7d Add parameters to get_url for the url username/password
Fixes #6928
11 years ago
James Tanner c69608cbe6 Fixes #6857 Make the url parameter required for get_url 11 years ago
Michael DeHaan b06f5162cd Example cleanup. 11 years ago
Sven Schliesing 898346a468 Update uri 11 years ago
Sven Schliesing d193e5571d Example for queueing build in Jenkins 11 years ago
Michael DeHaan eb1c37c6e1 Merge pull request #6649 from picsolvebryan/devel
Accept status code from a list of valid codes.
11 years ago
bryan hunt dff1fd3b37 Accept status code from a list of valid codes.
(cast the list of acceptable codes to a list of int )
11 years ago
bryan hunt eb9ac9308c Accept status code from a list of valid codes. 11 years ago
bryan hunt 5561fbc427 Accept status code from a list of valid codes. 11 years ago
James Cammarata c68be8b418 Remove validate_certs parameter from fetch_url calls 11 years ago
James Cammarata a1b1182662 Validate SSL certs accessed through urllib*
* Adds another module utility file which generalizes the
  access of urls via the urllib* libraries.
* Adds a new spec generator for common arguments.
* Makes the user-agent string configurable.

Fixes #6211
11 years ago
James Cammarata 09eaa0c920 Fixing the unicode issue in uri for EL6 platforms
Fixes #5869
11 years ago
James Cammarata 0c33cc19bb Handle unicode content in the uri module properly
Fixes #5869
11 years ago
Richard Isaacson acf0e408ae Merge pull request #5826 from romeotheriault/fix_follow_redirects
A fix for uri module regarding following redirects. The old behavior would follow redirects either way. This change clarifies the functionality and makes it a bit more explicit. Comparing the old behavior to the new 'yes' == 'all', 'no' == 'safe' and now 'no' will not follow any redirects. Historic behavior is still supported and documented with a push to the new values.
11 years ago
Eric Hanchrow 837d8e19b9 Clarify doc for get_url
Move a sentence from doc for the "force" option to that for the "dest" option.
11 years ago
James Cammarata b8356b525a When force=yes, get_url should always download the specified file
This is accomplished by not setting the If-Modified-Since header,
and setting "cache-control: no-cache" instead. Note that if the
file content has not changed, the module will still report that
changed=false, as the md5's of the tmp file and existing file are
compared before swapping

Fixes #5104
11 years ago
Pedro Romano b04f197113 Allow the 'PATCH' method in the 'uri' module since 'httplib2' allows it
and some APIs require it.
11 years ago
Romeo Theriault 863bba498c fix following redirects 11 years ago
Michael DeHaan 0d3a74d905 ansible -> ansibleworks 11 years ago
James Tanner 4f9aadcc07 Addresses #5023 Fix import comments 11 years ago
James Tanner 38edad70ac Fixes #5023 Convert all modules to use new snippet import pattern 11 years ago
Michael DeHaan 4c35b7f380 There's a cleaner way to do this, commit to module formatter pending.
Revert "No longer need to reference 'version_added' in docs for these, as this was quite a while ago."

This reverts commit ff0a41d446.
11 years ago
Michael DeHaan 9e4d71203d No longer need to reference 'version_added' in docs for these, as this was quite a while ago. 11 years ago
Michael DeHaan 08996d78d6 Add version_added to all modules missing version_added information, the docs formatter will now
raise errors when omitted, updated changelog with new modules.
11 years ago
jctanner 0ee5792849 Merge pull request #4785 from Tinche/get_url/uri-content-disposition
Modified the get_url module to respect the content-disposition header if...
11 years ago
Tin Tvrtkovic b1fa35ac3d Use the final URL from the finished request instead of the provided URL for filename generation, to properly deal with redirects. 11 years ago
James Laska 1d368f9e1f Correct documentation URLs 11 years ago
Tin Tvrtkovic 8036cb0cab Modified the get_url module to respect the content-disposition header if the destination is a directory and the server provides it.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html, section 19.5.1.
11 years ago
Michael Scherer 93a75a4d83 Fix issue 4433, make sure status is a int rather than a string 11 years ago
Joshua Lund bf5a4cbea4 * Updated SHA-256 functionality in the get_url module
(fixes issue #4277)

* The sha256sum error message now displays the invalid
  destination checksum if it doesn't match the one that
  is specified in the arguments. This is useful for
  debugging purposes.

* Non-alphanumeric characters, including the infamous
  Unicode zero-width space, are removed from the sha256sum
  argument prior to the check.
11 years ago
Serge van Ginderachter 705613acf8 Fix bug in uri where redirect check fails.
When the redirect check fails, the 'status' key is not set in
resp_redir, so we need to check this.
11 years ago
Michael DeHaan ece707bc6e Trim old style var references 11 years ago
Joshua Lund 166ea0e175 * Updated all ansible.cc references in the documentation to point
to ansibleworks.com
* Fixed a few misspelled words
11 years ago
Joshua Lund c96e6c0d1d Removed merge conflict header 11 years ago
Michael DeHaan 6ed171bee5 Merge branch 'sha256' of git://github.com/jlund/ansible into devel
Conflicts:
	library/network/get_url
11 years ago
Jan-Piet Mens 98c1423269 Docs: consistently format playbook EXAMPLES 11 years ago
Jan-Piet Mens 3404a0fc16 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
11 years ago
Joshua Lund 6316a78776 Setting version_added for this feature to 1.3 11 years ago
Joshua Lund 30bd813913 * Added a sha256 method to module_common
* Added a sha256sum parameter to the get_url module to enable
cryptographic verification of downloaded files
* Fixed a few typos in the documentation
11 years ago
Michael DeHaan b363c09a6e Docs standardization 11 years ago
Michael DeHaan 2a479cca52 Fixup fetch doc formatting. 11 years ago
James Martin 79cd04e689 Initial Commit. 12 years ago
Piffey Parlance 87b4c0d194 Fixed bug where if destination was unspecified, changed would not be set, resulting in an UnboundLocalError. 12 years ago
Michael DeHaan cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 12 years ago