|
8 | 8 | __metaclass__ = type |
9 | 9 |
|
10 | 10 | DOCUMENTATION = ''' |
11 | | - name: _substitute_dns |
12 | | - short_description: "[INTERNAL] Adjust DNS name according to a CNAME substitution map" |
13 | | - version_added: 0.6.0 |
14 | | - author: Felix Fontein (@felixfontein) |
15 | | - description: |
16 | | - - B(This is an internal tool and must only be used from roles in this collection!) |
17 | | - If you use it from outside this collection, be warned that its behavior can change |
18 | | - and it can be removed at any time, even in bugfix releases! |
19 | | - options: |
20 | | - _input: |
21 | | - description: A DNS name. |
22 | | - type: string |
23 | | - required: true |
24 | | - substitution_map: |
25 | | - description: |
26 | | - - A map mapping DNS names to other DNS names. |
27 | | - - You can use a single wildcard C(*) as the first component of a DNS name. |
28 | | - - Trailing dots are ignored. |
29 | | - type: dict |
30 | | - required: true |
| 11 | +--- |
| 12 | +name: _substitute_dns |
| 13 | +short_description: "[INTERNAL] Adjust DNS name according to a CNAME substitution map" |
| 14 | +version_added: 0.6.0 |
| 15 | +author: Felix Fontein (@felixfontein) |
| 16 | +description: |
| 17 | + - B(This is an internal tool and must only be used from roles in this collection!) |
| 18 | + If you use it from outside this collection, be warned that its behavior can change |
| 19 | + and it can be removed at any time, even in bugfix releases! |
| 20 | +options: |
| 21 | + _input: |
| 22 | + description: A DNS name. |
| 23 | + type: string |
| 24 | + required: true |
| 25 | + substitution_map: |
| 26 | + description: |
| 27 | + - A map mapping DNS names to other DNS names. |
| 28 | + - You can use a single wildcard C(*) as the first component of a DNS name. |
| 29 | + - Trailing dots are ignored. |
| 30 | + type: dict |
| 31 | + required: true |
31 | 32 | ''' |
32 | 33 |
|
33 | 34 | EXAMPLES = ''' |
| 35 | +--- |
34 | 36 | - name: Simple replace |
35 | 37 | ansible.builtin.set_fact: |
36 | 38 | name: "{{ 'www.example.com' | felixfontein.acme._substitute_dns({'www.example.com': 'www.com.example.org'}) }}" |
|
48 | 50 | ''' |
49 | 51 |
|
50 | 52 | RETURN = ''' |
51 | | - _value: |
52 | | - description: The transformed input. |
53 | | - type: string |
| 53 | +--- |
| 54 | +_value: |
| 55 | + description: The transformed input. |
| 56 | + type: string |
54 | 57 | ''' |
55 | 58 |
|
56 | 59 | from ansible.errors import AnsibleFilterError, AnsibleFilterTypeError |
|
0 commit comments