diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/vultr/cloud/plugins/inventory | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/vultr/cloud/plugins/inventory')
-rw-r--r-- | ansible_collections/vultr/cloud/plugins/inventory/vultr.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ansible_collections/vultr/cloud/plugins/inventory/vultr.py b/ansible_collections/vultr/cloud/plugins/inventory/vultr.py index c08446134..060813af5 100644 --- a/ansible_collections/vultr/cloud/plugins/inventory/vultr.py +++ b/ansible_collections/vultr/cloud/plugins/inventory/vultr.py @@ -66,6 +66,7 @@ options: description: - Instance attributes to add as host variables to each host added to inventory. - See U(https://www.vultr.com/api/#operation/list-instances) for valid values. + - The I(internal_ip) attribute was added in version 1.10.0. type: list elements: str default: @@ -77,6 +78,7 @@ options: - main_ip - v6_main_ip - tags + - internal_ip filters: description: - Filter hosts with Jinja2 templates. @@ -116,7 +118,7 @@ notes: EXAMPLES = """ --- -# File endings vultr{,-{hosts,instances}}.y{,a}ml +# File endings vultr{,_{hosts,instances}}.y{,a}ml # All configuration done via environment variables: plugin: vultr.cloud.vultr @@ -147,6 +149,11 @@ plugin: vultr.cloud.vultr compose: ansible_host: vultr_v6_main_ip or vultr_main_ip +# Use the internal IP +plugin: vultr.cloud.vultr +compose: + ansible_host: vultr_internal_ip + # Querying the bare metal instances plugin: vultr.cloud.vultr instance_type: bare_metal @@ -160,7 +167,8 @@ from ansible.errors import AnsibleError, AnsibleParserError from ansible.module_utils._text import to_native from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError from ansible.module_utils.urls import Request -from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable +from ansible.plugins.inventory import (BaseInventoryPlugin, Cacheable, + Constructable) from ..module_utils.vultr_v2 import VULTR_USER_AGENT |