Skip to content

Commit b453aa5

Browse files
committed
Add location to modules which support this parameter
- Add `location` parameter to `address` and `device` module - Add changelog fragment - Extend documentation accordingly - Regenerate documentation
1 parent 58039a9 commit b453aa5

File tree

5 files changed

+80
-0
lines changed

5 files changed

+80
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
enhancements:
2+
- Add location to `address` and `device` module

docs/plugins/address_module.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,40 @@ Parameters
392392
- :ansible-option-choices-entry:`true`
393393

394394

395+
.. raw:: html
396+
397+
</div>
398+
399+
* - .. raw:: html
400+
401+
<div class="ansible-option-cell">
402+
<div class="ansibleOptionAnchor" id="parameter-location"></div>
403+
404+
.. _ansible_collections.codeaffen.phpipam.address_module__parameter-location:
405+
406+
.. rst-class:: ansible-option-title
407+
408+
**location**
409+
410+
.. raw:: html
411+
412+
<a class="ansibleOptionLink" href="#parameter-location" title="Permalink to this option"></a>
413+
414+
.. ansible-option-type-line::
415+
416+
:ansible-option-type:`string`
417+
418+
.. raw:: html
419+
420+
</div>
421+
422+
- .. raw:: html
423+
424+
<div class="ansible-option-cell">
425+
426+
Address location
427+
428+
395429
.. raw:: html
396430

397431
</div>

docs/plugins/device_module.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,40 @@ Parameters
226226
IP address of the given device
227227

228228

229+
.. raw:: html
230+
231+
</div>
232+
233+
* - .. raw:: html
234+
235+
<div class="ansible-option-cell">
236+
<div class="ansibleOptionAnchor" id="parameter-location"></div>
237+
238+
.. _ansible_collections.codeaffen.phpipam.device_module__parameter-location:
239+
240+
.. rst-class:: ansible-option-title
241+
242+
**location**
243+
244+
.. raw:: html
245+
246+
<a class="ansibleOptionLink" href="#parameter-location" title="Permalink to this option"></a>
247+
248+
.. ansible-option-type-line::
249+
250+
:ansible-option-type:`string`
251+
252+
.. raw:: html
253+
254+
</div>
255+
256+
- .. raw:: html
257+
258+
<div class="ansible-option-cell">
259+
260+
Device location
261+
262+
229263
.. raw:: html
230264

231265
</div>

plugins/modules/address.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
description: Exclude this address from status update scans
9898
type: bool
9999
required: false
100+
location:
101+
description: Address location
102+
type: str
103+
required: false
100104
extends_documentation_fragment:
101105
- codeaffen.phpipam.phpipam
102106
- codeaffen.phpipam.phpipam.entity_state
@@ -151,6 +155,7 @@ def main():
151155
port=dict(type='str'),
152156
note=dict(type='str'),
153157
exclude_ping=dict(type='bool'),
158+
location=dict(type='entity', controller='tools/locations'),
154159
)
155160
)
156161

plugins/modules/device.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@
118118
description: CTX engine id when using SNMPv3
119119
type: str
120120
required: false
121+
location:
122+
description: Device location
123+
type: str
124+
required: false
121125
extends_documentation_fragment:
122126
- codeaffen.phpipam.phpipam
123127
- codeaffen.phpipam.phpipam.entity_state
@@ -175,6 +179,7 @@ def main():
175179
snmp_v3_priv_pass=dict(type='str', no_log=True, phpipam_name='snmp_v3_priv_pass'),
176180
snmp_v3_ctx_name=dict(type='str', phpipam_name='snmp_v3_ctx_name'),
177181
snmp_v3_ctx_engine_id=dict(type='str', phpipam_name='snmp_v3_ctx_engine_id'),
182+
location=dict(type='entity', controller='tools/locations'),
178183
),
179184
required_together=['rack', 'starting_rack', 'rack_units'],
180185
)

0 commit comments

Comments
 (0)