| 1 |
# Copyright: (c) 2021, Alina Buzachis <@alinabuzachis> |
| 2 |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 3 |
|
| 4 |
from __future__ import absolute_import, division, print_function |
| 5 |
|
| 6 |
__metaclass__ = type |
| 7 |
|
| 8 |
|
| 9 |
class ModuleDocFragment(object): |
| 10 |
# Parameters for the Lookup Managed Object Reference (MoID) plugins |
| 11 |
DOCUMENTATION = r""" |
| 12 |
notes: |
| 13 |
- >- |
| 14 |
Lookup plugins are run on the ansible controller and are used to lookup information from an external |
| 15 |
resource. See https://docs.ansible.com/ansible/latest/plugins/lookup.html#lookup-plugins |
| 16 |
- >- |
| 17 |
This collection's plugins allow you to quickly gather VMWare resource identifiers and either store or |
| 18 |
use them, instead of requiring multiple modules and tasks to do the same thing. |
| 19 |
See the examples section for a comparison. |
| 20 |
|
| 21 |
deprecated: |
| 22 |
removed_in: 5.0.0 |
| 23 |
why: >- |
| 24 |
This plugin will not work with ansible-core 2.19 and above. Refer to |
| 25 |
L(the migration documentation,https://github.com/ansible-collections/vmware.vmware_rest/tree/main/docs/lookup_plugin_migration.md) |
| 26 |
for migration examples. |
| 27 |
alternative: Use M(vmware.vmware.moid_from_path) instead. |
| 28 |
|
| 29 |
options: |
| 30 |
_terms: |
| 31 |
description: |
| 32 |
- The absolute folder path to the object you would like to lookup. |
| 33 |
- Folder paths always start with the datacenter name, and then the object type (host, vm, network, datastore). |
| 34 |
- >- |
| 35 |
If the object is in a sub folder, the sub folder path should be added after the object type |
| 36 |
(for example /my_dc/vm/some/sub_folder/vm_name_to_lookup). |
| 37 |
- Enter the object or folder names as seen in the VCenter GUI. Do not escape spaces or special characters. |
| 38 |
required: True |
| 39 |
type: string |
| 40 |
vcenter_hostname: |
| 41 |
description: |
| 42 |
- The hostname or IP address of the vSphere vCenter. |
| 43 |
env: |
| 44 |
- name: VMWARE_HOST |
| 45 |
required: True |
| 46 |
type: string |
| 47 |
vcenter_password: |
| 48 |
description: |
| 49 |
- The vSphere vCenter password. |
| 50 |
env: |
| 51 |
- name: VMWARE_PASSWORD |
| 52 |
required: True |
| 53 |
type: string |
| 54 |
vcenter_rest_log_file: |
| 55 |
description: |
| 56 |
- You can use this optional parameter to set the location of a log file. |
| 57 |
- This file will be used to record the HTTP REST interactions. |
| 58 |
- The file will be stored on the host that runs the module. |
| 59 |
env: |
| 60 |
- name: VMWARE_REST_LOG_FILE |
| 61 |
type: string |
| 62 |
vcenter_username: |
| 63 |
description: |
| 64 |
- The vSphere vCenter username. |
| 65 |
env: |
| 66 |
- name: VMWARE_USER |
| 67 |
required: True |
| 68 |
type: string |
| 69 |
vcenter_validate_certs: |
| 70 |
description: |
| 71 |
- Allows connection when SSL certificates are not valid. Set to V(false) when |
| 72 |
certificates are not trusted. |
| 73 |
default: true |
| 74 |
env: |
| 75 |
- name: VMWARE_VALIDATE_CERTS |
| 76 |
type: boolean |
| 77 |
object_type: |
| 78 |
description: |
| 79 |
- Should not be set by the user, it is set internally when using a specific lookup plugin. |
| 80 |
- Describes the type of object to lookup. Example, cluster, datacenter, datastore, etc. |
| 81 |
default: 'cluster' |
| 82 |
type: str |
| 83 |
required: False |
| 84 |
""" |