Debian Codegraph @

lib/ansible/plugins/test/url.yml

raw
1 DOCUMENTATION:
2 name: url
3 author: Ansible Core
4 version_added: "2.14"
5 short_description: is the string a valid URL
6 description:
7 - Validates a string to conform to the URL standard.
8 options:
9 _input:
10 description: Possible URL.
11 type: string
12 required: True
13 schemes:
14 description: Subset of URI schemas to validate against, otherwise B(any) scheme is considered valid.
15 type: list
16 elements: string
17 EXAMPLES: |
18 # simple URL
19 {{ 'http://example.com' is url }}
20 # looking only for file transfers URIs
21 {{ 'mailto://[email protected]' is not uri(schemes=['ftp', 'ftps', 'sftp', 'file']) }}
22 # but it is according to standard
23 {{ 'mailto://[email protected]' is not uri }}
24 # more complex URL
25 {{ 'ftp://admin:[email protected]/path/to/myfile.yml' is url }}
26 RETURN:
27 _value:
28 description: Returns V(false) if the string is not a URL, V(true) otherwise.
29 type: boolean