mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
Linode Inventory can use full IP data from APIv4 (#3203)
* Linode Inventory can use full IP data from APIv4 - The Linode dynamic inventory module does not currently distinguish between private and public IP addresses even though the Linode APIv4 contains this information. This change keeps the current behavior as the default and adds an option to set `ip_style: api`. When set, this option allows administrators to differentiate between private, public, slaac, local_link, and pool network addresses providing a more nuanced and granular view of the remote host's network information. Signed-off-by: Kellin <kellin@retromud.org> * Review - amend changelog details - Adds a link back to this pull request - Uses markdown styles for easier to read publishing in the changelogs - Amends the wording style to match the existing changelog styles Co-authored-by: Felix Fontein <felix@fontein.de> * Add scope to example invocation - Adds the `community.general` scope to invocation example Co-authored-by: Felix Fontein <felix@fontein.de> * Convert lamda to list comprehension - Change the ip type filter from a lambda to a list comprehension Co-authored-by: Felix Fontein <felix@fontein.de> * Add punctuation to description sentence - Adds a period to the end of the description sentence Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
825e17c1cf
commit
e77adff0b7
3 changed files with 49 additions and 0 deletions
|
@ -49,6 +49,7 @@ def test_access_token_lookup(inventory):
|
|||
def test_validate_option(inventory):
|
||||
assert ['eu-west'] == inventory._validate_option('regions', list, 'eu-west')
|
||||
assert ['eu-west'] == inventory._validate_option('regions', list, ['eu-west'])
|
||||
assert 'api' == inventory._validate_option('ip_style', str, 'api')
|
||||
|
||||
|
||||
def test_validation_option_bad_option(inventory):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue