diff options
Diffstat (limited to 'ansible_collections/community/vmware')
88 files changed, 416 insertions, 3245 deletions
diff --git a/ansible_collections/community/vmware/.github/workflows/ansible-test.yml b/ansible_collections/community/vmware/.github/workflows/ansible-test.yml index 1cbb1a26f..6a5866e13 100644 --- a/ansible_collections/community/vmware/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/vmware/.github/workflows/ansible-test.yml @@ -19,8 +19,8 @@ on: push: branches: - main - - stable-2.x - stable-3.x + - stable-4.x pull_request: # Run CI once per day (at 07:12 UTC) # This ensures that even if there haven't been commits that we are still @@ -66,6 +66,7 @@ jobs: # - stable-2.14 - stable-2.15 - stable-2.16 + - stable-2.17 # - devel - milestone # Ansible-test on various stable branches does not yet work well with cgroups v2. @@ -131,6 +132,7 @@ jobs: # - stable-2.14 - stable-2.15 - stable-2.16 + - stable-2.17 # - devel - milestone diff --git a/ansible_collections/community/vmware/.github/workflows/extra-docs-linting.yml b/ansible_collections/community/vmware/.github/workflows/extra-docs-linting.yml index b36247113..91e3524fa 100644 --- a/ansible_collections/community/vmware/.github/workflows/extra-docs-linting.yml +++ b/ansible_collections/community/vmware/.github/workflows/extra-docs-linting.yml @@ -4,8 +4,8 @@ on: push: branches: - main - - stable-2.x - stable-3.x + - stable-4.x pull_request: # Run CI once per day (at 07:12 UTC) # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version @@ -21,10 +21,10 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/ansible_collections/community/vmware/CHANGELOG.rst b/ansible_collections/community/vmware/CHANGELOG.rst index 2c9e8318a..4162c1885 100644 --- a/ansible_collections/community/vmware/CHANGELOG.rst +++ b/ansible_collections/community/vmware/CHANGELOG.rst @@ -6,6 +6,29 @@ community.vmware Release Notes This changelog describes changes after version 3.9.0. +v4.3.0 +====== + +Minor Changes +------------- + +- Document that all parameters and VMware object names are case sensitive (https://github.com/ansible-collections/community.vmware/issues/2019). +- Drop the outdated (and actually unmaintained) scenario guides (https://github.com/ansible-collections/community.vmware/pull/2022). +- vmware_dvswitch - Add switchIpAddress/switch_ip parameter for netflow config +- vmware_guest_tools_info - Use `toolsVersionStatus2` instead of `toolsVersionStatus` (https://github.com/ansible-collections/community.vmware/issues/2033). + +Deprecated Features +------------------- + +- vmware_guest_tools_info - `vm_tools_install_status` will be removed from next major version (5.0.0) of the collection since the API call that provides this information has been deprecated by VMware. Use `vm_tools_running_status` / `vm_tools_version_status` instead (https://github.com/ansible-collections/community.vmware/issues/2033). + +Bugfixes +-------- + +- Use `isinstance()` instead of `type()` for a typecheck (https://github.com/ansible-collections/community.vmware/pull/2011). +- vmware_guest - Fix a error while updating the VM by adding a new disk. While adding a disk to an existing VM, it leaves it in invalid state. (https://github.com/ansible-collections/community.vmware/pull/2044). +- vmware_guest - Fix a missing error message while setting a template parameter with inconsistency guest_os ID (https://github.com/ansible-collections/community.vmware/pull/2036). + v4.2.0 ====== diff --git a/ansible_collections/community/vmware/FILES.json b/ansible_collections/community/vmware/FILES.json index 82d6f277e..68fe7037b 100644 --- a/ansible_collections/community/vmware/FILES.json +++ b/ansible_collections/community/vmware/FILES.json @@ -25,14 +25,14 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c7dfcceab897d76f899e9745a5ef5134a7deffe84c7c9aca9bcce00e903a7ca8", + "chksum_sha256": "75ced302218d85f3484c215700b3626db0288f380c6d549f666f13ddd05585e8", "format": 1 }, { "name": ".github/workflows/extra-docs-linting.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "19bb097e3a34621e1b74ce740716ee78818a3d6b752b1563f10e69d20450556c", + "chksum_sha256": "8d8d67559ba7e1fa9a637f9abee5cffe406f341fbb70ab75c60b71d46a2a92e0", "format": 1 }, { @@ -88,7 +88,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c77e5b2e21540ce43a2d83a648e341766d6373b8a909280c8a6f8cc160a40bc7", + "chksum_sha256": "fa92ffc48b8d5e744ed8748724d0623b9bdc81a4e57798fe99098640234cc5bc", "format": 1 }, { @@ -120,146 +120,6 @@ "format": 1 }, { - "name": "docs/docsite/rst/vmware_scenarios", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/faq.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "930dbbb64474e63f5371f1bf3d989e7ac744c9201056a9ca0dc5bbb8be45386b", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_clone_template.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "71d07a85971e0b3da2ee1e7fc57349685d1a29c55e2ac8444b71ef76a623568c", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_find_vm_folder.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "84cccda3524f9c42bc470d6b2ef556c78a341cef15e78e628098dfa41350b1a9", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_remove_vm.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5b80011ada8788e518ce9758f8c176581d6dd934cb1038eee3054c238467c20a", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_rename_vm.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "c3e8eb03b3317a7cbaa600c96b7db5771e85e48eb604c87a1a5383b32de23ee7", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_vmware_http.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "3442465954b3b08d445789816a235ac8f1f5e7799a0f78c705a402b03658465c", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/scenario_vmware_tools_connection.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "421865322fddfc9980e9af80cb78186cf752108aa438cf54a763a2a39c07770c", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_concepts.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "82bbd9bbc2f7e55103115b9200026f95766dad11a16f802808c3685e9de6ed6e", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_external_doc_links.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "64cc4675a425117eaaecd9e79fcf3e4296d8c8a271cc628db8a79cb7a81fa588", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_getting_started.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f8f3bae534ece698eda5bcc1334e1f211b5593620886979de0375d9f4d3dcd08", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_intro.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "95e3b92ba05d1f3a0f22eb11471b4ac6d3c906aeb3b5d54e9eb2c0b82c86185e", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_inventory.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "01faddedba147f6ad6a03abbbbb22a8890e6d79ea9339356f4e3a394ea32d3a5", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_inventory_filters.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "61db0373933ffe8e85ea740d938ecd3b541aff3b97a9367c981cc766f7e054cf", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_inventory_hostnames.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "15c534d481f064527280739774b56da9dae37d0ab05e48707f18855840b5a610", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_inventory_vm_attributes.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "af1c7f150d450f47f4db46c96f30699dec2cd67bbd2c1cd3ea1a5acadd288b92", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_module_reference.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "973d25cc3a951fc05aa4d0a1b0e16b34444fce3389bb838a354a1f48b7f77602", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_requirements.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5c1986dde7d60dd77db7bfacc48f6931ad366bb8429024300d7d348595be1bed", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_scenarios.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "335f2dd7e2a77e322c8e45e22f20c761e9289c46c5deb4f379d86369dc345f22", - "format": 1 - }, - { - "name": "docs/docsite/rst/vmware_scenarios/vmware_troubleshooting.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "a7b26ba15577611b5a9925b8f18ce04d03dd9308d3c36a77a1c4af628077d6b7", - "format": 1 - }, - { "name": "docs/docsite/rst/dev_guide.rst", "ftype": "file", "chksum_type": "sha256", @@ -267,17 +127,10 @@ "format": 1 }, { - "name": "docs/docsite/rst/scenario_guide.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "e33043c593d5173ca6fc80bc9d4ea744ecdb31e17288c60fd41bbbf8cecf2b8e", - "format": 1 - }, - { "name": "docs/docsite/extra-docs.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a04e14a68de6ce6570daa59ec2696684760f597b1ae085c410060f7bba9ae164", + "chksum_sha256": "1e07a4f54473638944cb668af1946e6720c9fd68d0e42b50e810f80bb787f6e7", "format": 1 }, { @@ -291,7 +144,7 @@ "name": "meta/runtime.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6b8f4f91c50cad886a4518aefee3ec6b06d0ba0f8b4ca1012b9f2f5086549b2e", + "chksum_sha256": "640043f6dea01c5c53fac165595ead8d77e2c0ff2be5c17f1e5372d3be8e499f", "format": 1 }, { @@ -340,14 +193,14 @@ "name": "plugins/doc_fragments/vmware.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "06348a39b25b21a24f79031dc99652b42cc09df93f54c29445df2dce0bbddd7d", + "chksum_sha256": "66fce69c869a2fab3666a3d36142c09212827f55a3fd681afcb93df34d23404c", "format": 1 }, { "name": "plugins/doc_fragments/vmware_rest_client.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cc694d07e9412e11238a8fab29a003337a21a1acb73c836ba9ed91923a74b8e3", + "chksum_sha256": "e392382f541729a10a27b064c036cf2232da62c02e06bca7cbee0d3b5fd04d61", "format": 1 }, { @@ -424,7 +277,7 @@ "name": "plugins/module_utils/vmware.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7dc70d2619b3e76336b732af47103d65ede45c8bd780aea3a67cb324ddcf3ff8", + "chksum_sha256": "902d67e645b235e10d27e179666442625e6ea9df4a4e4589ee6ba1427376b652", "format": 1 }, { @@ -487,7 +340,7 @@ "name": "plugins/modules/vcenter_folder.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "11e5b4064182b25aaeb7ab2ab1d9e5749f1e0a89244848f90c9f40b34bc82196", + "chksum_sha256": "0c27fd723ffd81277ccff70f5babafc38b33e0b302fcf9dbd0a17529d70074ad", "format": 1 }, { @@ -519,17 +372,24 @@ "format": 1 }, { + "name": "plugins/modules/vmware_all_snapshots_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "90c3ebaa53599914d5d4abf60e018666e5e7ac47a176973d924daab9694ddbb6", + "format": 1 + }, + { "name": "plugins/modules/vmware_category.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "803becfbcd55ee9cbfd72cd45c462bc712506b9cb88dd1a74cdfde0dbc8e127e", + "chksum_sha256": "30c64d2900fba1ffac504b8fb9708768388bf8cfc136cab67060034cc98fc6ec", "format": 1 }, { "name": "plugins/modules/vmware_category_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4a96e1cf4a156c93b0d9d2a0460078574cd5ebb8696ec5bd358b788ff9ae3218", + "chksum_sha256": "1cbf1ddbab506852d4919512b66b36dc7c2428f69521019a1730a09018047367", "format": 1 }, { @@ -543,21 +403,21 @@ "name": "plugins/modules/vmware_cluster.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4a98362ca64844cddaaf8878893a9def9bace3193a2bc8da8a877bee1edf854a", + "chksum_sha256": "311163c84c4d0a43349afa7bbc7afedd3ab1fc43ec4fdae9cd705d004e380a21", "format": 1 }, { "name": "plugins/modules/vmware_cluster_dpm.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3f463cf81333d20291c899891abda5f48b1ff74108e949cf3b11c4b754df8683", + "chksum_sha256": "823d0eba4ad0a749924bc16b0ac8540211a54add654b4ca445c8ad246bddf250", "format": 1 }, { "name": "plugins/modules/vmware_cluster_drs.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2b9b944de75a0973e2540aefca3bd3d5853d803cf5965d967a7a79c2a4b96dc3", + "chksum_sha256": "e34a56ecad9d3a2746ead00a58e4cbb65b19e39f06331a28864cb18660c8327f", "format": 1 }, { @@ -571,56 +431,56 @@ "name": "plugins/modules/vmware_cluster_ha.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f5d91c541f5e62fa4dfa246dc8d887128ddf0f23876b15dbcb6f069973c69cce", + "chksum_sha256": "b28c2e004816ce245f6cd32bb4c36c78eaf08dc1f4f8fb3aacc26c6c9417f2fa", "format": 1 }, { "name": "plugins/modules/vmware_cluster_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "82f3e55c5865b15aa735c536c1a6798cb202c7f79a043b54852da7f3e29c3599", + "chksum_sha256": "2f1c85c2da228ca18fd165303c4bf6e3820785433f8e4c4b29da5532f097ae55", "format": 1 }, { "name": "plugins/modules/vmware_cluster_vcls.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5c40ed2776b1c51fb8bd540bd4f505a89950c86a796af60bba69a25efe4b5431", + "chksum_sha256": "775056566fd97d763e8b96ad5c98403e705003310b77a2d18bc6a34b132cb9cf", "format": 1 }, { "name": "plugins/modules/vmware_cluster_vsan.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fc41f927567108b1d8fe017195d140378a73480f89d503011b270818e6b8728c", + "chksum_sha256": "93ecdc100e8fa5f100f2338ba2bdfbae93478e34bbf59059cda3fd5f717bdda6", "format": 1 }, { "name": "plugins/modules/vmware_content_deploy_ovf_template.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "056f5aab74cad12ff5c0bba871a38d0082afb9e3ed4f6c9f12f5b5cf4d552ce0", + "chksum_sha256": "a504f0013c4cb6c309975d8b7d4dd1d158abfd5fa0c0a08afbbf02b8c947e29b", "format": 1 }, { "name": "plugins/modules/vmware_content_deploy_template.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f72369be7754bc4e22ffef0cb6a56db07532f0d391b19011f20f2b5ecc426d84", + "chksum_sha256": "38d7265a3b17b904ffa4e70da0d0d09ee42088a07df9f2d14337dd9a563a9bcf", "format": 1 }, { "name": "plugins/modules/vmware_content_library_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e1293f0cb822b7435cb3d3e1e5170c990bc03d06ab49ae5cfcf7f32653b83285", + "chksum_sha256": "b1668dc4da6e9e41a143c7e80bc8f59bdb13d2ca30d22b10bd4e0a1a1324ec6e", "format": 1 }, { "name": "plugins/modules/vmware_content_library_manager.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4efe68143e7233415a30e91fb71b68b24fd8635305a29899462943fe6e834286", + "chksum_sha256": "0d736b6cba5b9d62cc6e63ce39bbb8e371783d5bb58f888ccacaac5646a2bf6c", "format": 1 }, { @@ -662,21 +522,21 @@ "name": "plugins/modules/vmware_datastore_cluster.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "32e575cf227fec3ae5004d97b413c3d9a2ed4bf0f0b3b6a0479b344d6c7c7147", + "chksum_sha256": "b56a80bf30230a6128d64360ea3ee2eac60df4003700db5a53adaddf28667880", "format": 1 }, { "name": "plugins/modules/vmware_datastore_cluster_manager.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d777f38acda366326fbf061e4037ef5a0ffb98384998224076a45192ee73f69c", + "chksum_sha256": "ea6224af0dfe43391aaa73e6e1601437e971bda1ad080bfe626a715ed5fcf029", "format": 1 }, { "name": "plugins/modules/vmware_datastore_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f18ba418804c7f5bc856500ab4a6d9e24fa558a15340c5dcb28495961b5e562a", + "chksum_sha256": "324deb8bd961b7c4834f581d1979ab0aba69e7a7e82879f060a4b37ec2a4edda", "format": 1 }, { @@ -690,7 +550,7 @@ "name": "plugins/modules/vmware_deploy_ovf.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7fc7ced342d72f868d3d6d8919f071732ee35bdee34af491c9dbcae1272a29c9", + "chksum_sha256": "735cafd1d64ae101d323f220cdd05384738b97f99434ee5838b820cbbb2e5930", "format": 1 }, { @@ -753,7 +613,7 @@ "name": "plugins/modules/vmware_dvswitch.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e0b58b5ff685fd093fa0b97931473dd6be059b435a6c0e332915019d342ef893", + "chksum_sha256": "be8458b48fdfadbcea5849beed4ef03651f0465a5f37cec72d7f5ac610968202", "format": 1 }, { @@ -802,7 +662,7 @@ "name": "plugins/modules/vmware_export_ovf.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "55d635752a4c3cc1af02ae255a1acf073781e4ce441195e76bcf5764551e098c", + "chksum_sha256": "d174a4d017092d89a92a0555e1e078aa39e4356370bb6215fa90979f46b2086f", "format": 1 }, { @@ -830,7 +690,7 @@ "name": "plugins/modules/vmware_guest.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "55738b294073afb1f44d52bbcd1590ebd9f4a3fd93cdf563aa663a35f9e41560", + "chksum_sha256": "e4bab2821b327625942772574bd70a12d56eb81cc9b883c2351d1636defbd235", "format": 1 }, { @@ -844,21 +704,21 @@ "name": "plugins/modules/vmware_guest_boot_manager.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "67e88707f99a21714c12a0263bccae93e7f2e7179eae4f5ce0083de4d268dbde", + "chksum_sha256": "acea9e5a58f9f23e872f0a8629d5e0c92bd729e75eef2f70c3d39379d057ba91", "format": 1 }, { "name": "plugins/modules/vmware_guest_controller.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "80c4af1521de6264c891a2e60f60fbd62d342011d072cf198cf702b52e26ce71", + "chksum_sha256": "961937472c22b53f5b6034525a9f75e33f1fa628b22f24649f3df98cbd7fc55b", "format": 1 }, { "name": "plugins/modules/vmware_guest_cross_vc_clone.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "283ac6f176ab1cd023ac5b65784fa3fbfdf5979113b86ca3ca0473f1f36ac4e8", + "chksum_sha256": "3a25bcc0ebc47ec9aee6299bf1edd5e61b6edeb982164b47654a6fe99d505e54", "format": 1 }, { @@ -879,21 +739,21 @@ "name": "plugins/modules/vmware_guest_customization_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9c78119d928cbbdb182d88571ab881b8b28c11de7c9d9b93d1f7abafcd289959", + "chksum_sha256": "00a52eaee1678b4982f4cb7811bde96449d6c49164d4caee8b6966ea9e24def5", "format": 1 }, { "name": "plugins/modules/vmware_guest_disk.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "aaadad51ac60409131ac1870bf3718e084b7a1ab931424acd68ccf430ff0c96c", + "chksum_sha256": "998605e6ca41ceae52998a664c26c9ec6cd42495c14dc98255621d4ebd8abe54", "format": 1 }, { "name": "plugins/modules/vmware_guest_disk_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5e3f6251a881e672180694dbfe1c548625acabb8a0ac525d1c675d98aafeae7e", + "chksum_sha256": "1853016016ef07e306e9a34309d4feda76e0b5f67781851cec52f29f1b11d7be", "format": 1 }, { @@ -921,14 +781,14 @@ "name": "plugins/modules/vmware_guest_instant_clone.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "13d57b323a3f9662c6ef419b0d549f03b76fb98909c5361ce90ed387213359e0", + "chksum_sha256": "c5c9cde1be64a9968211f02d5e45eb91806bf4f0a9cff4b7789e2649b1a8890b", "format": 1 }, { "name": "plugins/modules/vmware_guest_move.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a7a8c7fa21886fd90d091511ebe933e0f3848fea87b886358dcf41d5aab48112", + "chksum_sha256": "c3160b9fd746e6ec1ea229b6e6566d464389f9797e972c06fb567a265724c897", "format": 1 }, { @@ -942,28 +802,28 @@ "name": "plugins/modules/vmware_guest_powerstate.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7296037dcfa5296e29eb3a2f1fa6968267e80acfbd97f8279141331197f432b1", + "chksum_sha256": "3b8c4d4347fb6db05daabcfc23ebb5d61a3eaaeba8b3fba8b323dca0869bb575", "format": 1 }, { "name": "plugins/modules/vmware_guest_register_operation.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "367d95915f41ade54a88f5277a56d76012920e990fe6e2b2f6e99914cdc0ac67", + "chksum_sha256": "4d03dc3328c6b15d025bd9a067db6e3b07d3a6d83e285ccc2ac6083362def7ec", "format": 1 }, { "name": "plugins/modules/vmware_guest_screenshot.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "581e791515b4de8f1d010a63aafb6fd032621d716f84df4ed0c8c17643d1481d", + "chksum_sha256": "098ba39e82d0f8deffe53548e620b744e1ead80f97e79c6c418b04111002a129", "format": 1 }, { "name": "plugins/modules/vmware_guest_sendkey.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b7c7233857e429495fe4590bb04bb1d5969a69e51f13e4710f1f63858c6c8029", + "chksum_sha256": "be64447bd8f19cb536bc2989e922b94a602c7bdb9252869be37aff894daeb0f6", "format": 1 }, { @@ -977,7 +837,7 @@ "name": "plugins/modules/vmware_guest_snapshot.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bf3c5339f076c95b0b0525281829f407b862ebc9e5d3c41a85127d52c85ebd64", + "chksum_sha256": "6eccf9a0a8f9330b13a0805391bcfb618379a402cb8d88a4aae7efe15312a952", "format": 1 }, { @@ -991,14 +851,14 @@ "name": "plugins/modules/vmware_guest_storage_policy.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "83de69a093891f34dd8ad71be700ad455616f00344f9aa05de00b25290b1749d", + "chksum_sha256": "9dabff116a379bfbecf992aea4326a15e82105bcc08fa83e69b84ca93808c44f", "format": 1 }, { "name": "plugins/modules/vmware_guest_tools_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b0eee01ad1315b25b15cccb47332890b7d60fb7f486e18951cda7b91678a7b3c", + "chksum_sha256": "06c9b2377a22371f9924f6bad1f18c7a99340e6628271de1204ee51ec9f8f7ae", "format": 1 }, { @@ -1019,28 +879,28 @@ "name": "plugins/modules/vmware_guest_tpm.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e73e993987116bb0a8f94f15be9a298ad523a1edc75577e70b18124f0a11fc50", + "chksum_sha256": "41d8d618e17d8bab62425550e58d62f68d627ff84838a76c69db7280c6637ca8", "format": 1 }, { "name": "plugins/modules/vmware_guest_vgpu.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bc7cef555f0688d289cfaa7fac62e32fc2f0801e406602adeb0e85150ce6ac24", + "chksum_sha256": "29a51f9bbddc129be2e3a3b937a443f586329dafcaeed1d9df63345cb52fa946", "format": 1 }, { "name": "plugins/modules/vmware_guest_vgpu_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d42e32c21a8c8b2447b869d73ee3235f893ab4ab9f0419be4bfb351b09c8711c", + "chksum_sha256": "e40a6d62d5566c22d47a2b85ad55e8a26e2fc08c95761a96f096fd9564a4f4a9", "format": 1 }, { "name": "plugins/modules/vmware_guest_video.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e9bbb46a7f1d814bc172f12339ed7c74eabcd7b1b5f2734f5cca08b44f27587b", + "chksum_sha256": "4b45e1f2708295625256a04756a2173ec443656b2195040fc2c37fac7445a7e1", "format": 1 }, { @@ -1110,7 +970,7 @@ "name": "plugins/modules/vmware_host_datastore.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d16e63c55e7f60e67c444d2e6221979bd9686fb6b505da6f4c1c1a5bac327043", + "chksum_sha256": "d8a69b96e9092b60f593fff47f29c81dad602a12ac954ee369ea6f1c414b35d8", "format": 1 }, { @@ -1131,7 +991,7 @@ "name": "plugins/modules/vmware_host_dns_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6ff0ef349e63ba77ffe530527281f057e605556e44680196a1fc7ae6af6bf52b", + "chksum_sha256": "e1e75a2146d8030295c3340f77cc6ddafbc1e1e32e4e0ceaecb5c0c3723bb1cd", "format": 1 }, { @@ -1208,14 +1068,14 @@ "name": "plugins/modules/vmware_host_lockdown.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0928b4198afb453f5112bbdfbf6c1bb79acfa727f1880c2041a68d547cf29df4", + "chksum_sha256": "2b89107bcc0f64dea4d3951287dd6eba9363fe90dd3593566fbe40930bfa6550", "format": 1 }, { "name": "plugins/modules/vmware_host_lockdown_exceptions.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f160e9dd9508feaf378f91d81756bec62fdd341c69af59cd7ca42d6a93abddae", + "chksum_sha256": "bc668da0bebbb572a0d3e6547a555c24ecc66d2d1a27f450a39f95a95284e374", "format": 1 }, { @@ -1278,7 +1138,7 @@ "name": "plugins/modules/vmware_host_scanhba.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7b3a3aafa0fd9786cfd95cd61a2d48c275f2239695ac5a7e4724c2ad79b675ab", + "chksum_sha256": "2da03b6b66863611805de12deb733040c461d01c96b29cba8faa56390df849f6", "format": 1 }, { @@ -1369,7 +1229,7 @@ "name": "plugins/modules/vmware_local_user_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e17900d6d0c71ff7f8261b0b7206529342d63ddc5b85736fdb837e278f091ddb", + "chksum_sha256": "d7aa4625a79ee1126375294702f94d4beb2d410570d72663a926c672a03447c4", "format": 1 }, { @@ -1404,7 +1264,7 @@ "name": "plugins/modules/vmware_object_rename.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "37f489b055f824b6359902d4bc137fbd8d15766089d5f48f7633eac0e424d314", + "chksum_sha256": "04145884fc9eac139b5bd2c583628987cabf994b230070e1371ad7c50e7bdfef", "format": 1 }, { @@ -1460,21 +1320,21 @@ "name": "plugins/modules/vmware_tag.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4518b9e396ba1f7bc6e1bfc940354894de6de17fcad23a25a4fd291c9af78908", + "chksum_sha256": "80958e12ec311af76c5b86fdd163efd4459a5c0a56f369d76f86daa45b3d0d28", "format": 1 }, { "name": "plugins/modules/vmware_tag_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "44d9da854f578cb92dcd26b26470bf3cbbc9acb8de7f50f656f18852fdfc6d95", + "chksum_sha256": "614bbf9d87c86725cfb57548046e57441fa38562f4c64ebcff50632a68c5f443", "format": 1 }, { "name": "plugins/modules/vmware_tag_manager.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "71e0a9229c66e5e788e65bb80450508024efda304620562a6ab0b250474e2225", + "chksum_sha256": "92f36995dc2dbaaabb9caa790a135fcfdbb42a87ee3d55ec4b8787dc2a0c97bd", "format": 1 }, { @@ -1502,7 +1362,7 @@ "name": "plugins/modules/vmware_vc_infraprofile_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c3a9e5a035ff87eb4843be8c2a3785d16efad669d93f07d5e47c924ead2c0ef7", + "chksum_sha256": "b491bce442122162d5eb1d7b8738576ac98a9982564a6950a806875cee11d56e", "format": 1 }, { @@ -1530,7 +1390,7 @@ "name": "plugins/modules/vmware_vm_config_option.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "591504d7977d1ced5a5f538783b01a81b56a5bd8de82e5990949663058a1359d", + "chksum_sha256": "1729e863834cf6326ec25cac2532666a18b17360e3377e02962dc0e991d0ffec", "format": 1 }, { @@ -1551,7 +1411,7 @@ "name": "plugins/modules/vmware_vm_shell.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9416f7b6cd6fb70e09b9b1a5ee5aac81250544037017bca639a916da47a5690d", + "chksum_sha256": "8de5d76c004005febc9fd6bb57a94dcc6cfcc996aa27e2f0bfd0c52d159d47c4", "format": 1 }, { @@ -1733,7 +1593,7 @@ "name": "scripts/inventory/vmware_inventory.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "45f7b341f4ce6f9b4e6392ee6e78a94f5187f370a314e358b5cf30f29492295f", + "chksum_sha256": "71d1124982666d9b26fffdf287f7aa0057662df4a400e2888149ce646a6dc6f8", "format": 1 }, { @@ -6917,6 +6777,13 @@ "format": 1 }, { + "name": "tests/sanity/ignore-2.18.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5c62bddf4ca5eac160fda8aa8cc0ce0998ab1a3dccb91c37270a837c2d1e20cd", + "format": 1 + }, + { "name": "tests/unit", "ftype": "dir", "chksum_type": null, @@ -6941,7 +6808,7 @@ "name": "tests/unit/mock/loader.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3b51ec0d45347a3568300e50f688998007e346f052bd2e961c2ac6d13f7cee4d", + "chksum_sha256": "7c14b7d02a6ccfe27d0012190a7e457eec60a92ba68a6377e488f31e71da062c", "format": 1 }, { @@ -7158,7 +7025,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a26eb552f9062d66fdecc635a886f159a66790045e05dcfc7da4574f974140b3", + "chksum_sha256": "6b2e0c075305c8d5f1b662a7533014e70ec9d1733eb79d5f70f1e024ecc06d99", "format": 1 }, { diff --git a/ansible_collections/community/vmware/MANIFEST.json b/ansible_collections/community/vmware/MANIFEST.json index acc7f148d..d1bc8edfe 100644 --- a/ansible_collections/community/vmware/MANIFEST.json +++ b/ansible_collections/community/vmware/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "vmware", - "version": "4.2.0", + "version": "4.3.0", "authors": [ "Ansible (https://github.com/ansible)" ], @@ -28,7 +28,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1ef7fbdfa909824b3ed7734c6a79135d82971bdff522b1ddd9c3cb4844c21d9a", + "chksum_sha256": "af79d3641999ba756f51b0b3c0562e0ebba66c8c764a0aff81496d5906a7398a", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/vmware/changelogs/changelog.yaml b/ansible_collections/community/vmware/changelogs/changelog.yaml index f2d8cea11..2b250b5fd 100644 --- a/ansible_collections/community/vmware/changelogs/changelog.yaml +++ b/ansible_collections/community/vmware/changelogs/changelog.yaml @@ -102,3 +102,31 @@ releases: - 1995-vsphere_copy.yml - 1996 - vmware_first_class_disk_info.yml release_date: '2024-02-24' + 4.3.0: + changes: + bugfixes: + - Use `isinstance()` instead of `type()` for a typecheck (https://github.com/ansible-collections/community.vmware/pull/2011). + - vmware_guest - Fix a error while updating the VM by adding a new disk. While + adding a disk to an existing VM, it leaves it in invalid state. (https://github.com/ansible-collections/community.vmware/pull/2044). + - vmware_guest - Fix a missing error message while setting a template parameter + with inconsistency guest_os ID (https://github.com/ansible-collections/community.vmware/pull/2036). + deprecated_features: + - vmware_guest_tools_info - `vm_tools_install_status` will be removed from next + major version (5.0.0) of the collection since the API call that provides this + information has been deprecated by VMware. Use `vm_tools_running_status` / + `vm_tools_version_status` instead (https://github.com/ansible-collections/community.vmware/issues/2033). + minor_changes: + - Document that all parameters and VMware object names are case sensitive (https://github.com/ansible-collections/community.vmware/issues/2019). + - Drop the outdated (and actually unmaintained) scenario guides (https://github.com/ansible-collections/community.vmware/pull/2022). + - vmware_dvswitch - Add switchIpAddress/switch_ip parameter for netflow config + - vmware_guest_tools_info - Use `toolsVersionStatus2` instead of `toolsVersionStatus` + (https://github.com/ansible-collections/community.vmware/issues/2033). + fragments: + - 1949-dvswitch_netflow_switch_ip.yml + - 2019-doc_fragments-case-sensitive.yml + - 2022-drop_sceanrio_guides.yml + - 2024027-fix_ci.yml + - 2033-vmware_guest_tools_info.yml + - 2036-missing_error_msg_in_vmware_guest.yml + - 2044-error_in_adding_disk_to_vm_in_vmware_guest.yml + release_date: '2024-04-20' diff --git a/ansible_collections/community/vmware/docs/docsite/extra-docs.yml b/ansible_collections/community/vmware/docs/docsite/extra-docs.yml index 9acde7f20..cc63130a2 100644 --- a/ansible_collections/community/vmware/docs/docsite/extra-docs.yml +++ b/ansible_collections/community/vmware/docs/docsite/extra-docs.yml @@ -1,8 +1,5 @@ --- sections: - - title: Scenario Guide - toctree: - - scenario_guide - title: Developer Guide toctree: - dev_guide diff --git a/ansible_collections/community/vmware/docs/docsite/rst/scenario_guide.rst b/ansible_collections/community/vmware/docs/docsite/rst/scenario_guide.rst deleted file mode 100644 index 270af08cd..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/scenario_guide.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_ansible: - -************ -VMware Guide -************ - -Welcome to the Ansible for VMware Guide! - -The purpose of this guide is to teach you everything you need to know about using Ansible with VMware. - -To get started, please select one of the following topics. - -.. toctree:: - :maxdepth: 1 - - vmware_scenarios/vmware_intro - vmware_scenarios/vmware_concepts - vmware_scenarios/vmware_requirements - vmware_scenarios/vmware_inventory - vmware_scenarios/vmware_inventory_vm_attributes - vmware_scenarios/vmware_inventory_hostnames - vmware_scenarios/vmware_inventory_filters - vmware_scenarios/vmware_scenarios - vmware_scenarios/vmware_troubleshooting - vmware_scenarios/vmware_external_doc_links - vmware_scenarios/faq -.. comments look like this - start with two dots -.. getting_started content not ready -.. vmware_scenarios/vmware_getting_started -.. module index page not ready -.. vmware_scenarios/vmware_module_reference -.. always exclude the template file -.. vmware_scenarios/vmware_scenario_1 diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/faq.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/faq.rst deleted file mode 100644 index 52f4f729e..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/faq.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_faq: - -****************** -Ansible VMware FAQ -****************** - -vmware_guest -============ - -Can I deploy a virtual machine on a standalone ESXi server ? ------------------------------------------------------------- - -Yes. ``vmware_guest`` can deploy a virtual machine with required settings on a standalone ESXi server. -However, you must have a paid license to deploy virtual machines this way. If you are using the free version, the API is read-only. - -Is ``/vm`` required for ``vmware_guest`` module ? -------------------------------------------------- - -Prior to Ansible version 2.5, ``folder`` was an optional parameter with a default value of ``/vm``. - -The folder parameter was used to discover information about virtual machines in the given infrastructure. - -Starting with Ansible version 2.5, ``folder`` is still an optional parameter with no default value. -This parameter will be now used to identify a user's virtual machine, if multiple virtual machines or virtual -machine templates are found with same name. VMware does not restrict the system administrator from creating virtual -machines with same name. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_clone_template.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_clone_template.rst deleted file mode 100644 index 1139a2523..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_clone_template.rst +++ /dev/null @@ -1,223 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_guest_from_template: - -**************************************** -Deploy a virtual machine from a template -**************************************** - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize Ansible to clone a virtual machine from already existing VMware template or existing VMware guest. - -Scenario requirements -===================== - -* Software - - * Ansible 2.5 or later must be installed - - * The Python module ``Pyvmomi`` must be installed on the Ansible (or Target host if not executing against localhost) - - * Installing the latest ``Pyvmomi`` via ``pip`` is recommended [as the OS provided packages are usually out of date and incompatible] - -* Hardware - - * vCenter Server with at least one ESXi server - -* Access / Credentials - - * Ansible (or the target server) must have network access to the either vCenter server or the ESXi server you will be deploying to - - * Username and Password - - * Administrator user with following privileges - - - ``Datastore.AllocateSpace`` on the destination datastore or datastore folder - - ``Network.Assign`` on the network to which the virtual machine will be assigned - - ``Resource.AssignVMToPool`` on the destination host, cluster, or resource pool - - ``VirtualMachine.Config.AddNewDisk`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.AddRemoveDevice`` on the datacenter or virtual machine folder - - ``VirtualMachine.Interact.PowerOn`` on the datacenter or virtual machine folder - - ``VirtualMachine.Inventory.CreateFromExisting`` on the datacenter or virtual machine folder - - ``VirtualMachine.Provisioning.Clone`` on the virtual machine you are cloning - - ``VirtualMachine.Provisioning.Customize`` on the virtual machine or virtual machine folder if you are customizing the guest operating system - - ``VirtualMachine.Provisioning.DeployTemplate`` on the template you are using - - ``VirtualMachine.Provisioning.ReadCustSpecs`` on the root vCenter Server if you are customizing the guest operating system - - Depending on your requirements, you could also need one or more of the following privileges: - - - ``VirtualMachine.Config.CPUCount`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.Memory`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.DiskExtend`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.Annotation`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.AdvancedConfig`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.EditDevice`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.Resource`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.Settings`` on the datacenter or virtual machine folder - - ``VirtualMachine.Config.UpgradeVirtualHardware`` on the datacenter or virtual machine folder - - ``VirtualMachine.Interact.SetCDMedia`` on the datacenter or virtual machine folder - - ``VirtualMachine.Interact.SetFloppyMedia`` on the datacenter or virtual machine folder - - ``VirtualMachine.Interact.DeviceConnection`` on the datacenter or virtual machine folder - -Assumptions -=========== - -- All variable names and VMware object names are case sensitive. -- VMware allows creation of virtual machine and templates with same name across datacenters and within datacenters. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviours. - -Caveats -======= - -- Hosts in the ESXi cluster must have access to the datastore that the template resides on. -- Multiple templates with the same name will cause module failures. -- In order to utilize Guest Customization, VMware Tools must be installed on the template. For Linux, the ``open-vm-tools`` package is recommended, and it requires that ``Perl`` be installed. - - -Example description -=================== - -In this use case / example, we will be selecting a virtual machine template and cloning it into a specific folder in our Datacenter / Cluster. The following Ansible playbook showcases the basic parameters that are needed for this. - -.. code-block:: yaml - - --- - - name: Create a VM from a template - hosts: localhost - gather_facts: no - tasks: - - name: Clone the template - vmware_guest: - hostname: "{{ vcenter_ip }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - validate_certs: False - name: testvm_2 - template: template_el7 - datacenter: "{{ datacenter_name }}" - folder: /DC1/vm - state: poweredon - cluster: "{{ cluster_name }}" - wait_for_ip_address: yes - - -Since Ansible utilizes the VMware API to perform actions, in this use case we will be connecting directly to the API from our localhost. This means that our playbooks will not be running from the vCenter or ESXi Server. We do not necessarily need to collect facts about our localhost, so the ``gather_facts`` parameter will be disabled. You can run these modules against another server that would then connect to the API if your localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server. - -To begin, there are a few bits of information we will need. First and foremost is the hostname of the ESXi server or vCenter server. After this, you will need the username and password for this server. For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ``validate_certs`` parameter. To do this you need to set ``validate_certs=False`` in your playbook. - -Now you need to supply the information about the virtual machine which will be created. Give your virtual machine a name, one that conforms to all VMware requirements for naming conventions. Next, select the display name of the template from which you want to clone new virtual machine. This must match what's displayed in VMware Web UI exactly. Then you can specify a folder to place this new virtual machine in. This path can either be a relative path or a full path to the folder including the Datacenter. You may need to specify a state for the virtual machine. This simply tells the module which action you want to take, in this case you will be ensure that the virtual machine exists and is powered on. An optional parameter is ``wait_for_ip_address``, this will tell Ansible to wait for the virtual machine to fully boot up and VMware Tools is running before completing this task. - - -What to expect --------------- - -- You will see a bit of JSON output after this playbook completes. This output shows various parameters that are returned from the module and from vCenter about the newly created VM. - -.. code-block:: yaml - - { - "changed": true, - "instance": { - "annotation": "", - "current_snapshot": null, - "customvalues": {}, - "guest_consolidation_needed": false, - "guest_question": null, - "guest_tools_status": "guestToolsNotRunning", - "guest_tools_version": "0", - "hw_cores_per_socket": 1, - "hw_datastores": [ - "ds_215" - ], - "hw_esxi_host": "192.0.2.44", - "hw_eth0": { - "addresstype": "assigned", - "ipaddresses": null, - "label": "Network adapter 1", - "macaddress": "00:50:56:8c:19:f4", - "macaddress_dash": "00-50-56-8c-19-f4", - "portgroup_key": "dvportgroup-17", - "portgroup_portkey": "0", - "summary": "DVSwitch: 50 0c 5b 22 b6 68 ab 89-fc 0b 59 a4 08 6e 80 fa" - }, - "hw_files": [ - "[ds_215] testvm_2/testvm_2.vmx", - "[ds_215] testvm_2/testvm_2.vmsd", - "[ds_215] testvm_2/testvm_2.vmdk" - ], - "hw_folder": "/DC1/vm", - "hw_guest_full_name": null, - "hw_guest_ha_state": null, - "hw_guest_id": null, - "hw_interfaces": [ - "eth0" - ], - "hw_is_template": false, - "hw_memtotal_mb": 512, - "hw_name": "testvm_2", - "hw_power_status": "poweredOff", - "hw_processor_count": 2, - "hw_product_uuid": "420cb25b-81e8-8d3b-dd2d-a439ee54fcc5", - "hw_version": "vmx-13", - "instance_uuid": "500cd53b-ed57-d74e-2da8-0dc0eddf54d5", - "ipv4": null, - "ipv6": null, - "module_hw": true, - "snapshots": [] - }, - "invocation": { - "module_args": { - "annotation": null, - "cdrom": {}, - "cluster": "DC1_C1", - "customization": {}, - "customization_spec": null, - "customvalues": [], - "datacenter": "DC1", - "disk": [], - "esxi_hostname": null, - "folder": "/DC1/vm", - "force": false, - "guest_id": null, - "hardware": {}, - "hostname": "192.0.2.44", - "is_template": false, - "linked_clone": false, - "name": "testvm_2", - "name_match": "first", - "networks": [], - "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", - "port": 443, - "resource_pool": null, - "snapshot_src": null, - "state": "present", - "state_change_timeout": 0, - "template": "template_el7", - "username": "administrator@vsphere.local", - "uuid": null, - "validate_certs": false, - "vapp_properties": [], - "wait_for_ip_address": true - } - } - } - -- State is changed to ``True`` which notifies that the virtual machine is built using given template. The module will not complete until the clone task in VMware is finished. This can take some time depending on your environment. - -- If you utilize the ``wait_for_ip_address`` parameter, then it will also increase the clone time as it will wait until virtual machine boots into the OS and an IP Address has been assigned to the given NIC. - - - -Troubleshooting ---------------- - -Things to inspect: - -- Check if the values provided for username and password are correct. -- Check if the datacenter you provided is available. -- Check if the template specified exists and you have permissions to access the datastore. -- Ensure the full folder path you specified already exists. It will not create folders automatically for you. - diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_find_vm_folder.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_find_vm_folder.rst deleted file mode 100644 index fccd47e26..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_find_vm_folder.rst +++ /dev/null @@ -1,121 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_guest_find_folder: - -****************************************************** -Find folder path of an existing VMware virtual machine -****************************************************** - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize Ansible to find folder path of an existing VMware virtual machine. - -Scenario requirements -===================== - -* Software - - * Ansible 2.5 or later must be installed. - - * The Python module ``Pyvmomi`` must be installed on the Ansible control node (or Target host if not executing against localhost). - - * We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -* Hardware - - * At least one standalone ESXi server or - - * vCenter Server with at least one ESXi server - -* Access / Credentials - - * Ansible (or the target server) must have network access to the either vCenter server or the ESXi server - - * Username and Password for vCenter or ESXi server - -Caveats -======= - -- All variable names and VMware object names are case sensitive. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviours. - - -Example description -=================== - -With the following Ansible playbook you can find the folder path of an existing virtual machine using name. - -.. code-block:: yaml - - --- - - name: Find folder path of an existing virtual machine - hosts: localhost - gather_facts: False - vars_files: - - vcenter_vars.yml - vars: - ansible_python_interpreter: "/usr/bin/env python3" - tasks: - - set_fact: - vm_name: "DC0_H0_VM0" - - - name: "Find folder for VM - {{ vm_name }}" - vmware_guest_find: - hostname: "{{ vcenter_server }}" - username: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - validate_certs: False - name: "{{ vm_name }}" - delegate_to: localhost - register: vm_facts - - -Since Ansible utilizes the VMware API to perform actions, in this use case it will be connecting directly to the API from localhost. - -This means that playbooks will not be running from the vCenter or ESXi Server. - -Note that this play disables the ``gather_facts`` parameter, since you don't want to collect facts about localhost. - -You can run these modules against another server that would then connect to the API if localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server. We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -Before you begin, make sure you have: - -- Hostname of the ESXi server or vCenter server -- Username and password for the ESXi or vCenter server -- Name of the existing Virtual Machine for which you want to collect folder path - -For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. - -If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ``validate_certs`` parameter. To do this you need to set ``validate_certs=False`` in your playbook. - -The name of existing virtual machine will be used as input for ``vmware_guest_find`` module via ``name`` parameter. - - -What to expect --------------- - -Running this playbook can take some time, depending on your environment and network connectivity. When the run is complete you will see - -.. code-block:: yaml - - "vm_facts": { - "changed": false, - "failed": false, - ... - "folders": [ - "/F0/DC0/vm/F0" - ] - } - - -Troubleshooting ---------------- - -If your playbook fails: - -- Check if the values provided for username and password are correct. -- Check if the datacenter you provided is available. -- Check if the virtual machine specified exists and you have respective permissions to access VMware object. -- Ensure the full folder path you specified already exists. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_remove_vm.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_remove_vm.rst deleted file mode 100644 index 59b2bf974..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_remove_vm.rst +++ /dev/null @@ -1,127 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_guest_remove_virtual_machine: - -***************************************** -Remove an existing VMware virtual machine -***************************************** - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize Ansible to remove an existing VMware virtual machine. - -Scenario requirements -===================== - -* Software - - * Ansible 2.5 or later must be installed. - - * The Python module ``Pyvmomi`` must be installed on the Ansible control node (or Target host if not executing against localhost). - - * We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -* Hardware - - * At least one standalone ESXi server or - - * vCenter Server with at least one ESXi server - -* Access / Credentials - - * Ansible (or the target server) must have network access to the either vCenter server or the ESXi server - - * Username and Password for vCenter or ESXi server - - * Hosts in the ESXi cluster must have access to the datastore that the template resides on. - -Caveats -======= - -- All variable names and VMware object names are case sensitive. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviours. -- ``vmware_guest`` module tries to mimic VMware Web UI and workflow, so the virtual machine must be in powered off state in order to remove it from the VMware inventory. - -.. warning:: - - The removal VMware virtual machine using ``vmware_guest`` module is destructive operation and can not be reverted, so it is strongly recommended to take the backup of virtual machine and related files (vmx and vmdk files) before proceeding. - -Example description -=================== - -In this use case / example, user will be removing a virtual machine using name. The following Ansible playbook showcases the basic parameters that are needed for this. - -.. code-block:: yaml - - --- - - name: Remove virtual machine - gather_facts: no - vars_files: - - vcenter_vars.yml - vars: - ansible_python_interpreter: "/usr/bin/env python3" - hosts: localhost - tasks: - - set_fact: - vm_name: "VM_0003" - datacenter: "DC1" - - - name: Remove "{{ vm_name }}" - vmware_guest: - hostname: "{{ vcenter_server }}" - username: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - validate_certs: no - cluster: "DC1_C1" - name: "{{ vm_name }}" - state: absent - delegate_to: localhost - register: facts - - -Since Ansible utilizes the VMware API to perform actions, in this use case it will be connecting directly to the API from localhost. - -This means that playbooks will not be running from the vCenter or ESXi Server. - -Note that this play disables the ``gather_facts`` parameter, since you don't want to collect facts about localhost. - -You can run these modules against another server that would then connect to the API if localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server. We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -Before you begin, make sure you have: - -- Hostname of the ESXi server or vCenter server -- Username and password for the ESXi or vCenter server -- Name of the existing Virtual Machine you want to remove - -For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. - -If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ``validate_certs`` parameter. To do this you need to set ``validate_certs=False`` in your playbook. - -The name of existing virtual machine will be used as input for ``vmware_guest`` module via ``name`` parameter. - - -What to expect --------------- - -- You will not see any JSON output after this playbook completes as compared to other operations performed using ``vmware_guest`` module. - -.. code-block:: yaml - - { - "changed": true - } - -- State is changed to ``True`` which notifies that the virtual machine is removed from the VMware inventory. This can take some time depending upon your environment and network connectivity. - - -Troubleshooting ---------------- - -If your playbook fails: - -- Check if the values provided for username and password are correct. -- Check if the datacenter you provided is available. -- Check if the virtual machine specified exists and you have permissions to access the datastore. -- Ensure the full folder path you specified already exists. It will not create folders automatically for you. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_rename_vm.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_rename_vm.rst deleted file mode 100644 index 5d72d6aea..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_rename_vm.rst +++ /dev/null @@ -1,174 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_guest_rename_virtual_machine: - -********************************** -Rename an existing virtual machine -********************************** - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize Ansible to rename an existing virtual machine. - -Scenario requirements -===================== - -* Software - - * Ansible 2.5 or later must be installed. - - * The Python module ``Pyvmomi`` must be installed on the Ansible control node (or Target host if not executing against localhost). - - * We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -* Hardware - - * At least one standalone ESXi server or - - * vCenter Server with at least one ESXi server - -* Access / Credentials - - * Ansible (or the target server) must have network access to the either vCenter server or the ESXi server - - * Username and Password for vCenter or ESXi server - - * Hosts in the ESXi cluster must have access to the datastore that the template resides on. - -Caveats -======= - -- All variable names and VMware object names are case sensitive. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviours. - - -Example description -=================== - -With the following Ansible playbook you can rename an existing virtual machine by changing the UUID. - -.. code-block:: yaml - - --- - - name: Rename virtual machine from old name to new name using UUID - gather_facts: no - vars_files: - - vcenter_vars.yml - vars: - ansible_python_interpreter: "/usr/bin/env python3" - hosts: localhost - tasks: - - set_fact: - vm_name: "old_vm_name" - new_vm_name: "new_vm_name" - datacenter: "DC1" - cluster_name: "DC1_C1" - - - name: Get VM "{{ vm_name }}" uuid - vmware_guest_facts: - hostname: "{{ vcenter_server }}" - username: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - validate_certs: False - datacenter: "{{ datacenter }}" - folder: "/{{datacenter}}/vm" - name: "{{ vm_name }}" - register: vm_facts - - - name: Rename "{{ vm_name }}" to "{{ new_vm_name }}" - vmware_guest: - hostname: "{{ vcenter_server }}" - username: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - validate_certs: False - cluster: "{{ cluster_name }}" - uuid: "{{ vm_facts.instance.hw_product_uuid }}" - name: "{{ new_vm_name }}" - -Since Ansible utilizes the VMware API to perform actions, in this use case it will be connecting directly to the API from localhost. - -This means that playbooks will not be running from the vCenter or ESXi Server. - -Note that this play disables the ``gather_facts`` parameter, since you don't want to collect facts about localhost. - -You can run these modules against another server that would then connect to the API if localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server. We recommend installing the latest version with pip: ``pip install Pyvmomi`` (as the OS packages are usually out of date and incompatible). - -Before you begin, make sure you have: - -- Hostname of the ESXi server or vCenter server -- Username and password for the ESXi or vCenter server -- The UUID of the existing Virtual Machine you want to rename - -For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. - -If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ``validate_certs`` parameter. To do this you need to set ``validate_certs=False`` in your playbook. - -Now you need to supply the information about the existing virtual machine which will be renamed. For renaming virtual machine, ``vmware_guest`` module uses VMware UUID, which is unique across vCenter environment. This value is autogenerated and can not be changed. You will use ``vmware_guest_facts`` module to find virtual machine and get information about VMware UUID of the virtual machine. - -This value will be used input for ``vmware_guest`` module. Specify new name to virtual machine which conforms to all VMware requirements for naming conventions as ``name`` parameter. Also, provide ``uuid`` as the value of VMware UUID. - -What to expect --------------- - -Running this playbook can take some time, depending on your environment and network connectivity. When the run is complete you will see - -.. code-block:: yaml - - { - "changed": true, - "instance": { - "annotation": "", - "current_snapshot": null, - "customvalues": {}, - "guest_consolidation_needed": false, - "guest_question": null, - "guest_tools_status": "guestToolsNotRunning", - "guest_tools_version": "10247", - "hw_cores_per_socket": 1, - "hw_datastores": ["ds_204_2"], - "hw_esxi_host": "10.x.x.x", - "hw_eth0": { - "addresstype": "assigned", - "ipaddresses": [], - "label": "Network adapter 1", - "macaddress": "00:50:56:8c:b8:42", - "macaddress_dash": "00-50-56-8c-b8-42", - "portgroup_key": "dvportgroup-31", - "portgroup_portkey": "15", - "summary": "DVSwitch: 50 0c 3a 69 df 78 2c 7b-6e 08 0a 89 e3 a6 31 17" - }, - "hw_files": ["[ds_204_2] old_vm_name/old_vm_name.vmx", "[ds_204_2] old_vm_name/old_vm_name.nvram", "[ds_204_2] old_vm_name/old_vm_name.vmsd", "[ds_204_2] old_vm_name/vmware.log", "[ds_204_2] old_vm_name/old_vm_name.vmdk"], - "hw_folder": "/DC1/vm", - "hw_guest_full_name": null, - "hw_guest_ha_state": null, - "hw_guest_id": null, - "hw_interfaces": ["eth0"], - "hw_is_template": false, - "hw_memtotal_mb": 1024, - "hw_name": "new_vm_name", - "hw_power_status": "poweredOff", - "hw_processor_count": 1, - "hw_product_uuid": "420cbebb-835b-980b-7050-8aea9b7b0a6d", - "hw_version": "vmx-13", - "instance_uuid": "500c60a6-b7b4-8ae5-970f-054905246a6f", - "ipv4": null, - "ipv6": null, - "module_hw": true, - "snapshots": [] - } - } - -confirming that you've renamed the virtual machine. - - -Troubleshooting ---------------- - -If your playbook fails: - -- Check if the values provided for username and password are correct. -- Check if the datacenter you provided is available. -- Check if the virtual machine specified exists and you have permissions to access the datastore. -- Ensure the full folder path you specified already exists. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_http.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_http.rst deleted file mode 100644 index a831114d3..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_http.rst +++ /dev/null @@ -1,162 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_http_api_usage: - -*********************************** -Using VMware HTTP API using Ansible -*********************************** - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize Ansible to use VMware HTTP APIs to automate various tasks. - -Scenario requirements -===================== - -* Software - - * Ansible 2.5 or later must be installed. - - * We recommend installing the latest version with pip: ``pip install Pyvmomi`` on the Ansible control node - (as the OS packages are usually out of date and incompatible) if you are planning to use any existing VMware modules. - -* Hardware - - * vCenter Server 6.5 and above with at least one ESXi server - -* Access / Credentials - - * Ansible (or the target server) must have network access to either the vCenter server or the ESXi server - - * Username and Password for vCenter - -Caveats -======= - -- All variable names and VMware object names are case sensitive. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviours. -- VMware HTTP APIs are introduced in vSphere 6.5 and above so minimum level required in 6.5. -- There are very limited number of APIs exposed, so you may need to rely on XMLRPC based VMware modules. - - -Example description -=================== - -With the following Ansible playbook you can find the VMware ESXi host system(s) and can perform various tasks depending on the list of host systems. -This is a generic example to show how Ansible can be utilized to consume VMware HTTP APIs. - -.. code-block:: yaml - - --- - - name: Example showing VMware HTTP API utilization - hosts: localhost - gather_facts: no - vars_files: - - vcenter_vars.yml - vars: - ansible_python_interpreter: "/usr/bin/env python3" - tasks: - - name: Login into vCenter and get cookies - uri: - url: https://{{ vcenter_server }}/rest/com/vmware/cis/session - force_basic_auth: yes - validate_certs: no - method: POST - user: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - register: login - - - name: Get all hosts from vCenter using cookies from last task - uri: - url: https://{{ vcenter_server }}/rest/vcenter/host - force_basic_auth: yes - validate_certs: no - headers: - Cookie: "{{ login.set_cookie }}" - register: vchosts - - - name: Change Log level configuration of the given hostsystem - vmware_host_config_manager: - hostname: "{{ vcenter_server }}" - username: "{{ vcenter_user }}" - password: "{{ vcenter_pass }}" - esxi_hostname: "{{ item.name }}" - options: - 'Config.HostAgent.log.level': 'error' - validate_certs: no - loop: "{{ vchosts.json.value }}" - register: host_config_results - - -Since Ansible utilizes the VMware HTTP API using the ``uri`` module to perform actions, in this use case it will be connecting directly to the VMware HTTP API from localhost. - -This means that playbooks will not be running from the vCenter or ESXi Server. - -Note that this play disables the ``gather_facts`` parameter, since you don't want to collect facts about localhost. - -Before you begin, make sure you have: - -- Hostname of the vCenter server -- Username and password for the vCenter server -- Version of vCenter is at least 6.5 - -For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. - -If your vCenter server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ``validate_certs`` parameter. To do this you need to set ``validate_certs=False`` in your playbook. - -As you can see, we are using the ``uri`` module in first task to login into the vCenter server and storing result in the ``login`` variable using register. In the second task, using cookies from the first task we are gathering information about the ESXi host system. - -Using this information, we are changing the ESXi host system's advance configuration. - -What to expect --------------- - -Running this playbook can take some time, depending on your environment and network connectivity. When the run is complete you will see - -.. code-block:: yaml - - "results": [ - { - ... - "invocation": { - "module_args": { - "cluster_name": null, - "esxi_hostname": "10.76.33.226", - "hostname": "10.65.223.114", - "options": { - "Config.HostAgent.log.level": "error" - }, - "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", - "port": 443, - "username": "administrator@vsphere.local", - "validate_certs": false - } - }, - "item": { - "connection_state": "CONNECTED", - "host": "host-21", - "name": "10.76.33.226", - "power_state": "POWERED_ON" - }, - "msg": "Config.HostAgent.log.level changed." - ... - } - ] - - -Troubleshooting ---------------- - -If your playbook fails: - -- Check if the values provided for username and password are correct. -- Check if you are using vCenter 6.5 and onwards to use this HTTP APIs. - -.. seealso:: - - `VMware vSphere and Ansible From Zero to Useful by @arielsanchezmor <https://www.youtube.com/watch?v=0_qwOKlBlo8>`_ - vBrownBag session video related to VMware HTTP APIs - `Sample Playbooks for using VMware HTTP APIs <https://github.com/Akasurde/ansible-vmware-http>`_ - GitHub repo for examples of Ansible playbook to manage VMware using HTTP APIs diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_tools_connection.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_tools_connection.rst deleted file mode 100644 index 08a4df114..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/scenario_vmware_tools_connection.rst +++ /dev/null @@ -1,120 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_tools_connection: - -************************************ -Using vmware_tools connection plugin -************************************ - -.. contents:: - :local: - -Introduction -============ - -This guide will show you how to utilize VMware Connection plugin to communicate and automate various tasks on VMware guest machines. - -Scenario requirements -===================== - -* Software - - * Ansible 2.9 or later must be installed. - - * We recommend installing the latest version with pip: ``pip install Pyvmomi`` on the Ansible control node - (as the OS packages are usually out of date and incompatible) if you are planning to use any existing VMware modules. - -* Hardware - - * vCenter Server 6.5 and above - -* Access / Credentials - - * Ansible (or the target server) must have network access to either the vCenter server - - * Username and Password for vCenter with required permissions - - * VMware tools or openvm-tools with required dependencies like Perl installed on the given virtual machine - -Caveats -======= - -- All variable names and VMware object names are case sensitive. -- You need to use Python 2.7.9 version in order to use ``validate_certs`` option, as this version is capable of changing the SSL verification behaviors. - - -Example description -=================== - -User can run playbooks against VMware virtual machines using ``vmware_tools`` connection plugin. - -In order work with ``vmware_tools`` connection plugin, you will need to specify hostvars for the given virtual machine. - -For example, if you want to run a playbook on a virtual machine called ``centos_7`` located at ``/Asia-Datacenter1/prod/centos_7`` in the given vCenter, you will need to specify hostvars as follows: - -.. code-block:: ini - - [centos7] - host1 - - [centos7:vars] - # vmware_tools related variables - ansible_connection=vmware_tools - ansible_vmware_host=10.65.201.128 - ansible_vmware_user=administrator@vsphere.local - ansible_vmware_password=Esxi@123$% - ansible_vmware_validate_certs=no - - # Location of the virtual machine - ansible_vmware_guest_path=Asia-Datacenter1/vm/prod/centos_7 - - # Credentials - ansible_vmware_tools_user=root - ansible_vmware_tools_password=Secret123 - -Here, we are providing vCenter details and credentials for the given virtual machine to run the playbook on. -If your virtual machine path is ``Asia-Datacenter1/prod/centos_7``, you specify ``ansible_vmware_guest_path`` as ``Asia-Datacenter1/vm/prod/centos_7``. Please take a note that ``/vm`` is added in the virtual machine path, since this is a logical folder structure in the VMware inventory. - -Let us now run following playbook, - -.. code-block:: yaml - - --- - - name: Example showing VMware Connection plugin - hosts: centos7 - tasks: - - name: Gather information about temporary directory inside VM - shell: ls /tmp - - -Since Ansible utilizes the ``vmware-tools`` or ``openvm-tools`` service capabilities running in the virtual machine to perform actions, in this use case it will be connecting directly to the guest machine. - - -For now, you will be entering credentials in plain text, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials <https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html>`_. - - -What to expect --------------- - -Running this playbook can take some time, depending on your environment and network connectivity. When the run is complete you will see: - -.. code-block:: yaml - - { - "changed": true, - "cmd": "ls /tmp", - "delta": "0:00:00.005440", - "end": "2020-10-01 07:30:56.940813", - "rc": 0, - "start": "2020-10-01 07:30:56.935373", - "stderr": "", - "stderr_lines": [], - "stdout": "ansible_command_payload_JzWiL9\niso", - "stdout_lines": ["ansible_command_payload_JzWiL9", "iso", "vmware-root"] - } - -Troubleshooting ---------------- - -If your playbook fails: - -- Check if the values provided for username and password are correct. -- Check if the path of virtual machine is correct. Please mind that ``/vm/`` needs to be provided while specifying virtual machine location. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_concepts.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_concepts.rst deleted file mode 100644 index 2829624ac..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_concepts.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_concepts: - -*************************** -Ansible for VMware Concepts -*************************** - -Some of these concepts are common to all uses of Ansible, including VMware automation; some are specific to VMware. You need to understand them to use Ansible for VMware automation. This introduction provides the background you need to follow the :ref:`scenarios<vmware_scenarios>` in this guide. - -.. contents:: - :local: - -Control Node -============ - -Any machine with Ansible installed. You can run commands and playbooks, invoking ``/usr/bin/ansible`` or ``/usr/bin/ansible-playbook``, from any control node. You can use any computer that has Python installed on it as a control node - laptops, shared desktops, and servers can all run Ansible. However, you cannot use a Windows machine as a control node. You can have multiple control nodes. - -Delegation -========== - -Delegation allows you to select the system that executes a given task. If you do not have ``pyVmomi`` installed on your control node, use the ``delegate_to`` keyword on VMware-specific tasks to execute them on any host where you have ``pyVmomi`` installed. - -Modules -======= - -The units of code Ansible executes. Each module has a particular use, from creating virtual machines on vCenter to managing distributed virtual switches in the vCenter environment. You can invoke a single module with a task, or invoke several different modules in a playbook. - -Playbooks -========= - -Ordered lists of tasks, saved so you can run those tasks in that order repeatedly. Playbooks can include variables as well as tasks. Playbooks are written in YAML and are easy to read, write, share and understand. - -pyVmomi -======= - -Ansible VMware modules are written on top of `pyVmomi <https://github.com/vmware/pyvmomi>`_. ``pyVmomi`` is the official Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, and vCenter infrastructure. - -You need to install this Python SDK on host from where you want to invoke VMware automation. For example, if you are using control node then ``pyVmomi`` must be installed on control node. - -If you are using any ``delegate_to`` host which is different from your control node then you need to install ``pyVmomi`` on that ``delegate_to`` node. - -You can install pyVmomi using pip: - -.. code-block:: bash - - $ pip install pyvmomi diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_external_doc_links.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_external_doc_links.rst deleted file mode 100644 index afd2275e9..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_external_doc_links.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_external_doc_links: - -***************************** -Other useful VMware resources -***************************** - -* `VMware API and SDK Documentation <https://www.vmware.com/support/pubs/sdk_pubs.html>`_ -* `Ansible VMware community wiki page <https://github.com/ansible/community/wiki/VMware>`_ -* `VMware's official Guest Operating system customization matrix <https://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf>`_ -* `VMware Compatibility Guide <https://www.vmware.com/resources/compatibility/search.php>`_ diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_getting_started.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_getting_started.rst deleted file mode 100644 index 1b2d34a8f..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_getting_started.rst +++ /dev/null @@ -1,9 +0,0 @@ -:orphan: - -.. _ansible_collections.community.vmware.docsite.vmware_ansible_getting_started: - -*************************************** -Getting Started with Ansible for VMware -*************************************** - -This will have a basic "hello world" scenario/walkthrough that gets the user introduced to the basics. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_intro.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_intro.rst deleted file mode 100644 index ddc1433c6..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_intro.rst +++ /dev/null @@ -1,54 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_ansible_intro: - -********************************** -Introduction to Ansible for VMware -********************************** - -.. contents:: - :local: - -Introduction -============ - -Ansible provides various modules to manage VMware infrastructure, which includes datacenter, cluster, -host system and virtual machine. - -Requirements -============ - -Ansible VMware modules are written on top of `pyVmomi <https://github.com/vmware/pyvmomi>`_. -pyVmomi is the Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, -and vCenter infrastructure. You can install pyVmomi using pip (you may need to use pip3, depending on your OS/distro): - -.. code-block:: bash - - $ pip install pyvmomi - -Ansible VMware modules leveraging latest vSphere(6.0+) features are using `vSphere Automation Python SDK <https://github.com/vmware/vsphere-automation-sdk-python>`_. The vSphere Automation Python SDK also has client libraries, documentation, and sample code for VMware Cloud on AWS Console APIs, NSX VMware Cloud on AWS integration APIs, VMware Cloud on AWS site recovery APIs, NSX-T APIs. - -You can install vSphere Automation Python SDK using pip: - -.. code-block:: bash - - $ pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git - -Note: - Installing vSphere Automation Python SDK also installs ``pyvmomi``. A separate installation of ``pyvmomi`` is not required. - -vmware_guest module -=================== - -The :ref:`vmware_guest<ansible_collections.community.vmware.vmware_guest_module>` module manages various operations related to virtual machines in the given ESXi or vCenter server. - - -.. seealso:: - - `pyVmomi <https://github.com/vmware/pyvmomi>`_ - The GitHub Page of pyVmomi - `pyVmomi Issue Tracker <https://github.com/vmware/pyvmomi/issues>`_ - The issue tracker for the pyVmomi project - `govc <https://github.com/vmware/govmomi/tree/master/govc>`_ - govc is a vSphere CLI built on top of govmomi - :ref:`working_with_playbooks` - An introduction to playbooks - diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory.rst deleted file mode 100644 index becd718aa..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory.rst +++ /dev/null @@ -1,91 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_ansible_inventory: - -************************************* -Using VMware dynamic inventory plugin -************************************* - -.. contents:: - :local: - -VMware Dynamic Inventory Plugin -=============================== - - -The best way to interact with your hosts is to use the VMware dynamic inventory plugin, which dynamically queries VMware APIs and -tells Ansible what nodes can be managed. - -Requirements ------------- - -To use the VMware dynamic inventory plugins, you must install `pyVmomi <https://github.com/vmware/pyvmomi>`_ -on your control node (the host running Ansible). - -To include tag-related information for the virtual machines in your dynamic inventory, you also need the `vSphere Automation SDK <https://code.vmware.com/web/sdk/65/vsphere-automation-python>`_, which supports REST API features like tagging and content libraries, on your control node. -You can install the ``vSphere Automation SDK`` following `these instructions <https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages>`_. - -.. code-block:: bash - - $ pip install pyvmomi - -To use this VMware dynamic inventory plugin, you need to enable it first by specifying the following in the ``ansible.cfg`` file: - -.. code-block:: ini - - [inventory] - enable_plugins = vmware_vm_inventory - -Then, create a file that ends in ``.vmware.yml`` or ``.vmware.yaml`` in your working directory. - -The ``vmware_vm_inventory`` script takes in the same authentication information as any VMware module. - -Here's an example of a valid inventory file: - -.. code-block:: yaml - - plugin: vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: True - - -Executing ``ansible-inventory --list -i <filename>.vmware.yml`` will create a list of VMware instances that are ready to be configured using Ansible. - -Using vaulted configuration files -================================= - -Since the inventory configuration file contains vCenter password in plain text, a security risk, you may want to -encrypt your entire inventory configuration file. - -You can encrypt a valid inventory configuration file as follows: - -.. code-block:: bash - - $ ansible-vault encrypt <filename>.vmware.yml - New Vault password: - Confirm New Vault password: - Encryption successful - -And you can use this vaulted inventory configuration file using: - -.. code-block:: bash - - $ ansible-inventory -i filename.vmware.yml --list --vault-password-file=/path/to/vault_password_file - - -.. seealso:: - - `pyVmomi <https://github.com/vmware/pyvmomi>`_ - The GitHub Page of pyVmomi - `pyVmomi Issue Tracker <https://github.com/vmware/pyvmomi/issues>`_ - The issue tracker for the pyVmomi project - `vSphere Automation SDK GitHub Page <https://github.com/vmware/vsphere-automation-sdk-python>`_ - The GitHub Page of vSphere Automation SDK for Python - `vSphere Automation SDK Issue Tracker <https://github.com/vmware/vsphere-automation-sdk-python/issues>`_ - The issue tracker for vSphere Automation SDK for Python - :ref:`working_with_playbooks` - An introduction to playbooks - :ref:`playbooks_vault` - Using Vault in playbooks diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_filters.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_filters.rst deleted file mode 100644 index eb309cf0e..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_filters.rst +++ /dev/null @@ -1,216 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_ansible_inventory_using_filters: - -*********************************************** -Using VMware dynamic inventory plugin - Filters -*********************************************** - -.. contents:: - :local: - -VMware dynamic inventory plugin - filtering VMware guests -========================================================= - - -VMware inventory plugin allows you to filter VMware guests using the ``filters`` configuration parameter. - -This section shows how you configure ``filters`` for the given VMware guest in the inventory. - -Requirements ------------- - -To use the VMware dynamic inventory plugins, you must install `pyVmomi <https://github.com/vmware/pyvmomi>`_ -on your control node (the host running Ansible). - -To include tag-related information for the virtual machines in your dynamic inventory, you also need the `vSphere Automation SDK <https://code.vmware.com/web/sdk/65/vsphere-automation-python>`_, which supports REST API features such as tagging and content libraries, on your control node. -You can install the ``vSphere Automation SDK`` following `these instructions <https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages>`_. - -.. code-block:: bash - - $ pip install pyvmomi - -Starting in Ansible 2.10, the VMware dynamic inventory plugin is available in the ``community.vmware`` collection included Ansible. -Alternately, to install the latest ``community.vmware`` collection: - -.. code-block:: bash - - $ ansible-galaxy collection install community.vmware - -To use this VMware dynamic inventory plugin: - -1. Enable it first by specifying the following in the ``ansible.cfg`` file: - -.. code-block:: ini - - [inventory] - enable_plugins = community.vmware.vmware_vm_inventory - -2. Create a file that ends in ``vmware.yml`` or ``vmware.yaml`` in your working directory. - -The ``vmware_vm_inventory`` inventory plugin takes in the same authentication information as any other VMware modules does. - -Let us assume we want to list all RHEL7 VMs with the power state as "poweredOn". A valid inventory file with filters for the given VMware guest looks as follows: - -.. code-block:: yaml - - plugin: community.vmware.vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: False - hostnames: - - config.name - filters: - - config.guestId == "rhel7_64Guest" - - summary.runtime.powerState == "poweredOn" - - -Here, we have configured two filters - - -* ``config.guestId`` is equal to ``rhel7_64Guest`` -* ``summary.runtime.powerState`` is equal to ``poweredOn`` - -This retrieves all the VMs which satisfy these two conditions and populates them in the inventory. -Notice that the conditions are combined using an ``and`` operation. - -Using ``or`` conditions in filters -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Let us assume you want filter RHEL7 and Ubuntu VMs. You can use multiple filters using ``or`` condition in your inventory file. - -A valid filter in the VMware inventory file for this example is: - -.. code-block:: yaml - - plugin: community.vmware.vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: False - hostnames: - - config.name - filters: - - config.guestId == "rhel7_64Guest" or config.guestId == "ubuntu64Guest" - - -You can check all allowed properties for filters for the given virtual machine at :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes`. - -If you are using the ``properties`` parameter with custom VM properties, make sure that you include all the properties used by filters as well in your VM property list. - -For example, if we want all RHEL7 and Ubuntu VMs that are poweredOn, you can use inventory file: - -.. code-block:: yaml - - plugin: community.vmware.vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: False - hostnames: - - 'config.name' - properties: - - 'config.name' - - 'config.guestId' - - 'guest.ipAddress' - - 'summary.runtime.powerState' - filters: - - config.guestId == "rhel7_64Guest" or config.guestId == "ubuntu64Guest" - - summary.runtime.powerState == "poweredOn" - -Here, we are using minimum VM properties, that is ``config.name``, ``config.guestId``, ``summary.runtime.powerState``, and ``guest.ipAddress``. - -* ``config.name`` is used by the ``hostnames`` parameter. -* ``config.guestId`` and ``summary.runtime.powerState`` are used by the ``filters`` parameter. -* ``guest.guestId`` is used by ``ansible_host`` internally by the inventory plugin. - -Using regular expression in filters -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Let us assume you want filter VMs with specific IP range. You can use regular expression in ``filters`` in your inventory file. - -For example, if we want all RHEL7 and Ubuntu VMs that are poweredOn, you can use inventory file: - -.. code-block:: yaml - - plugin: community.vmware.vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: False - hostnames: - - 'config.name' - properties: - - 'config.name' - - 'config.guestId' - - 'guest.ipAddress' - - 'summary.runtime.powerState' - filters: - - guest.ipAddress is defined and guest.ipAddress is match('192.168.*') - -Here, we are using ``guest.ipAddress`` VM property. This property is optional and depended upon VMware tools installed on VMs. -We are using ``match`` to validate the regular expression for the given IP range. - -Executing ``ansible-inventory --list -i <filename>.vmware.yml`` creates a list of the virtual machines that are ready to be configured using Ansible. - -What to expect --------------- - -You will notice that the inventory hosts are filtered depending on your ``filters`` section. - - -.. code-block:: yaml - - { - "_meta": { - "hostvars": { - "template_001": { - "config.name": "template_001", - "config.guestId": "ubuntu64Guest", - ... - "guest.toolsStatus": "toolsNotInstalled", - "summary.runtime.powerState": "poweredOn", - }, - "vm_8046": { - "config.name": "vm_8046", - "config.guestId": "rhel7_64Guest", - ... - "guest.toolsStatus": "toolsNotInstalled", - "summary.runtime.powerState": "poweredOn", - }, - ... - } - -Troubleshooting filters ------------------------ - -If the custom property specified in ``filters`` fails: - -- Check if the values provided for username and password are correct. -- Make sure it is a valid property, see :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes`. -- Use ``strict: True`` to get more information about the error. -- Please make sure that you are using latest version of the VMware collection. - - -.. seealso:: - - `pyVmomi <https://github.com/vmware/pyvmomi>`_ - The GitHub Page of pyVmomi - `pyVmomi Issue Tracker <https://github.com/vmware/pyvmomi/issues>`_ - The issue tracker for the pyVmomi project - `vSphere Automation SDK GitHub Page <https://github.com/vmware/vsphere-automation-sdk-python>`_ - The GitHub Page of vSphere Automation SDK for Python - `vSphere Automation SDK Issue Tracker <https://github.com/vmware/vsphere-automation-sdk-python/issues>`_ - The issue tracker for vSphere Automation SDK for Python - :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes` - Using Virtual machine attributes in VMware dynamic inventory plugin - :ref:`working_with_playbooks` - An introduction to playbooks - :ref:`playbooks_vault` - Using Vault in playbooks diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_hostnames.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_hostnames.rst deleted file mode 100644 index d89639506..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_hostnames.rst +++ /dev/null @@ -1,128 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_ansible_inventory_using_hostnames: - -************************************************* -Using VMware dynamic inventory plugin - Hostnames -************************************************* - -.. contents:: - :local: - -VMware dynamic inventory plugin - customizing hostnames -======================================================= - - -VMware inventory plugin allows you to configure hostnames using the ``hostnames`` configuration parameter. - -In this scenario guide we will see how you configure hostnames from the given VMware guest in the inventory. - -Requirements ------------- - -To use the VMware dynamic inventory plugins, you must install `pyVmomi <https://github.com/vmware/pyvmomi>`_ -on your control node (the host running Ansible). - -To include tag-related information for the virtual machines in your dynamic inventory, you also need the `vSphere Automation SDK <https://code.vmware.com/web/sdk/65/vsphere-automation-python>`_, which supports REST API features such as tagging and content libraries, on your control node. -You can install the ``vSphere Automation SDK`` following `these instructions <https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages>`_. - -.. code-block:: bash - - $ pip install pyvmomi - -Starting in Ansible 2.10, the VMware dynamic inventory plugin is available in the ``community.vmware`` collection included Ansible. -To install the latest ``community.vmware`` collection: - -.. code-block:: bash - - $ ansible-galaxy collection install community.vmware - -To use this VMware dynamic inventory plugin: - -1. Enable it first by specifying the following in the ``ansible.cfg`` file: - -.. code-block:: ini - - [inventory] - enable_plugins = community.vmware.vmware_vm_inventory - -2. Create a file that ends in ``vmware.yml`` or ``vmware.yaml`` in your working directory. - -The ``vmware_vm_inventory`` inventory plugin takes in the same authentication information as any other VMware modules does. - -Here's an example of a valid inventory file with custom hostname for the given VMware guest: - -.. code-block:: yaml - - plugin: community.vmware.vmware_vm_inventory - strict: False - hostname: 10.65.223.31 - username: administrator@vsphere.local - password: Esxi@123$% - validate_certs: False - with_tags: False - hostnames: - - config.name - - -Here, we have configured a custom hostname by setting the ``hostnames`` parameter to ``config.name``. This will retrieve -the ``config.name`` property from the virtual machine and populate it in the inventory. - -You can check all allowed properties for the given virtual machine at :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes`. - -Executing ``ansible-inventory --list -i <filename>.vmware.yml`` creates a list of the virtual machines that are ready to be configured using Ansible. - -What to expect --------------- - -You will notice that instead of default behavior of representing the hostname as ``config.name + _ + config.uuid``, -the inventory hosts show value as ``config.name``. - - -.. code-block:: yaml - - { - "_meta": { - "hostvars": { - "template_001": { - "config.name": "template_001", - "guest.toolsRunningStatus": "guestToolsNotRunning", - ... - "guest.toolsStatus": "toolsNotInstalled", - "name": "template_001" - }, - "vm_8046": { - "config.name": "vm_8046", - "guest.toolsRunningStatus": "guestToolsNotRunning", - ... - "guest.toolsStatus": "toolsNotInstalled", - "name": "vm_8046" - }, - ... - } - -Troubleshooting ---------------- - -If the custom property specified in ``hostnames`` fails: - -- Check if the values provided for username and password are correct. -- Make sure it is a valid property, see :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes`. -- Use ``strict: True`` to get more information about the error. -- Please make sure that you are using latest version VMware collection. - - -.. seealso:: - - `pyVmomi <https://github.com/vmware/pyvmomi>`_ - The GitHub Page of pyVmomi - `pyVmomi Issue Tracker <https://github.com/vmware/pyvmomi/issues>`_ - The issue tracker for the pyVmomi project - `vSphere Automation SDK GitHub Page <https://github.com/vmware/vsphere-automation-sdk-python>`_ - The GitHub Page of vSphere Automation SDK for Python - `vSphere Automation SDK Issue Tracker <https://github.com/vmware/vsphere-automation-sdk-python/issues>`_ - The issue tracker for vSphere Automation SDK for Python - :ref:`ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes` - Using Virtual machine attributes in VMware dynamic inventory plugin - :ref:`working_with_playbooks` - An introduction to playbooks - :ref:`playbooks_vault` - Using Vault in playbooks diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_vm_attributes.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_vm_attributes.rst deleted file mode 100644 index eda856ee3..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_inventory_vm_attributes.rst +++ /dev/null @@ -1,1184 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_inventory_vm_attributes: - -******************************************************************* -Using Virtual machine attributes in VMware dynamic inventory plugin -******************************************************************* - -.. contents:: - :local: - -Virtual machine attributes -========================== - -You can use virtual machine properties which can be used to populate ``hostvars`` for the given -virtual machine in a VMware dynamic inventory plugin. - -capability ----------- - -This section describes settings for the runtime capabilities of the virtual machine. - -snapshotOperationsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports snapshot operations. - -multipleSnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports multiple snapshots. - This value is not set when the virtual machine is unavailable, for instance, when it is being created or deleted. - -snapshotConfigSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports snapshot config. - -poweredOffSnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports snapshot operations in ``poweredOff`` state. - -memorySnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports memory snapshots. - -revertToSnapshotSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports reverting to a snapshot. - -quiescedSnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports quiesced snapshots. - -disableSnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not snapshots can be disabled. - -lockSnapshotsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not the snapshot tree can be locked. - -consolePreferencesSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether console preferences can be set for the virtual machine. - -cpuFeatureMaskSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether CPU feature requirements masks can be set for the virtual machine. - -s1AcpiManagementSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not a virtual machine supports ACPI S1 settings management. - -settingScreenResolutionSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not the virtual machine supports setting the screen resolution of the console window. - -toolsAutoUpdateSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Supports tools auto-update. - -vmNpivWwnSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^ - - Supports virtual machine NPIV WWN. - -npivWwnOnNonRdmVmSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Supports assigning NPIV WWN to virtual machines that do not have RDM disks. - -vmNpivWwnDisableSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the NPIV disabling operation is supported on the virtual machine. - -vmNpivWwnUpdateSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the update of NPIV WWNs are supported on the virtual machine. - -swapPlacementSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Flag indicating whether the virtual machine has a configurable (swapfile placement policy). - -toolsSyncTimeSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether asking tools to sync time with the host is supported. - -virtualMmuUsageSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not the use of nested page table hardware support can be explicitly set. - -diskSharesSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether resource settings for disks can be applied to the virtual machine. - -bootOptionsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether boot options can be configured for the virtual machine. - -bootRetryOptionsSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether automatic boot retry can be configured for the virtual machine. - -settingVideoRamSizeSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Flag indicating whether the video RAM size of the virtual machine can be configured. - -settingDisplayTopologySupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not the virtual machine supports setting the display topology of the console window. - -recordReplaySupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether record and replay functionality is supported on the virtual machine. - -changeTrackingSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates that change tracking is supported for virtual disks of the virtual machine. - However, even if change tracking is supported, it might not be available for all disks of the virtual machine. - For example, passthru raw disk mappings or disks backed by any Ver1BackingInfo cannot be tracked. - -multipleCoresPerSocketSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether multiple virtual cores per socket is supported on the virtual machine. - -hostBasedReplicationSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates that host based replication is supported on the virtual machine. - However, even if host based replication is supported, it might not be available for all disk types. - For example, passthru raw disk mappings can not be replicated. - -guestAutoLockSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not guest autolock is supported on the virtual machine. - -memoryReservationLockSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether :ref:`ansible_collections.community.vmware.docsite.memory_reservation_locked_to_max` may be set to true for the virtual machine. - -featureRequirementSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the featureRequirement feature is supported. - -poweredOnMonitorTypeChangeSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether a monitor type change is supported while the virtual machine is in the ``poweredOn`` state. - -seSparseDiskSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the virtual machine supports the Flex-SE (space-efficent, sparse) format for virtual disks. - -nestedHVSupported (bool) -^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the virtual machine supports nested hardware-assisted virtualization. - -vPMCSupported (bool) -^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the virtual machine supports virtualized CPU performance counters. - - -config ------- - -This section describes the configuration settings of the virtual machine, including the name and UUID. -This property is set when a virtual machine is created or when the ``reconfigVM`` method is called. -The virtual machine configuration is not guaranteed to be available. -For example, the configuration information would be unavailable if the server is unable to access the virtual machine files on disk, and is often also unavailable during the initial phases of virtual machine creation. - -changeVersion (str) -^^^^^^^^^^^^^^^^^^^ - - The changeVersion is a unique identifier for a given version of the configuration. - Each change to the configuration updates this value. This is typically implemented as an ever increasing count or a time-stamp. - However, a client should always treat this as an opaque string. - -modified (datetime) -^^^^^^^^^^^^^^^^^^^ - - Last time a virtual machine's configuration was modified. - -name (str) -^^^^^^^^^^ - - Display name of the virtual machine. Any / (slash), \ (backslash), character used in this name element is escaped. Similarly, any % (percent) character used in this name element is escaped, unless it is used to start an escape sequence. A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25. - -.. _ansible_collections.community.vmware.docsite.guest_full_name: - -guestFullName (str) -^^^^^^^^^^^^^^^^^^^ - - This is the full name of the guest operating system for the virtual machine. For example: Windows 2000 Professional. See :ref:`ansible_collections.community.vmware.docsite.alternate_guest_name`. - -version (str) -^^^^^^^^^^^^^ - - The version string for the virtual machine. - -uuid (str) -^^^^^^^^^^ - - 128-bit SMBIOS UUID of a virtual machine represented as a hexadecimal string in "12345678-abcd-1234-cdef-123456789abc" format. - -instanceUuid (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - VirtualCenter-specific 128-bit UUID of a virtual machine, represented as a hexademical string. This identifier is used by VirtualCenter to uniquely identify all virtual machine instances, including those that may share the same SMBIOS UUID. - -npivNodeWorldWideName (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A 64-bit node WWN (World Wide Name). - -npivPortWorldWideName (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A 64-bit port WWN (World Wide Name). - -npivWorldWideNameType (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The source that provides/generates the assigned WWNs. - -npivDesiredNodeWwns (short, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The NPIV node WWNs to be extended from the original list of WWN numbers. - -npivDesiredPortWwns (short, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The NPIV port WWNs to be extended from the original list of WWN numbers. - -npivTemporaryDisabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - This property is used to enable or disable the NPIV capability on a desired virtual machine on a temporary basis. - -npivOnNonRdmDisks (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - This property is used to check whether the NPIV can be enabled on the Virtual machine with non-rdm disks in the configuration, so this is potentially not enabling npiv on vmfs disks. - Also this property is used to check whether RDM is required to generate WWNs for a virtual machine. - -locationId (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Hash incorporating the virtual machine's config file location and the UUID of the host assigned to run the virtual machine. - -template (bool) -^^^^^^^^^^^^^^^ - - Flag indicating whether or not a virtual machine is a template. - -guestId (str) -^^^^^^^^^^^^^ - - Guest operating system configured on a virtual machine. - -.. _ansible_collections.community.vmware.docsite.alternate_guest_name: - -alternateGuestName (str) -^^^^^^^^^^^^^^^^^^^^^^^^ - - Used as display name for the operating system if guestId isotherorother-64. See :ref:`ansible_collections.community.vmware.docsite.guest_full_name`. - -annotation (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Description for the virtual machine. - -files (vim.vm.FileInfo) -^^^^^^^^^^^^^^^^^^^^^^^ - - Information about the files associated with a virtual machine. - This information does not include files for specific virtual disks or snapshots. - -tools (vim.vm.ToolsConfigInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration of VMware Tools running in the guest operating system. - -flags (vim.vm.FlagInfo) -^^^^^^^^^^^^^^^^^^^^^^^ - - Additional flags for a virtual machine. - -consolePreferences (vim.vm.ConsolePreferences, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Legacy console viewer preferences when doing power operations. - -defaultPowerOps (vim.vm.DefaultPowerOpInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration of default power operations. - -hardware (vim.vm.VirtualHardware) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Processor, memory, and virtual devices for a virtual machine. - -cpuAllocation (vim.ResourceAllocationInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Resource limits for CPU. - -memoryAllocation (vim.ResourceAllocationInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Resource limits for memory. - -latencySensitivity (vim.LatencySensitivity, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The latency-sensitivity of the virtual machine. - -memoryHotAddEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Whether memory can be added while the virtual machine is running. - -cpuHotAddEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Whether virtual processors can be added while the virtual machine is running. - -cpuHotRemoveEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Whether virtual processors can be removed while the virtual machine is running. - -hotPlugMemoryLimit (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The maximum amount of memory, in MB, than can be added to a running virtual machine. - -hotPlugMemoryIncrementSize (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Memory, in MB that can be added to a running virtual machine. - -cpuAffinity (vim.vm.AffinityInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Affinity settings for CPU. - -memoryAffinity (vim.vm.AffinityInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Affinity settings for memory. - -networkShaper (vim.vm.NetworkShaperInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Resource limits for network. - -extraConfig (vim.option.OptionValue, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Additional configuration information for the virtual machine. - -cpuFeatureMask (vim.host.CpuIdInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Specifies CPU feature compatibility masks that override the defaults from the ``GuestOsDescriptor`` of the virtual machine's guest OS. - -datastoreUrl (vim.vm.ConfigInfo.DatastoreUrlPair, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Enumerates the set of datastores that the virtual machine is stored on, as well as the URL identification for each of these. - -swapPlacement (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Virtual machine swapfile placement policy. - -bootOptions (vim.vm.BootOptions, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration options for the boot behavior of the virtual machine. - -ftInfo (vim.vm.FaultToleranceConfigInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Fault tolerance settings for the virtual machine. - -vAppConfig (vim.vApp.VmConfigInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - vApp meta-data for the virtual machine. - -vAssertsEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether user-configured virtual asserts will be triggered during virtual machine replay. - -changeTrackingEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether changed block tracking for the virtual machine's disks is active. - -firmware (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^ - - Information about firmware type for the virtual machine. - -maxMksConnections (int, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates the maximum number of active remote display connections that the virtual machine will support. - -guestAutoLockEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the guest operating system will logout any active sessions whenever there are no remote display connections open to the virtual machine. - -managedBy (vim.ext.ManagedByInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Specifies that the virtual machine is managed by a VC Extension. - -.. _ansible_collections.community.vmware.docsite.memory_reservation_locked_to_max: - -memoryReservationLockedToMax (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - If set true, memory resource reservation for the virtual machine will always be equal to the virtual machine's memory size; increases in memory size will be rejected when a corresponding reservation increase is not possible. - -initialOverhead (vim.vm.ConfigInfo.OverheadInfo), optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Set of values to be used only to perform admission control when determining if a host has sufficient resources for the virtual machine to power on. - -nestedHVEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the virtual machine is configured to use nested hardware-assisted virtualization. - -vPMCEnabled (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether the virtual machine have virtual CPU performance counters enabled. - -scheduledHardwareUpgradeInfo (vim.vm.ScheduledHardwareUpgradeInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration of scheduled hardware upgrades and result from last attempt to run scheduled hardware upgrade. - -vFlashCacheReservation (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Specifies the total vFlash resource reservation for the vFlash caches associated with the virtual machine's virtual disks, in bytes. - -layout ------- - -Detailed information about the files that comprise the virtual machine. - -configFile (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A list of files that makes up the configuration of the virtual machine (excluding the .vmx file, since that file is represented in the FileInfo). - These are relative paths from the configuration directory. - A slash is always used as a separator. - This list will typically include the NVRAM file, but could also include other meta-data files. - -logFile (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^ - - A list of files stored in the virtual machine's log directory. - These are relative paths from the ``logDirectory``. - A slash is always used as a separator. - -disk (vim.vm.FileLayout.DiskLayout, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Files making up each virtual disk. - -snapshot (vim.vm.FileLayout.SnapshotLayout, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Files of each snapshot. - -swapFile (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^ - - The swapfile specific to the virtual machine, if any. This is a complete datastore path, not a relative path. - - -layoutEx --------- - -Detailed information about the files that comprise the virtual machine. - -file (vim.vm.FileLayoutEx.FileInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Information about all the files that constitute the virtual machine including configuration files, disks, swap file, suspend file, log files, core files, memory file and so on. - -disk (vim.vm.FileLayoutEx.DiskLayout, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Layout of each virtual disk attached to the virtual machine. - For a virtual machine with snaphots, this property gives only those disks that are attached to it at the current point of running. - -snapshot (vim.vm.FileLayoutEx.SnapshotLayout, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Layout of each snapshot of the virtual machine. - -timestamp (datetime) -^^^^^^^^^^^^^^^^^^^^ - - Time when values in this structure were last updated. - -storage (vim.vm.StorageInfo) ----------------------------- - -Storage space used by the virtual machine, split by datastore. - -perDatastoreUsage (vim.vm.StorageInfo.UsageOnDatastore, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Storage space used by the virtual machine on all datastores that it is located on. - Total storage space committed to the virtual machine across all datastores is simply an aggregate of the property ``committed`` - -timestamp (datetime) -^^^^^^^^^^^^^^^^^^^^ - - Time when values in this structure were last updated. - -environmentBrowser (vim.EnvironmentBrowser) -------------------------------------------- - -The current virtual machine's environment browser object. -This contains information on all the configurations that can be used on the virtual machine. -This is identical to the environment browser on the ComputeResource to which the virtual machine belongs. - -datastoreBrowser (vim.host.DatastoreBrowser) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - DatastoreBrowser to browse datastores that are available on this entity. - -resourcePool (vim.ResourcePool) -------------------------------- - -The current resource pool that specifies resource allocation for the virtual machine. -This property is set when a virtual machine is created or associated with a different resource pool. -Returns null if the virtual machine is a template or the session has no access to the resource pool. - -summary (vim.ResourcePool.Summary) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Basic information about a resource pool. - -runtime (vim.ResourcePool.RuntimeInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Runtime information about a resource pool. - -owner (vim.ComputeResource) -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The ComputeResource to which this set of one or more nested resource pools belong. - -resourcePool (vim.ResourcePool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The set of child resource pools. - -vm (vim.VirtualMachine) -^^^^^^^^^^^^^^^^^^^^^^^ - - The set of virtual machines associated with this resource pool. - -config (vim.ResourceConfigSpec) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration of this resource pool. - -childConfiguration (vim.ResourceConfigSpec) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The resource configuration of all direct children (VirtualMachine and ResourcePool) of this resource group. - -parentVApp (vim.ManagedEntity) ------------------------------- - -Reference to the parent vApp. - -parent (vim.ManagedEntity) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Parent of this entity. - This value is null for the root object and for (VirtualMachine) objects that are part of a (VirtualApp). - -customValue (vim.CustomFieldsManager.Value) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Custom field values. - -overallStatus (vim.ManagedEntity.Status) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - General health of this managed entity. - -configStatus (vim.ManagedEntity.Status) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The configStatus indicates whether or not the system has detected a configuration issue involving this entity. - For example, it might have detected a duplicate IP address or MAC address, or a host in a cluster might be out of ``compliance.property``. - -configIssue (vim.event.Event) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current configuration issues that have been detected for this entity. - -effectiveRole (int) -^^^^^^^^^^^^^^^^^^^ - - Access rights the current session has to this entity. - -permission (vim.AuthorizationManager.Permission) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - List of permissions defined for this entity. - -name (str) -^^^^^^^^^^ - - Name of this entity, unique relative to its parent. - Any / (slash), \ (backslash), character used in this name element will be escaped. - Similarly, any % (percent) character used in this name element will be escaped, unless it is used to start an escape sequence. - A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25. - -disabledMethod (str) -^^^^^^^^^^^^^^^^^^^^ - - List of operations that are disabled, given the current runtime state of the entity. - For example, a power-on operation always fails if a virtual machine is already powered on. - -recentTask (vim.Task) -^^^^^^^^^^^^^^^^^^^^^ - - The set of recent tasks operating on this managed entity. - A task in this list could be in one of the four states: pending, running, success or error. - -declaredAlarmState (vim.alarm.AlarmState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A set of alarm states for alarms that apply to this managed entity. - -triggeredAlarmState (vim.alarm.AlarmState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A set of alarm states for alarms triggered by this entity or by its descendants. - -alarmActionsEnabled (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Whether alarm actions are enabled for this entity. True if enabled; false otherwise. - -tag (vim.Tag) -^^^^^^^^^^^^^ - - The set of tags associated with this managed entity. Experimental. Subject to change. - -resourceConfig (vim.ResourceConfigSpec) ---------------------------------------- - - The resource configuration for a virtual machine. - -entity (vim.ManagedEntity, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Reference to the entity with this resource specification: either a VirtualMachine or a ResourcePool. - -changeVersion (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The changeVersion is a unique identifier for a given version of the configuration. Each change to the configuration will update this value. - This is typically implemented as an ever increasing count or a time-stamp. - - -lastModified (datetime, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Timestamp when the resources were last modified. This is ignored when the object is used to update a configuration. - -cpuAllocation (vim.ResourceAllocationInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Resource allocation for CPU. - -memoryAllocation (vim.ResourceAllocationInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Resource allocation for memory. - -runtime (vim.vm.RuntimeInfo) ----------------------------- - -Execution state and history for the virtual machine. - -device (vim.vm.DeviceRuntimeInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Per-device runtime info. This array will be empty if the host software does not provide runtime info for any of the device types currently in use by the virtual machine. - -host (vim.HostSystem, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The host that is responsible for running a virtual machine. - This property is null if the virtual machine is not running and is not assigned to run on a particular host. - -connectionState (vim.VirtualMachine.ConnectionState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Indicates whether or not the virtual machine is available for management. - -powerState (vim.VirtualMachine.PowerState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The current power state of the virtual machine. - -faultToleranceState (vim.VirtualMachine.FaultToleranceState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The fault tolerance state of the virtual machine. - -dasVmProtection (vim.vm.RuntimeInfo.DasProtectionState, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The vSphere HA protection state for a virtual machine. - Property is unset if vSphere HA is not enabled. - -toolsInstallerMounted (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Flag to indicate whether or not the VMware Tools installer is mounted as a CD-ROM. - -suspendTime (datetime, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The timestamp when the virtual machine was most recently suspended. - This property is updated every time the virtual machine is suspended. - -bootTime (datetime, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The timestamp when the virtual machine was most recently powered on. - This property is updated when the virtual machine is powered on from the poweredOff state, and is cleared when the virtual machine is powered off. - This property is not updated when a virtual machine is resumed from a suspended state. - -suspendInterval (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The total time the virtual machine has been suspended since it was initially powered on. - This time excludes the current period, if the virtual machine is currently suspended. - This property is updated when the virtual machine resumes, and is reset to zero when the virtual machine is powered off. - -question (vim.vm.QuestionInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The current question, if any, that is blocking the virtual machine's execution. - -memoryOverhead (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The amount of memory resource (in bytes) that will be used by the virtual machine above its guest memory requirements. - This value is set if and only if the virtual machine is registered on a host that supports memory resource allocation features. - For powered off VMs, this is the minimum overhead required to power on the VM on the registered host. - For powered on VMs, this is the current overhead reservation, a value which is almost always larger than the minimum overhead, and which grows with time. - -maxCpuUsage (int, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current upper-bound on CPU usage. - The upper-bound is based on the host the virtual machine is current running on, as well as limits configured on the virtual machine itself or any parent resource pool. - Valid while the virtual machine is running. - -maxMemoryUsage (int, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current upper-bound on memory usage. - The upper-bound is based on memory configuration of the virtual machine, as well as limits configured on the virtual machine itself or any parent resource pool. - Valid while the virtual machine is running. - -numMksConnections (int) -^^^^^^^^^^^^^^^^^^^^^^^ - - Number of active MKS connections to the virtual machine. - -recordReplayState (vim.VirtualMachine.RecordReplayState) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Record / replay state of the virtual machine. - -cleanPowerOff (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - For a powered off virtual machine, indicates whether the virtual machine's last shutdown was an orderly power off or not. - Unset if the virtual machine is running or suspended. - -needSecondaryReason (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - If set, indicates the reason the virtual machine needs a secondary. - -onlineStandby (bool) -^^^^^^^^^^^^^^^^^^^^ - - This property indicates whether the guest has gone into one of the s1, s2 or s3 standby modes. False indicates the guest is awake. - -minRequiredEVCModeKey (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - For a powered-on or suspended virtual machine in a cluster with Enhanced VMotion Compatibility (EVC) enabled, this identifies the least-featured EVC mode (among those for the appropriate CPU vendor) that could admit the virtual machine. - This property will be unset if the virtual machine is powered off or is not in an EVC cluster. - This property may be used as a general indicator of the CPU feature baseline currently in use by the virtual machine. - However, the virtual machine may be suppressing some of the features present in the CPU feature baseline of the indicated mode, either explicitly (in the virtual machine's configured ``cpuFeatureMask``) or implicitly (in the default masks for the ``GuestOsDescriptor`` appropriate for the virtual machine's configured guest OS). - -consolidationNeeded (bool) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Whether any disk of the virtual machine requires consolidation. - This can happen for example when a snapshot is deleted but its associated disk is not committed back to the base disk. - -offlineFeatureRequirement (vim.vm.FeatureRequirement, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - These requirements must have equivalent host capabilities ``featureCapability`` in order to power on. - -featureRequirement (vim.vm.FeatureRequirement, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - These requirements must have equivalent host capabilities ``featureCapability`` in order to power on, resume, or migrate to the host. - -featureMask (vim.host.FeatureMask, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - The masks applied to an individual virtual machine as a result of its configuration. - -vFlashCacheAllocation (long, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Specifies the total allocated vFlash resource for the vFlash caches associated with VM's VMDKs when VM is powered on, in bytes. - - -guest (vim.vm.GuestInfo) ------------------------- - -Information about VMware Tools and about the virtual machine from the perspective of VMware Tools. -Information about the guest operating system is available in VirtualCenter. -Guest operating system information reflects the last known state of the virtual machine. -For powered on machines, this is current information. -For powered off machines, this is the last recorded state before the virtual machine was powered off. - -toolsStatus (vim.vm.GuestInfo.ToolsStatus, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current status of VMware Tools in the guest operating system, if known. - -toolsVersionStatus (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current version status of VMware Tools in the guest operating system, if known. - -toolsVersionStatus2 (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current version status of VMware Tools in the guest operating system, if known. - -toolsRunningStatus (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current running status of VMware Tools in the guest operating system, if known. - -toolsVersion (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current version of VMware Tools, if known. - -guestId (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^ - - Guest operating system identifier (short name), if known. - -guestFamily (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest operating system family, if known. - -guestFullName (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - See :ref:`ansible_collections.community.vmware.docsite.guest_full_name`. - -hostName (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^ - - Hostname of the guest operating system, if known. - -ipAddress (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^ - - Primary IP address assigned to the guest operating system, if known. - -net (vim.vm.GuestInfo.NicInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest information about network adapters, if known. - -ipStack (vim.vm.GuestInfo.StackInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest information about IP networking stack, if known. - -disk (vim.vm.GuestInfo.DiskInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest information about disks. - You can obtain Linux guest disk information for the following file system types only: Ext2, Ext3, Ext4, ReiserFS, ZFS, NTFS, VFAT, UFS, PCFS, HFS, and MS-DOS. - -screen (vim.vm.GuestInfo.ScreenInfo, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest screen resolution info, if known. - -guestState (str) -^^^^^^^^^^^^^^^^ - - Operation mode of guest operating system. - -appHeartbeatStatus (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Application heartbeat status. - -appState (str, optional) -^^^^^^^^^^^^^^^^^^^^^^^^ - - Application state. - If vSphere HA is enabled and the vm is configured for Application Monitoring and this field's value is ``appStateNeedReset`` then HA will attempt immediately reset the virtual machine. - There are some system conditions which may delay the immediate reset. - The immediate reset will be performed as soon as allowed by vSphere HA and ESX. - If during these conditions the value is changed to ``appStateOk`` the reset will be cancelled. - -guestOperationsReady (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest Operations availability. If true, the vitrual machine is ready to process guest operations. - -interactiveGuestOperationsReady (bool, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Interactive Guest Operations availability. If true, the virtual machine is ready to process guest operations as the user interacting with the guest desktop. - -generationInfo (vim.vm.GuestInfo.NamespaceGenerationInfo, privilege: VirtualMachine.Namespace.EventNotify, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A list of namespaces and their corresponding generation numbers. Only namespaces with non-zero ``maxSizeEventsFromGuest`` are guaranteed to be present here. - - -summary (vim.vm.Summary) ------------------------- - - Basic information about the virtual machine. - -vm (vim.VirtualMachine, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Reference to the virtual machine managed object. - -runtime (vim.vm.RuntimeInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Runtime and state information of a running virtual machine. - Most of this information is also available when a virtual machine is powered off. - In that case, it contains information from the last run, if available. - -guest (vim.vm.Summary.GuestSummary, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Guest operating system and VMware Tools information. - -config (vim.vm.Summary.ConfigSummary) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Basic configuration information about the virtual machine. - This information is not available when the virtual machine is unavailable, for instance, when it is being created or deleted. - -storage (vim.vm.Summary.StorageSummary, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Storage information of the virtual machine. - -quickStats (vim.vm.Summary.QuickStats) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - A set of statistics that are typically updated with near real-time regularity. - -overallStatus (vim.ManagedEntity.Status) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Overall alarm status on this node. - -customValue (vim.CustomFieldsManager.Value, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Custom field values. - - -datastore (vim.Datastore) -------------------------- - - A collection of references to the subset of datastore objects in the datacenter that is used by the virtual machine. - -info (vim.Datastore.Info) -^^^^^^^^^^^^^^^^^^^^^^^^^ - - Specific information about the datastore. - -summary (vim.Datastore.Summary) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Global properties of the datastore. - -host (vim.Datastore.HostMount) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Hosts attached to this datastore. - -vm (vim.VirtualMachine) -^^^^^^^^^^^^^^^^^^^^^^^ - - Virtual machines stored on this datastore. - -browser (vim.host.DatastoreBrowser) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - DatastoreBrowser used to browse this datastore. - -capability (vim.Datastore.Capability) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Capabilities of this datastore. - -iormConfiguration (vim.StorageResourceManager.IORMConfigInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Configuration of storage I/O resource management for the datastore. - Currently VMware only support storage I/O resource management on VMFS volumes of a datastore. - This configuration may not be available if the datastore is not accessible from any host, or if the datastore does not have VMFS volume. - -network (vim.Network) ---------------------- - - A collection of references to the subset of network objects in the datacenter that is used by the virtual machine. - -name (str) -^^^^^^^^^^ - - Name of this network. - -summary (vim.Network.Summary) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Properties of a network. - -host (vim.HostSystem) -^^^^^^^^^^^^^^^^^^^^^ - - Hosts attached to this network. - -vm (vim.VirtualMachine) -^^^^^^^^^^^^^^^^^^^^^^^ - - Virtual machines using this network. - - -snapshot (vim.vm.SnapshotInfo) -------------------------------- - -Current snapshot and tree. -The property is valid if snapshots have been created for the virtual machine. - -currentSnapshot (vim.vm.Snapshot, optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Current snapshot of the virtual machineThis property is set by calling ``Snapshot.revert`` or ``VirtualMachine.createSnapshot``. - This property will be empty when the working snapshot is at the root of the snapshot tree. - -rootSnapshotList (vim.vm.SnapshotTree) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Data for the entire set of snapshots for one virtual machine. - -rootSnapshot (vim.vm.Snapshot) ------------------------------- - -The roots of all snapshot trees for the virtual machine. - -config (vim.vm.ConfigInfo) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Information about the configuration of the virtual machine when this snapshot was taken. - The datastore paths for the virtual machine disks point to the head of the disk chain that represents the disk at this given snapshot. - -childSnapshot (vim.vm.Snapshot) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - All snapshots for which this snapshot is the parent. - -guestHeartbeatStatus (vim.ManagedEntity.Status) ------------------------------------------------ - - The guest heartbeat. - -.. seealso:: - - `pyVmomi <https://github.com/vmware/pyvmomi>`_ - The GitHub Page of pyVmomi - `pyVmomi Issue Tracker <https://github.com/vmware/pyvmomi/issues>`_ - The issue tracker for the pyVmomi project - rst/scenario_guides/guide_vmware.rst - The GitHub Page of vSphere Automation SDK for Python - `vSphere Automation SDK Issue Tracker <https://github.com/vmware/vsphere-automation-sdk-python/issues>`_ - The issue tracker for vSphere Automation SDK for Python - :ref:`working_with_playbooks` - An introduction to playbooks - :ref:`playbooks_vault` - Using Vault in playbooks diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_module_reference.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_module_reference.rst deleted file mode 100644 index 9a9a36e98..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_module_reference.rst +++ /dev/null @@ -1,9 +0,0 @@ -:orphan: - -.. _ansible_collections.community.vmware.docsite.vmware_ansible_module_index: - -*************************** -Ansible VMware Module Guide -*************************** - -This will be a listing similar to the module index in our core docs. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_requirements.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_requirements.rst deleted file mode 100644 index 8244afe2f..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_requirements.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_requirements: - -******************** -VMware Prerequisites -******************** - -.. contents:: - :local: - -ESXi License -============ - -Access to the vSphere API is governed by the various vSphere Editions which provides both read and write access to the API. -If you are using vSphere Hypervisor (free edition of ESXi), the vSphere API will only be available as read-only. -All modules requires API write access to perform various actions. Hence, a free ESXi license will not be supported. -Please check `this blog post <https://blogs.vmware.com/vsphere/2012/02/introduction-to-the-vsphere-api-part-1.html>`_ for more details. - - -Installing SSL Certificates -=========================== - -All vCenter and ESXi servers require SSL encryption on all connections to enforce secure communication. You must enable SSL encryption for Ansible by installing the server's SSL certificates on your Ansible control node or delegate node. - -If the SSL certificate of your vCenter or ESXi server is not correctly installed on your Ansible control node, you will see the following warning when using Ansible VMware modules: - -``Unable to connect to vCenter or ESXi API at xx.xx.xx.xx on TCP/443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)`` - -To install the SSL certificate for your VMware server, and run your Ansible VMware modules in encrypted mode, please follow the instructions for the server you are running with VMware. - -Installing vCenter SSL certificates for Ansible ------------------------------------------------ - -* From any web browser, go to the base URL of the vCenter Server without port number like ``https://vcenter-domain.example.com`` - -* Click the "Download trusted root CA certificates" link at the bottom of the grey box on the right and download the file. - -* Change the extension of the file to .zip. The file is a ZIP file of all root certificates and all CRLs. - -* Extract the contents of the zip file. The extracted directory contains a ``.certs`` directory that contains two types of files. Files with a number as the extension (.0, .1, and so on) are root certificates. - -* Install the certificate files are trusted certificates by the process that is appropriate for your operating system. - - -Installing ESXi SSL certificates for Ansible --------------------------------------------- - -* Enable SSH Service on ESXi either by using Ansible VMware module `vmware_host_service_manager <https://github.com/ansible-collections/vmware/blob/main/plugins/modules/vmware_host_config_manager.py>`_ or manually using vSphere Web interface. - -* SSH to ESXi server using administrative credentials, and navigate to directory ``/etc/vmware/ssl`` - -* Secure copy (SCP) ``rui.crt`` located in ``/etc/vmware/ssl`` directory to Ansible control node. - -* Install the certificate file by the process that is appropriate for your operating system. - -Using custom path for SSL certificates --------------------------------------- - -If you need to use a custom path for SSL certificates, you can set the ``REQUESTS_CA_BUNDLE`` environment variable in your playbook. - -For example, if ``/var/vmware/certs/vcenter1.crt`` is the SSL certificate for your vCenter Server, you can use the :ref:`environment <playbooks_environment>` keyword to pass it to the modules: - -.. code-block:: yaml - - - name: Gather all tags from vCenter - community.vmware.vmware_tag_info: - validate_certs: True - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - environment: - REQUESTS_CA_BUNDLE: /var/vmware/certs/vcenter1.crt - -There is a `known issue <https://github.com/psf/requests/issues/3829>`_ in ``requests`` library (version 2) which you may want to consider when using this environment variable. Basically, setting ``REQUESTS_CA_BUNDLE`` environment variable on managed nodes overrides the ``validate_certs`` value. This may result in unexpected behavior while running the playbook. Please see `community.vmware issue 601 <https://github.com/ansible-collections/community.vmware/issues/601>`_ and `vmware issue 254 <https://github.com/vmware/vsphere-automation-sdk-python/issues/254>`_ for more information. diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_scenarios.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_scenarios.rst deleted file mode 100644 index e34aa43d5..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_scenarios.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_scenarios: - -**************************** -Ansible for VMware Scenarios -**************************** - -These scenarios teach you how to accomplish common VMware tasks using Ansible. To get started, please select the task you want to accomplish. - -.. toctree:: - :maxdepth: 1 - - scenario_clone_template - scenario_rename_vm - scenario_remove_vm - scenario_find_vm_folder - scenario_vmware_http - scenario_vmware_tools_connection diff --git a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_troubleshooting.rst b/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_troubleshooting.rst deleted file mode 100644 index b0243c28c..000000000 --- a/ansible_collections/community/vmware/docs/docsite/rst/vmware_scenarios/vmware_troubleshooting.rst +++ /dev/null @@ -1,103 +0,0 @@ -.. _ansible_collections.community.vmware.docsite.vmware_troubleshooting: - -********************************** -Troubleshooting Ansible for VMware -********************************** - -.. contents:: - :local: - -This section lists things that can go wrong and possible ways to fix them. - -Debugging Ansible for VMware -============================ - -When debugging or creating a new issue, you will need information about your VMware infrastructure. You can get this information using -`govc <https://github.com/vmware/govmomi/tree/master/govc>`_, For example: - - -.. code-block:: bash - - $ export GOVC_USERNAME=ESXI_OR_VCENTER_USERNAME - $ export GOVC_PASSWORD=ESXI_OR_VCENTER_PASSWORD - $ export GOVC_URL=https://ESXI_OR_VCENTER_HOSTNAME:443 - $ govc find / - -Known issues with Ansible for VMware -==================================== - - -Network settings with vmware_guest in Ubuntu 18.04 --------------------------------------------------- - -Setting the network with ``vmware_guest`` in Ubuntu 18.04 is known to be broken, due to missing support for ``netplan`` in the ``open-vm-tools``. -This issue is tracked via: - -* https://github.com/vmware/open-vm-tools/issues/240 -* https://github.com/ansible/ansible/issues/41133 - -Potential Workarounds -^^^^^^^^^^^^^^^^^^^^^ - -There are several workarounds for this issue. - -1) Modify the Ubuntu 18.04 images and installing ``ifupdown`` in them via ``sudo apt install ifupdown``. - If so you need to remove ``netplan`` via ``sudo apt remove netplan.io`` and you need stop ``systemd-networkd`` via ``sudo systemctl disable systemctl-networkd``. - -2) Generate the ``systemd-networkd`` files with a task in your VMware Ansible role: - -.. code-block:: yaml - - - name: make sure cache directory exists - file: path="{{ inventory_dir }}/cache" state=directory - delegate_to: localhost - - - name: generate network templates - template: src=network.j2 dest="{{ inventory_dir }}/cache/{{ inventory_hostname }}.network" - delegate_to: localhost - - - name: copy generated files to vm - vmware_guest_file_operation: - hostname: "{{ vmware_general.hostname }}" - username: "{{ vmware_username }}" - password: "{{ vmware_password }}" - datacenter: "{{ vmware_general.datacenter }}" - validate_certs: "{{ vmware_general.validate_certs }}" - vm_id: "{{ inventory_hostname }}" - vm_username: root - vm_password: "{{ template_password }}" - copy: - src: "{{ inventory_dir }}/cache/{{ inventory_hostname }}.network" - dest: "/etc/systemd/network/ens160.network" - overwrite: False - delegate_to: localhost - - - name: restart systemd-networkd - vmware_vm_shell: - hostname: "{{ vmware_general.hostname }}" - username: "{{ vmware_username }}" - password: "{{ vmware_password }}" - datacenter: "{{ vmware_general.datacenter }}" - folder: /vm - vm_id: "{{ inventory_hostname}}" - vm_username: root - vm_password: "{{ template_password }}" - vm_shell: /bin/systemctl - vm_shell_args: " restart systemd-networkd" - delegate_to: localhost - - - name: restart systemd-resolved - vmware_vm_shell: - hostname: "{{ vmware_general.hostname }}" - username: "{{ vmware_username }}" - password: "{{ vmware_password }}" - datacenter: "{{ vmware_general.datacenter }}" - folder: /vm - vm_id: "{{ inventory_hostname}}" - vm_username: root - vm_password: "{{ template_password }}" - vm_shell: /bin/systemctl - vm_shell_args: " restart systemd-resolved" - delegate_to: localhost - -3) Wait for ``netplan`` support in ``open-vm-tools`` diff --git a/ansible_collections/community/vmware/meta/runtime.yml b/ansible_collections/community/vmware/meta/runtime.yml index 92196f500..621c815bd 100644 --- a/ansible_collections/community/vmware/meta/runtime.yml +++ b/ansible_collections/community/vmware/meta/runtime.yml @@ -11,6 +11,7 @@ action_groups: - vcenter_root_password_expiration - vcenter_standard_key_provider - vmware_about_info + - vmware_all_snapshots_info - vmware_category - vmware_category_info - vmware_cfg_backup diff --git a/ansible_collections/community/vmware/plugins/doc_fragments/vmware.py b/ansible_collections/community/vmware/plugins/doc_fragments/vmware.py index 5df2762c1..18fe01972 100644 --- a/ansible_collections/community/vmware/plugins/doc_fragments/vmware.py +++ b/ansible_collections/community/vmware/plugins/doc_fragments/vmware.py @@ -15,6 +15,7 @@ class ModuleDocFragment(object): DOCUMENTATION = r''' notes: - All modules requires API write access and hence is not supported on a free ESXi license. + - All variables and VMware object names are case sensitive. options: hostname: description: diff --git a/ansible_collections/community/vmware/plugins/doc_fragments/vmware_rest_client.py b/ansible_collections/community/vmware/plugins/doc_fragments/vmware_rest_client.py index f852173d6..50af0ba50 100644 --- a/ansible_collections/community/vmware/plugins/doc_fragments/vmware_rest_client.py +++ b/ansible_collections/community/vmware/plugins/doc_fragments/vmware_rest_client.py @@ -12,6 +12,9 @@ __metaclass__ = type class ModuleDocFragment(object): # Parameters for VMware REST Client based modules DOCUMENTATION = r''' +notes: + - All modules requires API write access and hence is not supported on a free ESXi license. + - All variables and VMware object names are case sensitive. options: hostname: description: diff --git a/ansible_collections/community/vmware/plugins/module_utils/vmware.py b/ansible_collections/community/vmware/plugins/module_utils/vmware.py index a7b61bdae..12bdf5107 100644 --- a/ansible_collections/community/vmware/plugins/module_utils/vmware.py +++ b/ansible_collections/community/vmware/plugins/module_utils/vmware.py @@ -1088,11 +1088,11 @@ def option_diff(options, current_options, truthy_strings_as_bool=True): for option_key, option_value in options.items(): if truthy_strings_as_bool and is_boolean(option_value): option_value = VmomiSupport.vmodlTypes['bool'](is_truthy(option_value)) - elif type(option_value) is int: + elif isinstance(option_value, int): option_value = VmomiSupport.vmodlTypes['int'](option_value) - elif type(option_value) is float: + elif isinstance(option_value, float): option_value = VmomiSupport.vmodlTypes['float'](option_value) - elif type(option_value) is str: + elif isinstance(option_value, str): option_value = VmomiSupport.vmodlTypes['string'](option_value) if option_key not in current_options_dict or current_options_dict[option_key] != option_value: diff --git a/ansible_collections/community/vmware/plugins/modules/vcenter_folder.py b/ansible_collections/community/vmware/plugins/modules/vcenter_folder.py index 7103e6285..46be0df4b 100644 --- a/ansible_collections/community/vmware/plugins/modules/vcenter_folder.py +++ b/ansible_collections/community/vmware/plugins/modules/vcenter_folder.py @@ -30,14 +30,12 @@ options: folder_name: description: - Name of folder to be managed. - - This is case sensitive parameter. - Folder name should be under 80 characters. This is a VMware restriction. required: true type: str parent_folder: description: - Name of the parent folder under which new folder needs to be created. - - This is case sensitive parameter. - "If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'." - "If user wants to create a folder under '/DC0/vm/folder1/folder2', this value will be 'folder1/folder2'." required: false diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_all_snapshots_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_all_snapshots_info.py new file mode 100644 index 000000000..934781a6c --- /dev/null +++ b/ansible_collections/community/vmware/plugins/modules/vmware_all_snapshots_info.py @@ -0,0 +1,204 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright: (c) 2018, Ansible Project +# Copyright: (c) 2024, Fernando Mendieta <fernandomendietaovejero@gmail.com> +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +--- +module: vmware_all_snapshots_info +short_description: Gathers information about all snapshots across virtual machines in a specified vmware datacenter +description: +- This module collects detailed information of all the snapshots of the datacenter, can be used with filter options +author: +- Fernando Mendieta (@valkiriaaquatica) +options: + datacenter: + description: + - The name of the datacenter to gather snapshot information from. You can get it in the vmware UI. + required: true + type: str + filters: + description: + - Optional filters to apply to the snapshot data being gathered, you can apply one or more. + - Filters are applied based on the variable match_type specified. If match_type exact, filters require exact matches. + - On the other hand when match_type includes it gets the values that contain that value. + - Available filter options creation_time, description, folder, id, name, quiesced, state, vm_name. + - Multiple filters can be applied the snapshot must meet all filter criteria to be included in the results. + required: false + type: dict + default: {} + match_type: + description: + - Indicates whether the filter match should be exact or includes. + - For example when you want to get all the snapshots that contain in their name the word test you place the filter name test and the match_type includes. + - For example when you want to get all snapshots that are in state poweredOn you skip the match_type default is exact or you write match_type exact. + required: false + type: str + choices: ['exact', 'includes'] + default: exact +extends_documentation_fragment: +- community.vmware.vmware.documentation +''' + +EXAMPLES = r''' + - name: Gather information about all snapshots in VMware vCenter + vmware_snapshot_info_all: + hostname: '{{ vcenter_hostname }}' + username: '{{ vcenter_username }}' + password: '{{ vcenter_password }}' + validate_certs: no + datacenter: '{{ datacenter_name }}' + delegate_to: localhost + - name: Gather information of a snapshot with filters applied and match_type in exacts. + vmware_snapshot_info_all: + hostname: '{{ vcenter_hostname }}' + username: '{{ vcenter_username }}' + password: '{{ vcenter_password }}' + validate_certs: yes + datacenter: '{{ datacenter_name }}' + filters: + state: "poweredOn" + vm_name: "you_marchine_name" + delegate_to: localhost + - name: Gather information of snapshots that in their name contain the "test" in their name. + vmware_snapshot_info_all: + hostname: '{{ vcenter_hostname }}' + username: '{{ vcenter_username }}' + password: '{{ vcenter_password }}' + validate_certs: yes + datacenter: '{{ datacenter_name }}' + match_type: "includes" + filters: + name: "test" + delegate_to: localhost +''' + +RETURN = r''' +vmware_all_snapshots_info: + description: A list of all snapshots information across all virtual machines in the specified datacenter + returned: always + type: list + elements: dict + contains: + vm_name: + description: The name of the virtual machine that appears in the iu. + type: str + returned: always + folder: + description: The folder path of the virtual machine in the datacenter, normally is vm + type: str + returned: always + name: + description: The name of the snapshot + type: str + returned: always + description: + description: The description of the snapshot. + type: str + returned: when it exists because depends if it has or not + creation_time: + description: The time the snapshot was created + type: str + returned: always + state: + description: The state of the virtual machine at the snapshot (powered on/off) + type: str + returned: always + id: + description: The unique identifier of the snapshot + type: int + returned: always + quiesced: + description: Indicates if the snapshot was created with the virtual machines file system quiesced + type: bool + returned: always +''' + + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.community.vmware.plugins.module_utils.vmware import ( + PyVmomi, + vmware_argument_spec, + list_snapshots_recursively, +) + +try: + from pyVmomi import vim +except ImportError: + pass + + +class VMwareSnapshotInfo(PyVmomi): + def __init__(self, module): + super(VMwareSnapshotInfo, self).__init__(module) + + def list_snapshots(self, vm): + return ( + list_snapshots_recursively(vm.snapshot.rootSnapshotList) + if vm.snapshot + else [] + ) + + def get_all_vms(self): + content = self.content + container = content.viewManager.CreateContainerView( + content.rootFolder, [vim.VirtualMachine], True + ) + vms = container.view + container.Destroy() + return vms + + def gather_snapshots_info(self, filters, match_type): + snapshot_data = [] + for vm in self.get_all_vms(): + for snapshot in self.list_snapshots(vm): + snapshot_info = { + "vm_name": vm.name, + "folder": vm.parent.name, + **snapshot, + } + if self.passes_filters(snapshot_info, filters, match_type): + snapshot_data.append(snapshot_info) + return snapshot_data + + def passes_filters(self, snapshot_info, filters, match_type): + for key, value in filters.items(): + if key not in snapshot_info: + continue + actual_value = str(snapshot_info[key]).lower() + desired_value = str(value).lower() + + if match_type == "exact" and actual_value != desired_value: + return False + elif match_type == "includes" and desired_value not in actual_value: + return False + return True + + +def main(): + argument_spec = vmware_argument_spec() + argument_spec.update( + datacenter=dict(required=True, type="str"), + filters=dict(required=False, type="dict", default={}), + match_type=dict( + required=False, type="str", choices=["exact", "includes"], default="exact" + ), + ) + + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) + vmware_snapshot_info = VMwareSnapshotInfo(module) + filters = module.params.get("filters") + match_type = module.params.get("match_type") + all_snapshots = vmware_snapshot_info.gather_snapshots_info(filters, match_type) + module.exit_json(changed=False, vmware_all_snapshots_info=all_snapshots) + + +if __name__ == "__main__": + main() diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_category.py b/ansible_collections/community/vmware/plugins/modules/vmware_category.py index c107c4f13..6e76a8b97 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_category.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_category.py @@ -17,7 +17,6 @@ short_description: Manage VMware categories description: - This module can be used to create / delete / update VMware categories. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_category_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_category_info.py index 10fdb162f..71d228f83 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_category_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_category_info.py @@ -17,7 +17,6 @@ short_description: Gather info about VMware tag categories description: - This module can be used to gather information about VMware tag categories. - Tag feature is introduced in vSphere 6 version, so this module is not supported in earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster.py index 479d31520..8af4d881c 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster.py @@ -17,7 +17,6 @@ short_description: Manage VMware vSphere clusters description: - Adds or removes VMware vSphere clusters. - To manage DRS, HA and VSAN related configurations, use the modules vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan. - - All values and VMware object names are case sensitive. author: - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_dpm.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_dpm.py index 61551263c..1215f52c3 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_dpm.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_dpm.py @@ -17,7 +17,6 @@ module: vmware_cluster_dpm short_description: Manage Distributed Power Management (DPM) on VMware vSphere clusters description: - Manages DPM on VMware vSphere clusters. - - All values and VMware object names are case sensitive. author: - Olivia Luetolf (@olilu) options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_drs.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_drs.py index 3027c2910..873e87709 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_drs.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_drs.py @@ -16,7 +16,6 @@ module: vmware_cluster_drs short_description: Manage Distributed Resource Scheduler (DRS) on VMware vSphere clusters description: - Manages DRS on VMware vSphere clusters. - - All values and VMware object names are case sensitive. author: - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_ha.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_ha.py index 1ad532d4b..cad1eb519 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_ha.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_ha.py @@ -17,7 +17,6 @@ module: vmware_cluster_ha short_description: Manage High Availability (HA) on VMware vSphere clusters description: - Manages HA configuration on VMware vSphere clusters. - - All values and VMware object names are case sensitive. author: - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_info.py index a015b6fc3..24ca77bc8 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_info.py @@ -16,7 +16,6 @@ module: vmware_cluster_info short_description: Gather info about clusters available in given vCenter description: - This module can be used to gather information about clusters in VMWare infrastructure. - - All values and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) - Christian Neugum (@digifuchsi) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vcls.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vcls.py index f553adcdb..19d07ad86 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vcls.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vcls.py @@ -17,7 +17,6 @@ short_description: Override the default vCLS (vSphere Cluster Services) VM disk description: - Override the default vCLS VM disk placement for this cluster. - Some datastores cannot be selected for vCLS 'Allowed' as they are blocked by solutions as SRM or vSAN maintenance mode where vCLS cannot be configured. - - All values and VMware object names are case sensitive. author: - Joseph Callen (@jcpowermac) - Nina Loser (@Nina2244) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vsan.py b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vsan.py index 9f82aada8..0f4eb9cad 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vsan.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_cluster_vsan.py @@ -16,7 +16,6 @@ module: vmware_cluster_vsan short_description: Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters description: - Manages vSAN on VMware vSphere clusters. - - All values and VMware object names are case sensitive. author: - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_ovf_template.py b/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_ovf_template.py index c74151904..f2a76bab2 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_ovf_template.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_ovf_template.py @@ -15,7 +15,6 @@ module: vmware_content_deploy_ovf_template short_description: Deploy Virtual Machine from ovf template stored in content library. description: - Module to deploy virtual machine from ovf template in content library. -- All variables and VMware object names are case sensitive. author: - Lev Goncharv (@ultral) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_template.py b/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_template.py index 3e0603373..31050a84a 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_template.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_content_deploy_template.py @@ -19,7 +19,6 @@ description: - Content Library feature is introduced in vSphere 6.0 version. - vmtx templates feature is introduced in vSphere 67U1 and APIs for clone template from content library in 67U2. - This module does not work with vSphere version older than 67U2. -- All variables and VMware object names are case sensitive. author: - Pavan Bidkar (@pgbidkar) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_content_library_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_content_library_info.py index 69cbb7cd0..abd3d0a44 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_content_library_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_content_library_info.py @@ -18,7 +18,6 @@ description: - Module to list the content libraries. - Module to get information about specific content library. - Content Library feature is introduced in vSphere 6.0 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Pavan Bidkar (@pgbidkar) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_content_library_manager.py b/ansible_collections/community/vmware/plugins/modules/vmware_content_library_manager.py index 932b77b6d..38ba6ba42 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_content_library_manager.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_content_library_manager.py @@ -17,7 +17,6 @@ short_description: Create, update and delete VMware content library description: - Module to manage VMware content Library - Content Library feature is introduced in vSphere 6.0 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Pavan Bidkar (@pgbidkar) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster.py b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster.py index 7a7dccbaf..9922499b4 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster.py @@ -16,7 +16,6 @@ module: vmware_datastore_cluster short_description: Manage VMware vSphere datastore clusters description: - This module can be used to add and delete datastore cluster in given VMware environment. - - All parameters and VMware object values are case sensitive. author: - Abhijeet Kasurde (@Akasurde) options: @@ -43,7 +42,6 @@ options: description: - Destination folder, absolute path to place datastore cluster in. - The folder should include the datacenter. - - This parameter is case sensitive. - You must specify either a O(folder) or a O(datacenter_name). - 'Examples:' - ' folder: /datacenter1/datastore' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster_manager.py b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster_manager.py index b36b45af1..cfd7c0ea9 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster_manager.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_cluster_manager.py @@ -16,7 +16,6 @@ module: vmware_datastore_cluster_manager short_description: Manage VMware vSphere datastore cluster's members description: - This module can be used to add datastore in the datastore cluster. - - All parameters and VMware object values are case sensitive. author: - Abhijeet Kasurde (@Akasurde) options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_info.py index 053c1bb1f..4c3fdc1e1 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_datastore_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_datastore_info.py @@ -16,7 +16,6 @@ module: vmware_datastore_info short_description: Gather info about datastores available in given vCenter description: - This module can be used to gather information about datastores in VMWare infrastructure. - - All values and VMware object names are case sensitive. author: - Tim Rightnour (@garbled1) options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_deploy_ovf.py b/ansible_collections/community/vmware/plugins/modules/vmware_deploy_ovf.py index 06ca29f74..da59cda4d 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_deploy_ovf.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_deploy_ovf.py @@ -36,14 +36,12 @@ options: - Cluster to deploy to. - This is a required parameter, if O(esxi_hostname) is not set and O(hostname) is set to the vCenter server. - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - - This parameter is case sensitive. type: str esxi_hostname: description: - The ESXi hostname where the virtual machine will run. - This is a required parameter, if O(cluster) is not set and O(hostname) is set to the vCenter server. - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - - This parameter is case sensitive. type: str datastore: default: datastore1 diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_dvswitch.py b/ansible_collections/community/vmware/plugins/modules/vmware_dvswitch.py index 604385568..4ab0d4c07 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_dvswitch.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_dvswitch.py @@ -167,7 +167,6 @@ options: description: - Destination folder, absolute path to place dvswitch in. - The folder should include the datacenter. - - This parameter is case sensitive. - Required if O(datacenter) is not provided. - Mutually exclusive with O(datacenter) parameter. - 'Examples:' @@ -195,6 +194,13 @@ options: type: int description: Identifies the information related to the switch. default: 0 + switch_ip: + type: str + description: + - Assign an IP address to see the distributed switch as a single network device in the NetFlow collector. + - This is instead of as multiple devices corresponding to each host. + - In an IPv6 environment, the ESXi hosts ignore the switch IP address. + version_added: '4.3.0' active_flow_timeout: type: int description: The time, in seconds, to wait before sending information after the flow is initiated. @@ -268,6 +274,7 @@ EXAMPLES = r''' collector_ip: 192.168.10.50 collector_port: 50034 observation_domain_id: 0 + switch_ip: 192.168.10.40 active_flow_timeout: 60 idle_flow_timeout: 15 sampling_rate: 4096 @@ -306,6 +313,7 @@ result: "net_flow_collector_ip": "192.168.10.50", "net_flow_collector_port": 50034, "net_flow_observation_domain_id": 0, + "net_flow_switch_ip": "192.168.10.40", "net_flow_active_flow_timeout": 60, "net_flow_idle_flow_timeout": 15, "net_flow_sampling_rate": 4096, @@ -393,6 +401,7 @@ class VMwareDvSwitch(PyVmomi): self.netFlow_collector_ip = self.module.params['net_flow'].get('collector_ip') or None self.netFlow_collector_port = self.module.params['net_flow'].get('collector_port') self.netFlow_observation_domain_id = self.module.params['net_flow'].get('observation_domain_id') + self.netFlow_switch_ip = self.module.params['net_flow'].get('switch_ip') self.netFlow_active_flow_timeout = self.module.params['net_flow'].get('active_flow_timeout') self.netFlow_idle_flow_timeout = self.module.params['net_flow'].get('idle_flow_timeout') self.netFlow_sampling_rate = self.module.params['net_flow'].get('sampling_rate') @@ -529,11 +538,13 @@ class VMwareDvSwitch(PyVmomi): results['net_flow_idle_flow_timeout'] = self.netFlow_idle_flow_timeout results['net_flow_sampling_rate'] = self.netFlow_sampling_rate results['net_flow_internal_flows_only'] = self.netFlow_internal_flows_only + results['net_flow_switch_ip'] = self.netFlow_switch_ip result = self.check_netFlow_config() - changed_netFlow = result[1] + changed_netFlow = result[2] if changed_netFlow: spec.ipfixConfig = result[0] + spec.switchIpAddress = result[1] if changed_multicast or changed_network_policy or changed_netFlow: self.update_dvs_config(self.dvs, spec) @@ -663,15 +674,22 @@ class VMwareDvSwitch(PyVmomi): def check_netFlow_config(self): """Check NetFlow config""" changed = changed_collectorIpAddress = changed_collectorPort = changed_observationDomainId = \ - changed_activeFlowTimeout = changed_idleFlowTimeout = changed_samplingRate = changed_internalFlowsOnly = False + changed_activeFlowTimeout = changed_idleFlowTimeout = changed_samplingRate = changed_internalFlowsOnly = \ + changed_switchIpAddress = False collectorIpAddress_previous = collectorPort_previous = observationDomainId_previous = activeFlowTimeout_previous = \ - idleFlowTimeout_previous = samplingRate_previous = internalFlowsOnly_previous = None + idleFlowTimeout_previous = samplingRate_previous = internalFlowsOnly_previous = switchIpAddress_previous = None current_config = self.dvs.config.ipfixConfig if current_config is None: new_config = vim.dvs.VmwareDistributedVirtualSwitch.IpfixConfig() else: new_config = current_config + current_switchIpAddress = self.dvs.config.switchIpAddress + if current_switchIpAddress is None: + new_config_spec = vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec() + new_switchIpAddress = new_config_spec.switchIpAddress + else: + new_switchIpAddress = current_switchIpAddress if self.netFlow_collector_ip is not None: if current_config.collectorIpAddress != self.netFlow_collector_ip: @@ -702,11 +720,16 @@ class VMwareDvSwitch(PyVmomi): changed = changed_internalFlowsOnly = True internalFlowsOnly_previous = current_config.internalFlowsOnly new_config.internalFlowsOnly = self.netFlow_internal_flows_only + if self.netFlow_switch_ip is not None and current_switchIpAddress != self.netFlow_switch_ip: + changed = changed_switchIpAddress = True + switchIpAddress_previous = current_switchIpAddress + new_switchIpAddress = self.netFlow_switch_ip - return (new_config, changed, changed_collectorIpAddress, collectorIpAddress_previous, + return (new_config, new_switchIpAddress, changed, changed_collectorIpAddress, collectorIpAddress_previous, changed_collectorPort, collectorPort_previous, changed_observationDomainId, observationDomainId_previous, changed_activeFlowTimeout, activeFlowTimeout_previous, changed_idleFlowTimeout, idleFlowTimeout_previous, - changed_samplingRate, samplingRate_previous, changed_internalFlowsOnly, internalFlowsOnly_previous) + changed_samplingRate, samplingRate_previous, changed_internalFlowsOnly, internalFlowsOnly_previous, + changed_switchIpAddress, switchIpAddress_previous) def exit_unchanged(self): """Exit with status message""" @@ -905,10 +928,12 @@ class VMwareDvSwitch(PyVmomi): results['net_flow_idle_flow_timeout'] = self.netFlow_idle_flow_timeout results['net_flow_sampling_rate'] = self.netFlow_sampling_rate results['net_flow_internal_flows_only'] = self.netFlow_internal_flows_only - (ipfixConfig, changed_netFlow, changed_collectorIpAddress, collectorIpAddress_previous, - changed_collectorPort, collectorPort_previous, changed_observationDomainId, observationDomainId_previous, - changed_activeFlowTimeout, activeFlowTimeout_previous, changed_idleFlowTimeout, idleFlowTimeout_previous, - changed_samplingRate, samplingRate_previous, changed_internalFlowsOnly, internalFlowsOnly_previous) = self.check_netFlow_config() + results['net_flow_switch_ip'] = self.netFlow_switch_ip + + (ipfixConfig, switchIpAddress_netFlow, changed_netFlow, changed_collectorIpAddress, collectorIpAddress_previous, + changed_collectorPort, collectorPort_previous, changed_observationDomainId, observationDomainId_previous, changed_activeFlowTimeout, + activeFlowTimeout_previous, changed_idleFlowTimeout, idleFlowTimeout_previous, changed_samplingRate, samplingRate_previous, + changed_internalFlowsOnly, internalFlowsOnly_previous, changed_switchIpAddress, switchIpAddress_previous) = self.check_netFlow_config() if changed_netFlow: changed = changed_settings = True changed_list.append("netFlow") @@ -926,8 +951,11 @@ class VMwareDvSwitch(PyVmomi): results['net_flow_sampling_rate_previous'] = samplingRate_previous if changed_internalFlowsOnly: results['net_flow_internal_flows_only_previous'] = internalFlowsOnly_previous + if changed_switchIpAddress: + results['net_flow_switch_ip_previous'] = switchIpAddress_previous config_spec.ipfixConfig = ipfixConfig + config_spec.switchIpAddress = switchIpAddress_netFlow if changed: if self.module.check_mode: @@ -1020,6 +1048,7 @@ def main(): collector_ip=dict(type='str'), collector_port=dict(type='int', default=0), observation_domain_id=dict(type='int', default=0), + switch_ip=dict(type='str'), active_flow_timeout=dict(type='int', default=60), idle_flow_timeout=dict(type='int', default=15), sampling_rate=dict(type='int', default=4096), diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_export_ovf.py b/ansible_collections/community/vmware/plugins/modules/vmware_export_ovf.py index 6ea440a4e..1c40cdfc3 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_export_ovf.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_export_ovf.py @@ -39,13 +39,11 @@ options: default: ha-datacenter description: - Datacenter name of the virtual machine to export. - - This parameter is case sensitive. type: str folder: description: - Destination folder, absolute path to find the specified guest. - The folder should include the datacenter. ESX datacenter is ha-datacenter. - - This parameter is case sensitive. - 'If multiple machines are found with same name, this parameter is used to identify' - 'Examples:' - ' folder: /ha-datacenter/vm' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest.py index 1f5a0a818..eb3923038 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest.py @@ -64,7 +64,6 @@ options: identify uniqueness of the virtual machine. - This parameter is required, if O(state=poweredon), O(state=powered-on), O(state=poweredoff), O(state=powered-off), O(state=present), O(state=restarted), O(state=suspended) and virtual machine does not exists. - - This parameter is case sensitive. type: str name_match: description: @@ -89,7 +88,6 @@ options: - Template or existing virtual machine used to create new virtual machine. - If this value is not set, virtual machine is created without using a template. - If the virtual machine already exists, this parameter will be ignored. - - This parameter is case sensitive. - From version 2.8 onwards, absolute path to virtual machine or template can be used. aliases: [ 'template_src' ] type: str @@ -107,7 +105,6 @@ options: description: - Destination folder, absolute path to find an existing guest or create the new guest. - "The folder should include the datacenter. ESXi's datacenter is ha-datacenter." - - This parameter is case sensitive. - 'If multiple machines are found with same name, this parameter is used to identify' - 'uniqueness of the virtual machine.' - 'Examples:' @@ -126,7 +123,6 @@ options: default: {} description: - "Manage virtual machine's hardware attributes." - - All parameters case sensitive. suboptions: hotadd_cpu: type: bool @@ -243,7 +239,6 @@ options: default: {} description: - Manage virtual machine encryption settings - - All parameters case sensitive. version_added: '3.9.0' suboptions: encrypted_vmotion: @@ -258,7 +253,6 @@ options: type: str description: - Set the guest ID. - - This parameter is case sensitive. - This field is required when creating a virtual machine, not required when creating from the template. - > Valid values are referenced here: @@ -266,7 +260,6 @@ options: disk: description: - A list of disks to add. - - This parameter is case sensitive. - Shrinking disks is not supported. - Removing existing disks of the virtual machine is not supported. - 'Attributes O(disk.controller_type), O(disk.controller_number), O(disk.unit_number) are used to configure multiple types of disk @@ -419,7 +412,6 @@ options: resource_pool: description: - Use the given resource pool for virtual machine operation. - - This parameter is case sensitive. - Resource pool should be child of the selected host parent. - When not specified I(Resources) is taken as default value. type: str @@ -459,7 +451,6 @@ options: snapshot_src: description: - Name of the existing snapshot to use to create a clone of a virtual machine. - - This parameter is case sensitive. - While creating linked clone using O(linked_clone) parameter, this parameter is required. type: str linked_clone: @@ -485,7 +476,6 @@ options: datacenter: description: - Destination datacenter for the deploy operation. - - This parameter is case sensitive. default: ha-datacenter type: str cluster: @@ -493,14 +483,12 @@ options: - The cluster name where the virtual machine will run. - This is a required parameter, if O(esxi_hostname) is not set. - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - - This parameter is case sensitive. type: str esxi_hostname: description: - The ESXi hostname where the virtual machine will run. - This is a required parameter, if O(cluster) is not set. - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - - This parameter is case sensitive. type: str advanced_settings: description: @@ -527,10 +515,9 @@ options: description: - A list of networks (in the order of the NICs). - Removing NICs is not allowed, while reconfiguring the virtual machine. - - All parameters and VMware object names are case sensitive. - The I(type), I(ip), I(netmask), I(gateway), I(domain), I(dns_servers) options don't set to a guest when creating a blank new virtual machine. They are set by the customization via vmware-tools. - If you want to set the value of the options to a guest, you need to clone from a template with installed OS and vmware-tools(also Perl when Linux). + If you want to set the value of the options to a guest, you need to clone from a template with installed OS and vmware-tools (also Perl when Linux). type: list default: [] elements: dict @@ -648,7 +635,6 @@ options: - Not all operating systems are supported for customization with respective vCenter version, please check VMware documentation for respective OS customization. - For supported customization operating system matrix, (see U(http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf)) - - All parameters and VMware object names are case sensitive. - Linux based OSes requires Perl package to be installed for OS customizations. suboptions: existing_vm: @@ -747,7 +733,7 @@ options: orgname: type: str description: - - Organisation name. + - Organization name. - Specific to Windows customization. - If unset, "ACME" will be used as a fall-back. password: @@ -797,7 +783,6 @@ options: customization_spec: description: - Unique name identifying the requested customization specification. - - This parameter is case sensitive. - If set, then overrides O(customization) parameter values. type: str datastore: @@ -2670,6 +2655,7 @@ class PyVmomiHelper(PyVmomi): diskspec.device = disks[disk_index] else: diskspec = self.device_helper.create_hard_disk(scsi_ctl, disk_index) + diskspec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add disk_modified = True # increment index for next disk search @@ -2698,11 +2684,10 @@ class PyVmomiHelper(PyVmomi): if expected_disk_spec['filename']: self.add_existing_vmdk(vm_obj, expected_disk_spec, diskspec, scsi_ctl) continue - if vm_obj is None or self.params['template']: - # We are creating new VM or from Template - # Only create virtual device if not backed by vmdk in original template - if diskspec.device.backing.fileName == '': - diskspec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create + + # Only create virtual device if not backed by vmdk in original template + if diskspec.device.backing.fileName == '': + diskspec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create # which datastore? if expected_disk_spec.get('datastore'): @@ -2977,6 +2962,14 @@ class PyVmomiHelper(PyVmomi): vm_obj = self.get_vm_or_template(template_name=self.params['template']) if vm_obj is None: self.module.fail_json(msg="Could not find a template named %(template)s" % self.params) + if self.params['guest_id'] is not None and vm_obj.summary.config.guestId is not None and self.params['guest_id'] != vm_obj.summary.config.guestId: + details = { + 'vm_guest_id': self.params['guest_id'], + 'template_guest_id': vm_obj.summary.config.guestId, + } + self.module.fail_json(msg="Could not create vm from template with different guest_ids", + details=details) + else: vm_obj = None diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_boot_manager.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_boot_manager.py index ad89e6aed..2700ff4ba 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_boot_manager.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_boot_manager.py @@ -53,7 +53,6 @@ options: elements: str boot_hdd_name: description: - - Name of disk to be set as boot disk, which is case sensitive, e.g., 'Hard disk 1'. - This parameter is optional, if not set, will use the first virtual disk found in VM device list. type: str version_added: '3.2.0' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_controller.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_controller.py index df92a9a05..7084d9a21 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_controller.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_controller.py @@ -16,7 +16,6 @@ module: vmware_guest_controller short_description: Manage disk or USB controllers related to virtual machine in given vCenter infrastructure description: - This module can be used to add, remove disk controllers or USB controllers belonging to given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Diane Wang (@Tomorrow9) <dianew@vmware.com> options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_cross_vc_clone.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_cross_vc_clone.py index 8d7c4abac..748948c5e 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_cross_vc_clone.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_cross_vc_clone.py @@ -83,7 +83,6 @@ options: destination_vm_folder: description: - Destination folder, absolute path to deploy the cloned vm. - - This parameter is case sensitive. - 'Examples:' - ' folder: vm' - ' folder: ha-datacenter/vm' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_customization_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_customization_info.py index 3f97c533b..5fd637d36 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_customization_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_customization_info.py @@ -16,7 +16,6 @@ module: vmware_guest_customization_info short_description: Gather info about VM customization specifications description: - This module can be used to gather information about customization specifications. - - All parameters and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py index 56251b444..20ebc14ca 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py @@ -16,7 +16,6 @@ module: vmware_guest_disk short_description: Manage disks related to virtual machine in given vCenter infrastructure description: - This module can be used to add, remove and update disks belonging to given virtual machine. - - All parameters and VMware object names are case sensitive. - This module is destructive in nature, please read documentation carefully before proceeding. - Be careful while removing disk specified as this may lead to data loss. author: @@ -67,7 +66,6 @@ options: description: - A list of disks to add or remove. - The virtual disk related information is provided using this list. - - All values and parameters are case sensitive. suboptions: size: description: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk_info.py index 06c5d3565..2be78c64b 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk_info.py @@ -17,7 +17,6 @@ module: vmware_guest_disk_info short_description: Gather info about disks of given virtual machine description: - This module can be used to gather information about disks belonging to given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) <akasurde@redhat.com> options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_instant_clone.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_instant_clone.py index 2b824338c..3b8c17972 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_instant_clone.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_instant_clone.py @@ -18,7 +18,6 @@ short_description: Instant Clone VM description: - This module can be used for Creating a powered-on Instant Clone of a virtual machine. -- All variables and VMware object names are case sensitive. - M(community.vmware.vmware_guest) module is needed for creating a VM with poweredon state which would be used as a parent VM. - M(community.vmware.vmware_guest_powerstate) module is also needed to poweroff the instant cloned module. - The powered off VM would in turn be deleted by again using M(community.vmware.vmware_guest) module. @@ -75,7 +74,6 @@ options: folder: description: - Destination folder, absolute path to deploy the cloned vm. - - This parameter is case sensitive. - 'Examples:' - 'folder: ha-datacenter/vm' - 'folder: /datacenter1/vm' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_move.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_move.py index 53f27adb3..2b7e4ae5a 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_move.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_move.py @@ -49,7 +49,6 @@ options: description: - Absolute path to move an existing guest - The dest_folder should include the datacenter. ESX's datacenter is ha-datacenter. - - This parameter is case sensitive. - 'Examples:' - ' dest_folder: /ha-datacenter/vm' - ' dest_folder: ha-datacenter/vm' diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_powerstate.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_powerstate.py index aaff49d45..1391c6181 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_powerstate.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_powerstate.py @@ -21,7 +21,6 @@ options: datacenter: description: - The datacenter where the VM you'd like to operate the power. - - This parameter is case sensitive. default: ha-datacenter type: str state: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_register_operation.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_register_operation.py index bd99f1ca4..6873b35d5 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_register_operation.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_register_operation.py @@ -20,7 +20,6 @@ options: datacenter: description: - Destination datacenter for the register/unregister operation. - - This parameter is case sensitive. type: str default: ha-datacenter cluster: @@ -31,7 +30,6 @@ options: description: - Description folder, absolute path of the target folder. - The folder should include the datacenter. ESX's datacenter is ha-datacenter. - - This parameter is case sensitive. - 'Examples:' - ' folder: /ha-datacenter/vm' - ' folder: ha-datacenter/vm' @@ -53,7 +51,6 @@ options: esxi_hostname: description: - The ESXi hostname where the virtual machine will run. - - This parameter is case sensitive. type: str template: description: @@ -70,7 +67,6 @@ options: resource_pool: description: - Specify a resource pool name to register VM. - - This parameter is case sensitive. - Resource pool should be child of the selected host parent. type: str state: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_screenshot.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_screenshot.py index 7c71997c7..5ba4eb784 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_screenshot.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_screenshot.py @@ -16,7 +16,6 @@ module: vmware_guest_screenshot short_description: Create a screenshot of the Virtual Machine console. description: - This module is used to take screenshot of the given virtual machine when virtual machine is powered on. - - All parameters and VMware object names are case sensitive. author: - Diane Wang (@Tomorrow9) <dianew@vmware.com> options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_sendkey.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_sendkey.py index 8d1c56cff..5340a2da6 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_sendkey.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_sendkey.py @@ -16,7 +16,6 @@ module: vmware_guest_sendkey short_description: Send USB HID codes to the Virtual Machine's keyboard. description: - This module is used to send keystrokes to given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Diane Wang (@Tomorrow9) <dianew@vmware.com> options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_snapshot.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_snapshot.py index da0cf5565..7d7dbfecd 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_snapshot.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_snapshot.py @@ -16,7 +16,6 @@ module: vmware_guest_snapshot short_description: Manages virtual machines snapshots in vCenter description: - This module can be used to create, delete and update snapshot(s) of the given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Loic Blot (@nerzhul) <loic.blot@unix-experience.fr> options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_storage_policy.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_storage_policy.py index 2c855eac5..7ae239d85 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_storage_policy.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_storage_policy.py @@ -69,14 +69,12 @@ options: vm_home: description: - A storage profile policy to set on VM Home. - - All values and parameters are case sensitive. - At least one of O(disk) or O(vm_home) are required parameters. required: false type: str disk: description: - A list of disks with storage profile policies to enforce. - - All values and parameters are case sensitive. - At least one of O(disk) and O(vm_home) are required parameters. required: false type: list diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py index e707cc82c..e01c25753 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_tools_info.py @@ -143,13 +143,18 @@ class PyVmomiHelper(PyVmomi): vm_ipaddress=self.current_vm_obj.summary.guest.ipAddress, vm_tools_running_status=self.current_vm_obj.summary.guest.toolsRunningStatus, vm_tools_install_status=self.current_vm_obj.summary.guest.toolsStatus, - vm_tools_version_status=self.current_vm_obj.summary.guest.toolsVersionStatus, + vm_tools_version_status=self.current_vm_obj.summary.guest.toolsVersionStatus2, vm_tools_install_type=self.current_vm_obj.config.tools.toolsInstallType, vm_tools_version=self.current_vm_obj.config.tools.toolsVersion, vm_tools_upgrade_policy=self.current_vm_obj.config.tools.toolsUpgradePolicy, vm_tools_last_install_count=self.current_vm_obj.config.tools.lastInstallInfo.counter, ) + self.module.deprecate( + msg="The API providing vm_tools_install_status has been deprecated by VMware; use vm_tools_running_status / vm_tools_version_status instead", + version="5.0.0", + collection_name="community.vmware" + ) return {'changed': False, 'failed': False, 'vmtools_info': vmtools_info} diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_tpm.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_tpm.py index 2b0178474..1e60caf2c 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_tpm.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_tpm.py @@ -52,7 +52,6 @@ options: datacenter: description: - The vCenter datacenter name used to get specified cluster or host. - - This parameter is case sensitive. type: str required: true state: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu.py index 1c8557681..b3ecd5244 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu.py @@ -16,7 +16,6 @@ module: vmware_guest_vgpu short_description: Modify vGPU video card profile of the specified virtual machine in the given vCenter infrastructure description: - This module is used to reconfigure vGPU card profile of the given virtual machine. - - All parameters and VMware object names are case sensitive. - VM must be power off M(community.vmware.vmware_guest_powerstate) module can perform that task. author: - Mohamed Alibi (@Medalibi) @@ -57,7 +56,6 @@ options: default: ha-datacenter description: - The datacenter name to which virtual machine belongs to. - - This parameter is case sensitive. type: str state: default: present diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu_info.py index 090c71588..1bdeae6f2 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_vgpu_info.py @@ -17,7 +17,6 @@ version_added: '3.3.0' short_description: Gather information about vGPU profiles of the specified virtual machine in the given vCenter infrastructure description: - This module is used to gather metadata about vGPU profiles of the given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Jared Priddy (@jdptechnc) options: @@ -56,7 +55,6 @@ options: default: ha-datacenter description: - The datacenter name to which virtual machine belongs to. - - This parameter is case sensitive. type: str use_instance_uuid: description: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_guest_video.py b/ansible_collections/community/vmware/plugins/modules/vmware_guest_video.py index de5e4c628..62c3ad9c7 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_guest_video.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_guest_video.py @@ -16,7 +16,6 @@ module: vmware_guest_video short_description: Modify video card configurations of specified virtual machine in given vCenter infrastructure description: - This module is used to reconfigure video card settings of given virtual machine. - - All parameters and VMware object names are case sensitive. author: - Diane Wang (@Tomorrow9) <dianew@vmware.com> options: @@ -55,7 +54,6 @@ options: default: ha-datacenter description: - The datacenter name to which virtual machine belongs to. - - This parameter is case sensitive. type: str gather_video_facts: description: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_host_datastore.py b/ansible_collections/community/vmware/plugins/modules/vmware_host_datastore.py index db8b9be91..fa41c0ade 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_host_datastore.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_host_datastore.py @@ -18,7 +18,6 @@ description: - This module can be used to mount/umount datastore on ESXi host. - This module only supports NFS (NFS v3 or NFS v4.1) and VMFS datastores. - For VMFS datastore, available device must already be connected on ESXi host. -- All parameters and VMware object names are case sensitive. author: - Ludovic Rivallain (@lrivallain) <ludovic.rivallain@gmail.com> - Christian Kotte (@ckotte) <christian.kotte@gmx.de> diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_host_dns_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_host_dns_info.py index bee8c58eb..b03c25d42 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_host_dns_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_host_dns_info.py @@ -15,7 +15,6 @@ module: vmware_host_dns_info short_description: Gathers info about an ESXi host's DNS configuration information description: - This module can be used to gather information about an ESXi host's DNS configuration information when ESXi hostname or Cluster name is given. -- All parameters and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) options: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown.py b/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown.py index 023f116b7..a5b1da457 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown.py @@ -15,7 +15,6 @@ module: vmware_host_lockdown short_description: Manage administrator permission for the local administrative account for the ESXi host description: - This module can be used to manage administrator permission for the local administrative account for the host when ESXi hostname is given. -- All parameters and VMware objects values are case sensitive. - This module is destructive as administrator permission are managed using APIs used, please read options carefully and proceed. - Please specify O(hostname) as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. author: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown_exceptions.py b/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown_exceptions.py index 892daeb39..709243ee0 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown_exceptions.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_host_lockdown_exceptions.py @@ -16,7 +16,6 @@ version_added: '3.1.0' short_description: Manage Lockdown Mode Exception Users description: - This module can be used to manage Lockdown Mode Exception Users. -- All parameters and VMware objects values are case sensitive. - Please specify O(hostname) as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. author: - Mario Lenz (@mariolenz) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_host_scanhba.py b/ansible_collections/community/vmware/plugins/modules/vmware_host_scanhba.py index 0087c8a2c..54addd438 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_host_scanhba.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_host_scanhba.py @@ -18,7 +18,6 @@ description: - This module can force a rescan of the hosts HBA subsystem which is needed when wanting to mount a new datastore. - You could use this before using M(community.vmware.vmware_host_datastore) to mount a new datastore to ensure your device/volume is ready. - You can also optionally force a Refresh of the Storage System in vCenter/ESXi Web Client. -- All parameters and VMware object names are case sensitive. - You can supply an esxi_hostname or a cluster_name author: - Michael Eaton (@michaeldeaton) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_local_user_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_local_user_info.py index bd4ef522f..d5bf17e35 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_local_user_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_local_user_info.py @@ -16,7 +16,6 @@ module: vmware_local_user_info short_description: Gather info about users on the given ESXi host description: - This module can be used to gather information about users present on the given ESXi host system in VMware infrastructure. - - All variables and VMware object names are case sensitive. - User must hold the 'Authorization.ModifyPermissions' privilege to invoke this module. author: - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_object_rename.py b/ansible_collections/community/vmware/plugins/modules/vmware_object_rename.py index 8f5cbb752..6b5be8471 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_object_rename.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_object_rename.py @@ -15,7 +15,6 @@ module: vmware_object_rename short_description: Renames VMware objects description: - This module can be used to rename VMware objects. -- All variables and VMware object names are case sensitive. - Renaming Host and Network is not supported by VMware APIs. author: - Abhijeet Kasurde (@Akasurde) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_tag.py b/ansible_collections/community/vmware/plugins/modules/vmware_tag.py index c37f310a7..fdb33c811 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_tag.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_tag.py @@ -17,7 +17,6 @@ short_description: Manage VMware tags description: - This module can be used to create / delete / update VMware tags. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_tag_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_tag_info.py index 25132efa8..fcc545576 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_tag_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_tag_info.py @@ -17,7 +17,6 @@ short_description: Manage VMware tag info description: - This module can be used to collect information about VMware tags. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_tag_manager.py b/ansible_collections/community/vmware/plugins/modules/vmware_tag_manager.py index 109188b45..d78a5a3dc 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_tag_manager.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_tag_manager.py @@ -17,7 +17,6 @@ short_description: Manage association of VMware tags with VMware objects description: - This module can be used to assign / remove VMware tags from the given VMware objects. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Abhijeet Kasurde (@Akasurde) - Frederic Van Reet (@GBrawl) diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_vc_infraprofile_info.py b/ansible_collections/community/vmware/plugins/modules/vmware_vc_infraprofile_info.py index a4312e62e..af5594416 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_vc_infraprofile_info.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_vc_infraprofile_info.py @@ -17,7 +17,6 @@ short_description: List and Export VMware vCenter infra profile configs. description: - Module to manage VMware vCenter infra profile configs. - vCenter infra profile Library feature is introduced in vSphere 7.0 version, so this module is not supported in the earlier versions of vSphere. -- All variables and VMware object names are case sensitive. author: - Naveenkumar G P (@ngp) requirements: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_vm_config_option.py b/ansible_collections/community/vmware/plugins/modules/vmware_vm_config_option.py index fd1e67837..9201d2724 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_vm_config_option.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_vm_config_option.py @@ -26,7 +26,6 @@ options: datacenter: description: - The datacenter name used to get specified cluster or host. - - This parameter is case sensitive. default: ha-datacenter type: str cluster_name: diff --git a/ansible_collections/community/vmware/plugins/modules/vmware_vm_shell.py b/ansible_collections/community/vmware/plugins/modules/vmware_vm_shell.py index 76f1d5308..51d1230eb 100644 --- a/ansible_collections/community/vmware/plugins/modules/vmware_vm_shell.py +++ b/ansible_collections/community/vmware/plugins/modules/vmware_vm_shell.py @@ -47,6 +47,7 @@ options: - ' folder: /folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm/folder2' + - Required if O(vm_id_type=inventory_path) type: str vm_id: description: diff --git a/ansible_collections/community/vmware/scripts/inventory/vmware_inventory.py b/ansible_collections/community/vmware/scripts/inventory/vmware_inventory.py index 618e09e20..c265a2620 100644 --- a/ansible_collections/community/vmware/scripts/inventory/vmware_inventory.py +++ b/ansible_collections/community/vmware/scripts/inventory/vmware_inventory.py @@ -283,7 +283,7 @@ class VMWareInventory(object): self.maxlevel = int(config.get('vmware', 'max_object_level')) self.debugl('max object level is %s' % self.maxlevel) self.lowerkeys = config.get('vmware', 'lower_var_keys') - if type(self.lowerkeys) != bool: + if not isinstance(self.lowerkeys, bool): if str(self.lowerkeys).lower() in ['yes', 'true', '1']: self.lowerkeys = True else: diff --git a/ansible_collections/community/vmware/tests/sanity/ignore-2.18.txt b/ansible_collections/community/vmware/tests/sanity/ignore-2.18.txt new file mode 100644 index 000000000..4a0d49a7d --- /dev/null +++ b/ansible_collections/community/vmware/tests/sanity/ignore-2.18.txt @@ -0,0 +1,4 @@ +plugins/modules/vmware_deploy_ovf.py replace-urlopen!skip +plugins/modules/vmware_deploy_ovf.py use-argspec-type-path!skip +scripts/inventory/vmware_inventory.py pep8!skip +tests/unit/mock/loader.py pep8!skip diff --git a/ansible_collections/community/vmware/tests/unit/mock/loader.py b/ansible_collections/community/vmware/tests/unit/mock/loader.py index e5dff78c1..edeac4526 100644 --- a/ansible_collections/community/vmware/tests/unit/mock/loader.py +++ b/ansible_collections/community/vmware/tests/unit/mock/loader.py @@ -30,7 +30,7 @@ class DictDataLoader(DataLoader): def __init__(self, file_mapping=None): file_mapping = {} if file_mapping is None else file_mapping - assert type(file_mapping) == dict + assert isinstance(file_mapping, dict) super(DictDataLoader, self).__init__() |