-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes in inventory and lookup plugins documentation #85
Changes from 4 commits
226b631
3402b07
9776b83
5432345
1da9cf9
e8983b9
51df0e8
22f37c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,24 +21,28 @@ | |
|
||
options: | ||
_terms: | ||
description: The name of the object to return from NIOS | ||
description: The name of the object to return from the NIOS. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of the network object to be returned from the Infoblox appliance. |
||
required: True | ||
type: str | ||
return_fields: | ||
description: The list of field names to return for the specified object. | ||
type: list | ||
filter: | ||
description: a dict object that is used to filter the return objects | ||
description: A dict object that is used to filter the return objects. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. returned objects |
||
type: dict | ||
extattrs: | ||
description: a dict object that is used to filter on extattrs | ||
description: A dict object that is used to filter on extattrs. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. filter based on extensible attributes. |
||
type: dict | ||
''' | ||
|
||
EXAMPLES = """ | ||
- name: fetch all networkview objects | ||
ansible.builtin.set_fact: | ||
networkviews: "{{ lookup('infoblox.nios_modules.nios', 'networkview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" | ||
networkviews: "{{ lookup('infoblox.nios_modules.nios_lookup', 'networkview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" | ||
|
||
- name: fetch the default dns view | ||
ansible.builtin.set_fact: | ||
dns_views: "{{ lookup('infoblox.nios_modules.nios', 'view', filter={'name': 'default'}, | ||
dns_views: "{{ lookup('infoblox.nios_modules.nios_lookup', 'view', filter={'name': 'default'}, | ||
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}" | ||
|
||
# all of the examples below use credentials that are set using env variables | ||
|
@@ -78,8 +82,6 @@ | |
""" | ||
|
||
from ansible.plugins.lookup import LookupBase | ||
# from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup | ||
# from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import normalize_extattrs, flatten_extattrs | ||
from ansible.errors import AnsibleError | ||
from ..module_utils.api import WapiLookup | ||
from ..module_utils.api import normalize_extattrs, flatten_extattrs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,15 +20,18 @@ | |
|
||
options: | ||
_terms: | ||
description: The CIDR network to retrieve the next addresses from | ||
description: The CIDR network to retrieve the next addresses from. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. address(es) |
||
required: True | ||
type: str | ||
num: | ||
description: The number of IP addresses to return | ||
description: The number of IP addresses to return. | ||
required: false | ||
default: 1 | ||
type: int | ||
exclude: | ||
description: List of IP's that need to be excluded from returned IP addresses | ||
description: List of IP's that need to be excluded from returned IP addresses. | ||
required: false | ||
type: list | ||
''' | ||
|
||
EXAMPLES = """ | ||
|
@@ -60,7 +63,6 @@ | |
""" | ||
|
||
from ansible.plugins.lookup import LookupBase | ||
# from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup | ||
from ansible.module_utils._text import to_text | ||
from ansible.errors import AnsibleError | ||
from ..module_utils.api import WapiLookup | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace "This accepts" with "Accepts" to be consistent