ansible.builtin.urn 测试 – 判断字符串是否为有效的 URN
注意
此测试插件是 ansible-core 的一部分,并包含在所有 Ansible 安装中。在大多数情况下,您可以使用简短的插件名称 urn。但是,我们建议您使用完全限定集合名称 (FQCN) ansible.builtin.urn,以便轻松链接到插件文档并避免与其他可能具有相同测试插件名称的集合冲突。
ansible-core 2.14 中的新功能
概要
- 验证输入字符串是否符合 URN 标准。 
输入
这描述了测试的输入,即 is ansible.builtin.urn 或 is not ansible.builtin.urn 之前的值。
| 参数 | 注释 | 
|---|---|
| 可能的 URN。 | 
示例
# ISBN in URN format
{{ 'urn:isbn:9780302376463' is urn }}
# this is URL/URI but not URN
{{ 'mailto://nowone@example.com' is not urn }}
返回值
| 键 | 描述 | 
|---|---|
| 如果字符串是 URN,则返回  返回: 成功 | 
