Class: Ansible::Ruby::Modules::Uri
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Uri
- Defined in:
- lib/ansible/ruby/modules/generated/core/network/basics/uri.rb
Overview
Interacts with HTTP and HTTPS web services and supports Digest, Basic and WSSE HTTP authentication mechanisms.
Instance Method Summary collapse
-
#body ⇒ String?
The body of the http request/response to the web service.
-
#body_format ⇒ :raw, ...
The serialization format of the body.
-
#creates ⇒ Object?
A filename, when it already exists, this step will not be run.
-
#dest ⇒ Object?
Path of where to download the file to (if desired).
-
#follow_redirects ⇒ :all, ...
Whether or not the URI module should follow redirects.
-
#force_basic_auth ⇒ :yes, ...
The library used by the uri module only sends authentication information when a webservice responds to an initial request with a 401 status.
-
#headers ⇒ Object?
Add custom HTTP headers to a request in the format of a YAML hash.
-
#method ⇒ :GET, ...
The HTTP method of the request or response.
-
#others ⇒ Object?
All arguments accepted by the M(file) module also work here.
-
#password ⇒ String?
Password for the module to use for Digest, Basic or WSSE authentication.
-
#removes ⇒ Object?
A filename, when it does not exist, this step will not be run.
-
#return_content ⇒ :yes, ...
Whether or not to return the body of the request as a “content” key in the dictionary result.
-
#status_code ⇒ Integer?
A valid, numeric, HTTP status code that signifies success of the request.
-
#timeout ⇒ Integer?
The socket level timeout in seconds.
-
#url ⇒ String
HTTP or HTTPS URL in the form (http|https)://host.domain/path.
-
#user ⇒ String?
Username for the module to use for Digest, Basic or WSSE authentication.
-
#validate_certs ⇒ :yes, ...
If C(no), SSL certificates will not be validated.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#body ⇒ String?
Returns The body of the http request/response to the web service. If C(body_format) is set to ‘json’ it will take an already formated JSON string or convert a data structure into JSON.
26 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 26 attribute :body |
#body_format ⇒ :raw, ...
Returns The serialization format of the body. When set to json, encodes the body argument, if needed, and automatically sets the Content-Type header accordingly.
30 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 30 attribute :body_format |
#creates ⇒ Object?
Returns a filename, when it already exists, this step will not be run.
50 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 50 attribute :creates |
#dest ⇒ Object?
Returns path of where to download the file to (if desired). If I(dest) is a directory, the basename of the file on the remote server will be used.
15 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 15 attribute :dest |
#follow_redirects ⇒ :all, ...
Returns Whether or not the URI module should follow redirects. C(all) will follow all redirects. C(safe) will follow only “safe” redirects, where “safe” means that the client is only doing a GET or HEAD on the URI to which it is being redirected. C(none) will not follow any redirects. Note that C(yes) and C(no) choices are accepted for backwards compatibility, where C(yes) is the equivalent of C(all) and C(no) is the equivalent of C(safe). C(yes) and C(no) are deprecated and will be removed in some future version of Ansible.
46 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 46 attribute :follow_redirects |
#force_basic_auth ⇒ :yes, ...
Returns The library used by the uri module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request.
42 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 42 attribute :force_basic_auth |
#headers ⇒ Object?
Returns Add custom HTTP headers to a request in the format of a YAML hash.
67 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 67 attribute :headers |
#method ⇒ :GET, ...
Returns The HTTP method of the request or response. It MUST be uppercase.
34 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 34 attribute :method |
#others ⇒ Object?
Returns all arguments accepted by the M(file) module also work here.
70 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 70 attribute :others |
#password ⇒ String?
Returns password for the module to use for Digest, Basic or WSSE authentication.
22 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 22 attribute :password |
#removes ⇒ Object?
Returns a filename, when it does not exist, this step will not be run.
53 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 53 attribute :removes |
#return_content ⇒ :yes, ...
Returns Whether or not to return the body of the request as a “content” key in the dictionary result. If the reported Content-type is “application/json”, then the JSON is additionally loaded into a key called C(json) in the dictionary results.
38 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 38 attribute :return_content |
#status_code ⇒ Integer?
Returns A valid, numeric, HTTP status code that signifies success of the request. Can also be comma separated list of status codes.
56 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 56 attribute :status_code |
#timeout ⇒ Integer?
Returns The socket level timeout in seconds.
60 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 60 attribute :timeout |
#url ⇒ String
Returns HTTP or HTTPS URL in the form (http|https)://host.domain/path.
11 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 11 attribute :url |
#user ⇒ String?
Returns username for the module to use for Digest, Basic or WSSE authentication.
18 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 18 attribute :user |
#validate_certs ⇒ :yes, ...
Returns If C(no), SSL certificates will not be validated. This should only set to C(no) used on personally controlled sites using self-signed certificates. Prior to 1.9.2 the code defaulted to C(no).
73 |
# File 'lib/ansible/ruby/modules/generated/core/network/basics/uri.rb', line 73 attribute :validate_certs |