Commit graph

333 commits

Author SHA1 Message Date
Peter Sprygada
f46ebf2c30 Merge pull request #3141 from privateip/module_ops_command
initial add of ops_command module
2016-03-11 23:11:43 -05:00
Peter Sprygada
154fc16b0e Merge pull request #3142 from privateip/module_ops_config
initial add of ops_config module
2016-03-11 22:58:32 -05:00
Peter Sprygada
c0de719539 Merge pull request #3222 from jrk07/patch-1
Merged thanks @jrk07
2016-03-11 22:29:11 -05:00
Peter Sprygada
d4e687f894 doc string fixes for eos_config
This updates eos_config with some fixes to the documentation string
2016-03-11 22:11:20 -05:00
Peter Sprygada
416dd73b09 bugfix in eos_template for backing up config
eos_template would connect to the remote device to get the running config
for backup even if backup is not needed.
2016-03-11 22:11:12 -05:00
Peter Sprygada
cf3287b312 minor function clean ups in eos_command
This commit cleans up a couple of functions and removes the json
import to use the json methods from AnsibleModule
2016-03-11 22:10:59 -05:00
jrk07
3cc277bc08 Doc Update: ios_template.py title and example
ios_template.py was named ios_config when viewing docs.  The examples also had net_config still.  Updated those here.
2016-03-10 12:54:41 -08:00
Peter Sprygada
e3ca92e97d bugfix for ios_config module
This commit address a bug in the ios_config module when using the
match: strict argument.  When the argument is used, the module will
compare the configuration block same as match: exact which is not the
intended behavior.  This commit updates the behavior to propertly handle
the strict argument.
2016-03-10 13:34:04 -05:00
Peter Sprygada
11056c8ed2 bugfix for handling match=strict in eos_config
Resolves an issue where match=strict would act like match=exact when
evaluating the configuration
2016-03-10 13:33:48 -05:00
Peter Sprygada
e9ab4d688d bugfix for handling match=strict in iosxr_config
Resolves an issue where match=strict would act like match=exact when
evaluating the configuration
2016-03-10 13:33:41 -05:00
Peter Sprygada
a7f67921fd bugfix for handling match=strict in nxos_config
Resolves an issue where match=strict would act like match=exact when
evaluating the configuration
2016-03-10 13:33:33 -05:00
Peter Sprygada
c17a2c0206 Merge pull request #3138 from privateip/module_ops_template
refactor arguments in ops_template
2016-03-09 22:15:53 -05:00
Matt Martz
3c59eedb9b Don't pass follow_redirects to fetch_url, use module.params instead 2016-03-07 15:34:22 -06:00
Peter Sprygada
b7d7bfa0b1 initial add of ops_config module
This commit adds a new module, ops_config, that allows playbook designers
to create tasks for configuring OpenSwitch over the CLI.  The module
is designed to work directly with configuration mode in OpenSwitch and
therefore only supports the CLI transport option
2016-03-07 06:43:14 -05:00
moyashiki
e851e91b49 Fix ios_command fix
This is not valid YAML commands. So fix it.
2016-03-02 22:13:03 +09:00
Sam Wilson
23b98dae3e Fixed BOOLEANS rendering in docsite 2016-03-02 08:38:35 +11:00
Brian Coca
0bbb7ba38d Merge pull request #3135 from mscherer/improve_uri_doc
Fix non RFC 2606 domain name in doc
2016-02-29 17:52:35 -05:00
Peter Sprygada
1de18ca36b initial add of ops_command module
This commit adds a new module, ops_command, that handles executing commands
on OpenSwitch over the CLI.  Since this module is designed to work with the
OpenSwitch CLI, it only supports the CLI transport option
2016-02-29 11:15:29 -05:00
Toshio Kuratomi
7088f72742 At least for now, set body to raw as it can be either a dict or jsonified-str
Since our validation does conversion as well as validation, I'm not sure
this is entirely correct.  May need to take a look at our conversion
code and re-examine to be sure we're doing it right.
2016-02-29 07:20:39 -08:00
Toshio Kuratomi
3853d2a9a6 Change parameter to type=path
Read as binary for python3 preparedness
2016-02-29 00:38:10 -08:00
Peter Sprygada
b3f232434a refactor arguments in ops_template
This commit refactors the arugments used in ops_template to be strictly
typed and handle by declarative / rest and cli based configurations.  It
also removes old arguments not supported and cleans up the documentation
strings
2016-02-28 23:44:17 -05:00
Michael Scherer
d81a6740ec Fix non RFC 2606 domain name in doc 2016-02-28 11:51:17 +01:00
Peter Sprygada
616b7564ef fixes issue with return docstring
This commit fixes an issue with the return doc string.  The old line
was removed that would prevent the docs form being built correctly
2016-02-26 11:07:25 -05:00
Brian Coca
011c558927 corrected version added 2016-02-24 21:30:09 -05:00
Brian Coca
7162623e86 Merge pull request #2913 from msvab/devel
Clarify get_url timeout documentation
2016-02-23 13:30:39 -05:00
Matt Martz
adf2125339 Indicate in notes that the dependency on httplib2 was removed for v2.1 2016-02-23 11:53:02 -06:00
Matt Martz
7f206fdfe8 Drop dependency on httplib2 in the uri module, instead using ansible.module_utils.urls 2016-02-23 10:35:11 -06:00
Brian Coca
148fa183de Merge pull request #3014 from bcoca/uri_fixes
fixes for uri module
2016-02-23 11:23:10 -05:00
Peter Sprygada
7a19e16dca minor bugfixes for junos_config return values
The junos_config now properly returns updates and reponses
2016-02-20 16:25:57 -05:00
Peter Sprygada
87cee15a85 initial add of ops_template module
This adds a new module ops_template used for configuring OpenSwitch
using local declarative config modules
2016-02-17 16:23:41 +00:00
Peter Sprygada
567e09c933 bugfix for missing function name in ios_command
This provides a minor bugfix for a missing function name in the ios_command
network module
2016-02-17 13:49:08 +00:00
Matt Martz
c7845456a6 Various simple linting type cleanups on modules 2016-02-16 15:58:44 -06:00
Peter Sprygada
0e270da561 initial add of iosxr_config module
This adds a new module, iosxr_config, that can be used for configuring
Cisco IOS XR devices.  It is provides a set of arguments for sending
configuration commands to the device over cli
2016-02-12 17:04:30 -05:00
Peter Sprygada
fb82e08e73 initial add of iosxr_template module
This adds a new module, iosxr_template, that can be used to template
configurations for IOS XR devices.  Templates are then loaded into the
target device over cli
2016-02-12 17:04:20 -05:00
Peter Sprygada
2e2380a505 initial add of iosxr_command module
This adds a new module, iosxr_command, that can be used to issue
commands to devices running IOS XR.  Commands are run on the
target device over cli
2016-02-12 17:04:12 -05:00
Peter Sprygada
af40116e23 update junos_command module return values
This minor update fixes the return values from the junos_command module
to be consistent with other network modules
2016-02-12 16:43:08 -05:00
Peter Sprygada
b7114cc783 update ios_command module return values
This minor change updates the return values and doc string for the
ios_command module to be consistent with other network modules
2016-02-12 16:42:14 -05:00
Peter Sprygada
c90181c64e Merge pull request #2999 from chouseknecht/ios_commnad_init
Add ios_command module
2016-02-12 07:24:37 -05:00
Peter Sprygada
5626fb38fa add init to network/cumulus and reset module attrs
The modules were merged in without an __init__.py.  This adds the module
iniit and resets all of the module attrs to 0644
2016-02-12 07:12:56 -05:00
Peter Sprygada
b54a5de6c6 Merge pull request #2880 from CumulusNetworks/cumulus-core-modules
Adding files to ansible core modules.
2016-02-12 07:07:18 -05:00
Peter Sprygada
0d1bf50ca1 add package init to junos/ 2016-02-11 07:26:54 -05:00
Peter Sprygada
96986b6448 initial add of junos_config module
This adds a new module, junos_config, useed to configure Juniper JUNOS based
devices.  The config module can be used to set an ordered set of set and
delete statements over a cli transport
2016-02-11 07:07:55 -05:00
Peter Sprygada
ab31397a7d 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-02-11 07:07:27 -05:00
Peter Sprygada
8c46a08379 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-02-11 07:07:14 -05:00
chouseknecht
a4f67a4ef2 Add ios_commnand module. 2016-02-11 01:17:52 -05:00
chouseknecht
573ba42b03 Moved Conditional class to netcfg. 2016-02-11 01:17:52 -05:00
Brian Coca
f5a374103f fixes for uri module
- clarify docs on body_json behaviour
- only tranform into json if body input is not a string
  users keep passing json string and expecint it to not be jsonified again
- fixed issue with removes not handling path expansion correctly
- switched all path variables to 'type path' to handle expansions
2016-02-11 01:09:20 -05:00
Gary Rybak
373961da04 Add filter to eos_template to remove configuration mode command
followed immediately by an exit command indented one level.
2016-02-10 17:21:24 -07:00
Peter Sprygada
e6460906fd 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-02-09 15:10:05 -05:00
Peter Sprygada
d66a0cbe3f 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-02-09 15:07:55 -05:00
Peter Sprygada
624d1e38b8 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-02-09 15:07:06 -05:00
Peter Sprygada
d8615683e5 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-02-09 14:59:23 -05:00
Peter Sprygada
ef89e0eee6 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-02-09 14:58:31 -05:00
Peter Sprygada
c566cb3277 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-02-09 14:57:31 -05:00
Peter Sprygada
e010a7b240 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-02-09 14:38:42 -05:00
Peter Sprygada
ca2ae67794 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-02-09 14:37:16 -05:00
Peter Sprygada
08fd378479 Merge pull request #2909 from chouseknecht/eos_api_module
Eos api module
2016-02-08 07:13:41 -05:00
chouseknecht
4e614d36bc Adding eos_eapi module. 2016-02-07 12:01:26 -05:00
chouseknecht
f5a92e3565 Adding nxos_nxapi module. 2016-02-07 11:37:03 -05:00
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
2016-02-06 09:09:29 -05:00
Peter Sprygada
23f1d20a5c initial add of ios_template module
This adds a new module for working with IOS devices and building configurations
using templates.
2016-02-06 08:19:01 -05:00
Peter Sprygada
d05ceb9e28 initial add of ios_config module
This adds a new module ios_config that can be used for configuring
IOS devices.
2016-02-06 08:16:32 -05:00
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
2016-02-06 07:37:46 -05:00
Peter Sprygada
0df3a0e501 Merge pull request #2941 from privateip/module_eos_template
initial add of new module eos_template
2016-02-06 07:02:14 -05:00
Peter Sprygada
9ee5dc12b6 Merge pull request #2872 from privateip/module_eos_command
initial add of eos_command module
2016-02-06 07:01:51 -05:00
Peter Sprygada
6702496781 Merge pull request #2862 from privateip/module_eos_config
initial add of eos_config module
2016-02-06 07:01:24 -05:00
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
2016-02-06 06:55:27 -05:00
Peter Sprygada
fca78058db fixup docstring in nxos_config module 2016-02-06 06:35:01 -05:00
Peter Sprygada
82a051d150 Merge pull request #2897 from privateip/module_nxos_command
initial add of new module nxos_command
2016-02-06 06:29:26 -05:00
Peter Sprygada
6cddd47e67 Merge pull request #2942 from privateip/module_nxos_template
initial add of nxos_template module
2016-02-06 06:28:53 -05:00
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
2016-02-04 11:31:19 -05:00
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
2016-02-01 22:22:29 -05:00
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
2016-02-01 22:21:40 -05:00
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
2016-02-01 21:19:52 -05:00
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.
2016-01-31 20:45:14 -05:00
Michal Svab
2c3ef42d92 Clarify get_url timeout documentation 2016-01-29 09:24:28 +00:00
Barry Peddycord III
a398a36a9d Removing alpha-stage modules. 2016-01-27 10:08:14 -08:00
Scott Suehle
48270402d3 Adding files to ansible core modules. 2016-01-25 15:59:45 -08:00
Brian Coca
df222bed86 added missing version_added 2016-01-18 20:46:44 -05:00
techraf
49ec5a6a30 Added 'backup' parameter to get_url module 2016-01-12 00:16:19 +09:00
Brian Coca
1229adb36c Merge pull request #2609 from cspollar/devel
Fixed typo in uri module example
2015-12-02 16:08:15 -08:00
Brian Coca
292a83cba7 corrected version_added for new temp_dest feature 2015-12-02 14:30:28 -08:00
Brian Coca
d2eaf33add Merge pull request #1887 from sysadmin75/9512_get_url_tmp_option2
Adds tmp_dest option to get_url module.
2015-12-02 14:24:25 -08:00
cspollar
34f7d7b068 Fixed typo in uri module example 2015-12-02 14:01:16 -06:00
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
2015-10-28 08:52:22 -07:00
Toshio Kuratomi
49ee5dd443 Remove debugging 2015-10-19 10:20:42 -07:00
Toshio Kuratomi
11833906b5 xmlcharrefreplace is only for encoding, not for decoding :-( 2015-10-19 10:15:13 -07:00
Brian Coca
f33fba84c0 specified that uri must be uppercase 2015-10-19 10:14:07 -04:00
Brian Coca
144291120e restored quotes to checksum description to avoid breaking docs 2015-10-05 09:07:16 -04:00
JM
7943b3e6b0 description for the get_url module describing checksum verification before file download 2015-10-04 14:24:07 +02:00
Sam Mingo
7982d582d9 Update get_url.py
Fixed typo with header parameter to get_url in the documentation.
2015-09-09 17:38:05 -04:00
Colin Hutchinson
ab50943887 Update get_url.py
use an abbreviated sha
2015-09-08 12:00:21 -04:00
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
2015-09-01 10:07:03 -04:00
Toshio Kuratomi
8412adc4f9 Quote checksum description to fix docs 2015-08-06 21:10:03 -07:00
muffl0n
4f0cf6d2ca Allow additional hashing algorithms. Directly use hashlib and check if
used algorithm is supported.
2015-08-06 14:49:07 -07:00
sysadmin75
cd8bfc7695 Adds tmp_dest option to get_url module.
Addresses the issue in ansible/ansible#9512
2015-08-06 16:37:48 -04:00
Brian Coca
587370e2e7 minor doc fixes to get_url 2015-07-27 14:20:38 -04:00
Brian Coca
76344db61e fixed version added 2015-07-24 12:12:40 -04:00
Dan
777d736baa Added header support
Added the ability to pass custom http headers to the fetch_url method.
2015-07-24 15:20:17 +01:00
Brian Coca
03a809a21c added version_added to body_format in uri 2015-07-23 15:52:11 -04:00
Brian Coca
ca80b92233 added version_Added to get_url's force_basic_auth 2015-07-19 17:42:12 -04:00
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
2015-07-19 17:40:36 -04:00
Brian Coca
11c6e6a3f5 Merge pull request #1179 from hver/devel
Allow custom methods in uri module
2015-07-10 09:50:51 -04:00
Iiro Uusitalo
afd0222184 uri.py is not using module_utils/urls.py from ansible core 2015-07-10 08:42:01 +03:00
Iiro Uusitalo
4b1b10fa20 Refactor force basic auth, now all modules which use fetch_url() can use force_basic_auth 2015-07-10 08:40:04 +03:00
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'
2015-07-09 11:39:46 +02:00
Toshio Kuratomi
27e1aa7d10 Merge pull request #1634 from Eronarn/devel
Change uri debug example
2015-07-01 08:10:40 -07:00
Brian Coca
b3d5479612 Merge pull request #687 from abackstrom/sha256-mismatch-redownload
get_url: Force redownload if sha256sum does not match
2015-06-29 23:30:03 -04:00
James Meickle
73390f8ecc Change uri debug example 2015-06-29 13:23:03 -04:00
Toshio Kuratomi
280ccfbb78 Add note about redirects proxies
Fixes #1574
2015-06-25 09:28:39 -07:00
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()
2015-06-24 06:51:00 -07:00
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
2015-06-20 21:36:10 +01:00
Greg DeKoenigsberg
2a5f0bde87 Proper author info for all remaining modules 2015-06-15 15:53:30 -04:00
Toshio Kuratomi
5983d64d77 Properly flip default for verifying server cert. Add nice error messages when the cert is invalid 2015-05-28 15:33:21 -07:00
Toshio Kuratomi
7fea93835c Change uri module to validate ssl certs by default 2015-05-28 15:05:00 -07:00
whiter
ba35cb8173 Doc update to highlight use of body_type parameter 2015-05-28 15:27:46 +10:00
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
2015-05-14 14:19:15 -07:00
Tom Paine
97b64abf75 Update uri.py
Move choices from description to choices field.
2015-05-12 12:29:00 +01:00
Hennadiy (Gena) Verkh
1f37f2a152 Removed method restriction in uri module 2015-04-21 11:43:09 +02:00
Schmitt Christian
9ebef6275d Removed the wrong Note
Currently as already in the description, this module works with proxy settings.
2015-04-10 12:19:28 +02:00
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 ?)
2015-03-30 10:23:46 +02:00
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"
2015-03-27 11:11:25 +01:00
Brian Coca
42d91951cf Merge pull request #537 from zitterbacke/patch-2
fix uri modul for JSON-escape quotation marks
should fix #121
2015-03-19 09:12:29 -04:00
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.
2015-02-17 15:19:22 -06:00
Annika Backstrom
a935baf7dd Force redownload if sha256sum does not match 2015-01-22 11:09:59 -05:00
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'))
```
2014-12-17 20:09:44 +01:00
Toshio Kuratomi
9c6826e928 Add text/json as a mimetype to try deserializing
Fixes #503
2014-12-16 13:55:08 -08:00
Toshio Kuratomi
6317d3a988 Move from md5 to sha1 to work on FIPS-140 enabled systems 2014-11-06 21:25:55 -08:00
Michael DeHaan
0be8798858 Renames. 2014-11-04 17:29:56 -05:00
Michael DeHaan
385a037cd6 package files 2014-09-26 11:05:47 -04:00
Michael DeHaan
c8e1a2077e file extensions! 2014-09-26 10:37:56 -04:00
Michael DeHaan
417309a626 Restructuring. 2014-09-26 10:13:26 -04:00
Michael DeHaan
73123b69fa Move modules into subdirectory. 2014-09-26 09:23:50 -04:00
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
2014-09-23 15:32:07 -05:00
Will Thames
25c5250025 get_url module: Add timeout parameter 2014-09-08 13:58:25 +10:00
George Yoshida
cd0dae890c For content-disposition response header field, try to parse filename parameter even if it's not quoted. 2014-08-23 12:10:45 +09:00
Brian Coca
ac14a8d6ad unified calls to fs function vs duplicate functions for file and
directory
2014-05-24 09:28:45 -04:00
James Cammarata
a9c2eefd06 Remove erroneous set of status_code causing a traceback in module uri
Fixes #7416
2014-05-16 08:49:08 -05:00
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
```
2014-05-06 18:27:43 +02:00
James Cammarata
89d61b8a7d Add parameters to get_url for the url username/password
Fixes #6928
2014-04-24 00:26:50 -05:00
James Tanner
c69608cbe6 Fixes #6857 Make the url parameter required for get_url 2014-04-04 16:36:38 -04:00
Michael DeHaan
b06f5162cd Example cleanup. 2014-04-02 17:32:44 -04:00
Sven Schliesing
898346a468 Update uri 2014-03-31 14:32:56 +02:00
Sven Schliesing
d193e5571d Example for queueing build in Jenkins 2014-03-31 14:32:07 +02:00
Michael DeHaan
eb1c37c6e1 Merge pull request #6649 from picsolvebryan/devel
Accept status code from a list of valid codes.
2014-03-28 11:49:04 -04:00
bryan hunt
dff1fd3b37 Accept status code from a list of valid codes.
(cast the list of acceptable codes to a list of int )
2014-03-24 14:23:18 +00:00
bryan hunt
eb9ac9308c Accept status code from a list of valid codes. 2014-03-24 14:17:36 +00:00
bryan hunt
5561fbc427 Accept status code from a list of valid codes. 2014-03-24 13:51:44 +00:00
James Cammarata
c68be8b418 Remove validate_certs parameter from fetch_url calls 2014-03-12 10:31:01 -05:00
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
2014-03-10 16:06:52 -05:00
James Cammarata
09eaa0c920 Fixing the unicode issue in uri for EL6 platforms
Fixes #5869
2014-02-25 13:04:05 -06:00
James Cammarata
0c33cc19bb Handle unicode content in the uri module properly
Fixes #5869
2014-02-24 23:34:17 -06:00
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.
2014-02-07 11:36:51 -06:00
Eric Hanchrow
837d8e19b9 Clarify doc for get_url
Move a sentence from doc for the "force" option to that for the "dest" option.
2014-02-05 10:58:48 -08:00
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
2014-02-05 11:56:05 -06:00
Pedro Romano
b04f197113 Allow the 'PATCH' method in the 'uri' module since 'httplib2' allows it
and some APIs require it.
2014-02-02 20:53:52 +00:00
Romeo Theriault
863bba498c fix following redirects 2014-01-29 14:04:53 -10:00
Michael DeHaan
0d3a74d905 ansible -> ansibleworks 2014-01-28 20:29:41 -05:00
James Tanner
4f9aadcc07 Addresses #5023 Fix import comments 2013-12-02 15:13:49 -05:00
James Tanner
38edad70ac Fixes #5023 Convert all modules to use new snippet import pattern 2013-12-02 15:11:23 -05:00
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.
2013-11-27 21:23:03 -05:00
Michael DeHaan
9e4d71203d No longer need to reference 'version_added' in docs for these, as this was quite a while ago. 2013-11-27 21:19:32 -05:00
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.
2013-11-18 18:55:49 -05:00
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...
2013-11-14 10:02:15 -08:00
Tin Tvrtkovic
b1fa35ac3d Use the final URL from the finished request instead of the provided URL for filename generation, to properly deal with redirects. 2013-11-09 00:35:14 +01:00
James Laska
1d368f9e1f Correct documentation URLs 2013-11-08 15:02:45 -05:00
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.
2013-11-02 17:23:59 +01:00
Michael Scherer
93a75a4d83 Fix issue 4433, make sure status is a int rather than a string 2013-10-12 22:10:40 +02:00
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.
2013-09-27 14:37:21 -06:00
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.
2013-08-29 15:58:01 +02:00
Michael DeHaan
ece707bc6e Trim old style var references 2013-07-19 09:37:19 -04:00
Joshua Lund
166ea0e175 * Updated all ansible.cc references in the documentation to point
to ansibleworks.com
* Fixed a few misspelled words
2013-06-19 19:34:02 -06:00
Joshua Lund
c96e6c0d1d Removed merge conflict header 2013-06-18 15:01:01 -06:00
Michael DeHaan
6ed171bee5 Merge branch 'sha256' of git://github.com/jlund/ansible into devel
Conflicts:
	library/network/get_url
2013-06-18 14:46:57 -04:00
Jan-Piet Mens
98c1423269 Docs: consistently format playbook EXAMPLES 2013-06-17 08:53:46 +02:00
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
2013-06-15 20:54:25 +02:00
Joshua Lund
6316a78776 Setting version_added for this feature to 1.3 2013-06-07 11:37:41 -06:00
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
2013-06-04 23:28:28 -06:00
Michael DeHaan
b363c09a6e Docs standardization 2013-06-01 12:13:21 -04:00
Michael DeHaan
2a479cca52 Fixup fetch doc formatting. 2013-05-29 10:45:31 -04:00
James Martin
79cd04e689 Initial Commit. 2013-05-23 13:33:36 -04:00
Piffey Parlance
87b4c0d194 Fixed bug where if destination was unspecified, changed would not be set, resulting in an UnboundLocalError. 2013-04-29 13:59:06 -05:00
Michael DeHaan
cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00