|
9 | 9 |
|
10 | 10 | DOCUMENTATION = r"""
|
11 | 11 | ---
|
12 |
| -module: netbox_location |
13 |
| -short_description: Create, update or delete locations within NetBox |
| 12 | +module: netbox_tunnel |
| 13 | +short_description: Create, update or delete tunnels within NetBox |
14 | 14 | description:
|
15 |
| - - Creates, updates or removes locations from NetBox |
| 15 | + - Creates, updates or removes tunnels from NetBox |
16 | 16 | notes:
|
17 | 17 | - Tags should be defined as a YAML list
|
18 | 18 | - This should be ran with connection C(local) and hosts C(localhost)
|
19 | 19 | author:
|
20 |
| - - Andrew Simmons (@andybro19) |
| 20 | + - Rich Bibby (@richbibby) |
21 | 21 | requirements:
|
22 | 22 | - pynetbox
|
23 |
| -version_added: '3.3.0' |
| 23 | +version_added: '3.20.0' |
24 | 24 | extends_documentation_fragment:
|
25 | 25 | - netbox.netbox.common
|
26 | 26 | options:
|
27 | 27 | data:
|
28 | 28 | type: dict
|
29 | 29 | description:
|
30 |
| - - Defines the location configuration |
| 30 | + - Defines the tunnel configuration |
31 | 31 | suboptions:
|
32 | 32 | name:
|
33 | 33 | description:
|
34 |
| - - The name of the location |
| 34 | + - The name of the tunnel |
35 | 35 | required: true
|
36 | 36 | type: str
|
37 | 37 | status:
|
38 | 38 | description:
|
39 |
| - - Status of the location |
| 39 | + - Status of the tunnel |
40 | 40 | required: false
|
41 | 41 | type: raw
|
42 | 42 | version_added: "3.20.0"
|
|
48 | 48 | type: str
|
49 | 49 | site:
|
50 | 50 | description:
|
51 |
| - - Required if I(state=present) and the location does not exist yet |
| 51 | + - Required if I(state=present) and the tunnel does not exist yet |
52 | 52 | required: false
|
53 | 53 | type: raw
|
54 |
| - parent_location: |
| 54 | + parent_tunnel: |
55 | 55 | description:
|
56 |
| - - The parent location the location will be associated with |
| 56 | + - The parent tunnel the tunnel will be associated with |
57 | 57 | required: false
|
58 | 58 | type: raw
|
59 | 59 | tenant:
|
60 | 60 | description:
|
61 |
| - - The tenant that the location will be associated with |
| 61 | + - The tenant that the tunnel will be associated with |
62 | 62 | required: false
|
63 | 63 | type: raw
|
64 | 64 | version_added: "3.8.0"
|
|
70 | 70 | version_added: "3.20.0"
|
71 | 71 | description:
|
72 | 72 | description:
|
73 |
| - - The description of the location |
| 73 | + - The description of the tunnel |
74 | 74 | required: false
|
75 | 75 | type: str
|
76 | 76 | tags:
|
|
96 | 96 | gather_facts: false
|
97 | 97 |
|
98 | 98 | tasks:
|
99 |
| - - name: Create location within NetBox with only required information |
100 |
| - netbox.netbox.netbox_location: |
| 99 | + - name: Create tunnel within NetBox with only required information |
| 100 | + netbox.netbox.netbox_tunnel: |
101 | 101 | netbox_url: http://netbox.local
|
102 | 102 | netbox_token: thisIsMyToken
|
103 | 103 | data:
|
104 |
| - name: Test location |
| 104 | + name: Test tunnel |
105 | 105 | site: Test Site
|
106 | 106 | state: present
|
107 | 107 |
|
108 |
| - - name: Create location within NetBox with a parent location, status and facility |
109 |
| - netbox.netbox.netbox_location: |
| 108 | + - name: Create tunnel within NetBox with a parent tunnel, status and facility |
| 109 | + netbox.netbox.netbox_tunnel: |
110 | 110 | netbox_url: http://netbox.local
|
111 | 111 | netbox_token: thisIsMyToken
|
112 | 112 | data:
|
113 |
| - name: Child location |
| 113 | + name: Child tunnel |
114 | 114 | site: Test Site
|
115 |
| - parent_location: Test location |
| 115 | + parent_tunnel: Test tunnel |
116 | 116 | status: planned
|
117 | 117 | facility: Test Facility
|
118 | 118 | state: present
|
119 | 119 |
|
120 |
| - - name: Delete location within NetBox |
121 |
| - netbox.netbox.netbox_location: |
| 120 | + - name: Delete tunnel within NetBox |
| 121 | + netbox.netbox.netbox_tunnel: |
122 | 122 | netbox_url: http://netbox.local
|
123 | 123 | netbox_token: thisIsMyToken
|
124 | 124 | data:
|
125 |
| - name: Test location |
| 125 | + name: Test tunnel |
126 | 126 | state: absent
|
127 | 127 | """
|
128 | 128 |
|
129 | 129 | RETURN = r"""
|
130 |
| -location: |
| 130 | +tunnel: |
131 | 131 | description: Serialized object as created or already existent within NetBox
|
132 | 132 | returned: success (when I(state=present))
|
133 | 133 | type: dict
|
|
0 commit comments