From b6dc17afede93878515a071d6f3293a71b3002bf Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 9 Nov 2023 23:23:28 +0530 Subject: [PATCH] Release/1.9.1 (#428) * example fix (#420) Co-authored-by: Gevorg-Khachatryaan * Add cluster URL to response only when there is cluster creation (#402) * Create cluster url when it is required * Minor fix * fiql string in filtering (#423) * fiql string in filtering * fix * Add Tests * example for filter string --------- Co-authored-by: Gevorg-Khachatryaan Co-authored-by: Alaa Bishtawi * Bug/issue#383 (#411) * Fix Jekyll Build * fix * Fix #391 and #418 (#419) * Create cluster url when it is required * Minor fix * Change api url for fetching time machine using name to get complete info same as uuid * Add attribute in clone modules in ndb for creation or refresh using latestSnapshot * Minor typo fix * Minor typo fix * functionality to update owner of vms (#412) * functionality to update owner of vm * sanity fix * add test --------- Co-authored-by: Gevorg-Khachatryaan Co-authored-by: Alaa Bishtawi * example for vms inventory (#410) Co-authored-by: Gevorg-Khachatryaan * fix for custom filter and examples (#417) * fix for custom filter and examples * black fix * sanity fix * Add test --------- Co-authored-by: Gevorg-Khachatryaan Co-authored-by: Alaa Bishtawi * example for vms inventory (#426) * example for vms inventory * ansible cfg * Move cfg to inventory example folder * Minor name changes * Minor fix --------- Co-authored-by: Gevorg-Khachatryaan Co-authored-by: Pradeepsingh Bhati * Add support for PC Categories (#405) Co-authored-by: Gianluca Salvo * Bug/issue#400 (#403) * fix issue #400 * fix issue #400 --------- Co-authored-by: Gevorg-Khachatryaan * example for VMs with guest customization file which injects variables from the playbook (#396) Co-authored-by: Gevorg-Khachatryaan * Fix: Syntax Errors in Create App Security Rule Ex (#394) * functionality to handle issue when size of new disk is absent (#393) Co-authored-by: Gevorg-Khachatryaan * example fix (#392) Co-authored-by: Gevorg-Khachatryaan * sanity fix * fix for issue#360 (#408) * fix for issue#360 * fix --------- Co-authored-by: Gevorg-Khachatryaan * improve clone examples (#407) * imporve clone examples * Fix Examples * sanity fix * disbale tests * Enhance Acp Tests * fix disks issue when size gb is not given for clone image disks * Set release version 1.9.1 * enable image tests * enable foundation sanity test * Minor foundation test fix * Enable pc tests * Enable karbon and foundation sanity * disables tests * enables tests * enable pc tests * add tests for clones with latest snapshot. And enable clones and NDB database sanity tests * skip protection rules tests * Add random naming for acp test with user reference * Bug/191 fix database sanity test (#430) * Revert "Bug/issue#383 (#411)" This reverts commit d1a0016b2954d0f7e89834bccb5de5eb8c392116. * Fix Properties map * Skip jelkyll check on database sanity test build issue --------- Co-authored-by: Pradeepsingh Bhati * fix ntnx_database_sanity * Add Contributaiong (#431) * Add Contributaiong * enhance contributaion * fix readme * Add comments to sample var files for simplicity * Minor typo --------- Co-authored-by: Pradeepsingh Bhati * Release Notes and changelog changes * Minor typo fix * remove unrequired file * Minor release bug list change due to non cherry picks --------- Co-authored-by: Gevorg Khachatryan Co-authored-by: Alaa Bishtawi Co-authored-by: Gianluca Salvo Co-authored-by: Gianluca Salvo Co-authored-by: Nathaniel Roberts <107402519+Nathaniel-Roberts@users.noreply.github.com> --- CHANGELOG.md | 28 +++ CHANGELOG.rst | 27 +++ README.md | 58 ++++++ changelogs/changelog.yaml | 31 +++ examples/clusters_info.yml | 8 + examples/fip_info.yml | 9 + examples/hosts_info.yml | 8 + examples/inventory/ansible.cfg | 7 + examples/inventory/nutanix.yaml | 13 ++ examples/ndb/create_clone.yml | 121 ++++++++++++ examples/ndb/refresh_clone.yml | 40 ++++ examples/subnet_info.yml | 9 + examples/vm.yml | 15 +- examples/vm_info.yml | 17 +- examples/vm_operations.yml | 3 +- galaxy.yml | 2 +- plugins/doc_fragments/ntnx_info.py | 8 +- plugins/doc_fragments/ntnx_vms_base.py | 15 ++ plugins/inventory/ntnx_prism_vm_inventory.py | 5 + plugins/module_utils/base_info_module.py | 9 + plugins/module_utils/entity.py | 21 +- plugins/module_utils/ndb/database_clones.py | 8 +- plugins/module_utils/ndb/time_machines.py | 7 +- plugins/module_utils/prism/spec/vms.py | 3 + plugins/module_utils/prism/vms.py | 41 +++- plugins/modules/ntnx_foundation.py | 4 +- plugins/modules/ntnx_images_info.py | 2 +- .../ntnx_ndb_database_clone_refresh.py | 16 +- plugins/modules/ntnx_ndb_database_clones.py | 7 +- .../modules/ntnx_ndb_time_machines_info.py | 2 +- plugins/modules/ntnx_security_rules.py | 36 ++-- plugins/modules/ntnx_vms_clone.py | 4 +- .../targets/ntnx_acps/tasks/create_acps.yml | 32 ++- .../targets/ntnx_acps/tasks/delete_acp.yml | 9 +- .../targets/ntnx_acps_info/aliases | 1 - .../targets/ntnx_address_groups/aliases | 1 - .../targets/ntnx_address_groups_info/aliases | 1 - .../targets/ntnx_categories/aliases | 1 - .../targets/ntnx_categories_info/aliases | 1 - .../targets/ntnx_clusters_info/aliases | 1 - .../tasks/image_nodes.yml | 37 ++++ .../targets/ntnx_hosts_info/aliases | 1 - .../aliases | 1 - .../ntnx_image_placement_policy/aliases | 1 - tests/integration/targets/ntnx_images/aliases | 1 - .../targets/ntnx_images_info/aliases | 1 - .../targets/ntnx_karbon_registries/aliases | 2 +- .../ntnx_karbon_registries_info/aliases | 2 +- .../ntnx_ndb_availability_databases/aliases | 1 - .../targets/ntnx_ndb_clones_info/aliases | 3 +- .../targets/ntnx_ndb_clusters/aliases | 2 +- .../targets/ntnx_ndb_database_clones/aliases | 1 - .../ntnx_ndb_database_clones/tasks/clones.yml | 112 +++++++++-- .../ntnx_ndb_databases_actions/aliases | 4 +- .../targets/ntnx_ndb_databases_sanity/aliases | 2 - .../ntnx_ndb_databases_sanity/tasks/tests.yml | 10 +- .../aliases | 4 +- .../aliases | 4 +- .../targets/ntnx_ndb_db_server_vms/aliases | 4 +- .../ntnx_ndb_maintenance_windows/aliases | 3 +- .../targets/ntnx_ndb_profiles/aliases | 2 +- .../targets/ntnx_ndb_profiles_info/aliases | 2 +- .../integration/targets/ntnx_ndb_slas/aliases | 4 +- .../targets/ntnx_ndb_snapshots_info/aliases | 4 +- .../ntnx_ndb_software_profiles/aliases | 2 +- .../integration/targets/ntnx_ndb_tags/aliases | 1 + .../ntnx_ndb_time_machines_info/aliases | 2 +- .../aliases | 4 +- .../targets/ntnx_ndb_vlans/aliases | 4 +- tests/integration/targets/ntnx_ova/aliases | 1 - .../targets/ntnx_permissions_info/aliases | 1 - .../integration/targets/ntnx_projects/aliases | 1 - .../targets/ntnx_projects_info/aliases | 1 - .../ntnx_recovery_plans_and_jobs/aliases | 2 +- .../ntnx_recovery_plans_and_jobs_info/aliases | 2 +- tests/integration/targets/ntnx_roles/aliases | 1 - .../targets/ntnx_roles_info/aliases | 1 - .../targets/ntnx_security_rules/aliases | 1 - .../targets/ntnx_security_rules_info/aliases | 1 - .../targets/ntnx_service_groups/aliases | 1 - .../targets/ntnx_service_groups_info/aliases | 1 - .../targets/ntnx_static_routes/aliases | 1 - .../targets/ntnx_static_routes_info/aliases | 1 - .../targets/ntnx_user_groups/aliases | 1 - tests/integration/targets/ntnx_users/aliases | 1 - .../targets/ntnx_users_info/aliases | 1 - .../targets/ntnx_vms_clone/aliases | 1 - .../targets/nutanix_floating_ips/aliases | 1 - .../targets/nutanix_floating_ips_info/aliases | 1 - .../integration/targets/nutanix_pbrs/aliases | 1 - .../targets/nutanix_pbrs_info/aliases | 1 - .../targets/nutanix_subnets/aliases | 1 - .../targets/nutanix_subnets_info/aliases | 1 - .../tasks/list_subnets.yml | 15 ++ tests/integration/targets/nutanix_vms/aliases | 1 - .../targets/nutanix_vms/tasks/create.yml | 35 ++++ .../nutanix_vms/tasks/negtaive_scenarios.yml | 30 +++ .../targets/nutanix_vms/tasks/vm_update.yml | 22 +++ .../targets/nutanix_vms_info/aliases | 1 - .../nutanix_vms_info/tasks/list_vms.yml | 48 +++++ .../integration/targets/nutanix_vpcs/aliases | 1 - .../targets/nutanix_vpcs_info/aliases | 1 - .../targets/prepare_env/vars/main.yml | 145 ++++++++++++++ .../prepare_foundation_env/vars/main.yml | 95 +++++++++ .../targets/prepare_ndb_env/vars/main.yml | 184 ++++++++++++++++++ 105 files changed, 1308 insertions(+), 148 deletions(-) create mode 100644 examples/inventory/ansible.cfg create mode 100644 examples/inventory/nutanix.yaml create mode 100644 examples/ndb/create_clone.yml create mode 100644 examples/ndb/refresh_clone.yml create mode 100644 tests/integration/targets/prepare_foundation_env/vars/main.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index e00212444..61def8c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +## v1.9.1 (09 November 2023) + + +**Improvements:** + +- docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)] +- info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)] +- ndb clones - [Imprv] Enable database clones and clone refresh using latest snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)] +- ndb clones - [Imprv] add examples for NDB database clone under examples folder [[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)] +- ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)] +- ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)] +- ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)] +- ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)] +- ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)] + +**Bugs:** + +- ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)] +- ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)] +- ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example [[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)] +- ntnx_vms - [Bug] Error when updating size_gb using the int filter in module ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)] +- ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)] +- ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)] +- website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)] + +**Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.9.0...v1.9.1) + ## v1.9.0 (11 July 2023) @@ -19,6 +46,7 @@ - ntnx_karbon_clusters_node_pools - Create,Update and Delete worker node pools with the provided configuration. - ntnx_ndb_tags_info - info module for ndb tags info +**Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.8.0...v1.9.0) ## v1.8.0 (28 Feb 2023) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c6d112a4b..90345a08d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,33 @@ Nutanix.Ncp Release Notes .. contents:: Topics +v1.9.1 +====== + +Minor Changes +------------- + +- docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)] +- info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)] +- ndb clones - [Imprv] Enable database clones and clone refresh using latest snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)] +- ndb clones - [Imprv] add examples for NDB database clone under examples folder [[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)] +- ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)] +- ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)] +- ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)] +- ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)] +- ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)] + +Bugfixes +-------- + +- ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)] +- ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)] +- ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example [[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)] +- ntnx_vms - [Bug] Error when updating size_gb using the int filter in module ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)] +- ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)] +- ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)] +- website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)] + v1.9.0 ====== diff --git a/README.md b/README.md index 3e59c706a..999354992 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ This collection requires Python 2.7 or greater > For the 1.9.0 release of the ansible plugin it will have N-1 compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2023.1 and pc.2023.1.0.1 . +> For the 1.9.1 release of the ansible plugin it will have N-1 compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2023.3 and pc.2023.1.0.2 . + ### Notes: 1. Static routes module (ntnx_static_routes) is supported for PC versions >= pc.2022.1 @@ -55,6 +57,8 @@ Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/ma ## Foundation > For the 1.1.0 release of the ansible plugin, it will have N-1 compatibility with the Foundation. This release was tested against Foundation versions v5.2 and v5.1.1 +> For the 1.9.1 release of the ansible plugin, it was tested against NDB versions v2.5.2 + Foundation based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/foundation ## Foundation Central @@ -67,6 +71,8 @@ Foundation Central based examples : https://github.com/nutanix/nutanix.ansible/t > For the 1.9.0 release of the ansible plugin, it was tested against Karbon versions v2.6.0, v2.7.0 and v2.8.0 +> For the 1.9.1 release of the ansible plugin, it was tested against Karbon version v2.8.0 + Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/karbon ## Nutanix Database Service (ERA) @@ -75,6 +81,8 @@ Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/exa > For the 1.9.0 release of the ansible plugin, it was tested against NDB versions v2.5.0.2 +> For the 1.9.1 release of the ansible plugin, it was tested against NDB versions v2.5.1.1 + NDB based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/ndb ### Notes: @@ -260,6 +268,56 @@ We glady welcome contributions from the community. From updating the documentati * [Contributing Guide](CONTRIBUTING.md) * [Code of Conduct](CODE_OF_CONDUCT.md) +# Testing + +## Integration Testing for Nutanix Ansible Modules + +To conduct integration tests for a specific Ansible module such as the `ntnx_vms` module, the following step-by-step procedures can be followed: + +### Prerequisites +- Ensure you are in the installed collection directory where the module is located. For example: +`/Users/mac.user1/.ansible/collections/ansible_collections/nutanix/ncp` + +### Setting up Variables +1. Navigate to the `tests/integration/targets` directory within the collection. + +2. Define the necessary variables within the feature-specific var files, such as `tests/integration/targets/prepare_env/vars/main.yml`, `tests/integration/targets/prepare_foundation_env/vars/main.yml`,`tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml`, etc. + +Note: For Karbon and FC tests, use the PC vars exclusively, as these features rely on pc setup. Not all variables are mandatory; define only the required variables for the particular feature to be tested. + +3. Run the test setup playbook for the specific feature you intend to test to create entities in setup: + - For PC, NDB, and Foundation tests, execute the relevant commands: + ```bash + ansible-playbook prepare_env/tasks/prepare_env.yml + ansible-playbook prepare_ndb_env/tasks/prepare_env.yml + ansible-playbook prepare_foundation_env/tasks/prepare_foundation_env.yml + ``` + +### Running Integration Tests +1. Conduct integration tests for all modules using: + ```bash + ansible-test integration + ``` + +2. To perform integration tests for a specific module: + ```bash + ansible-test integration module_test_name + ``` + Replace `module_test_name` with test directory name under tests/integration/targets. + +### Cleanup +1. After completing the integration tests, perform a cleanup specific to the tested feature: + - For PC tests, execute the command: + ```bash + ansible-playbook prepare_env/tasks/clean_up.yml + ``` + - For Foundation tests, execute the command: + ```bash + ansible-playbook prepare_foundation_env/tasks/clean_up.yml + ``` + +By following these steps, you can perform comprehensive integration testing for the specified Ansible module and ensure a clean testing environment afterward. Define only the necessary variables for the specific feature you intend to test. + # Examples ## Playbook for IaaS provisioning on Nutanix diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 628bfed57..8b6e643af 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -417,3 +417,34 @@ releases: name: ntnx_ndb_tags_info namespace: '' release_date: '2023-07-11' + 1.9.1: + changes: + bugfixes: + - ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation + [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)] + - ntnx_ndb_time_machines_info - [Bug] ntnx_ndb_time_machines_info not fetching + all attributes when name is used for fetching [[\#418](https://github.com/nutanix/nutanix.ansible/issues/418)] + - ntnx_security_rules - Fix Syntax Errors in Create App Security Rule Example + [[\#394](https://github.com/nutanix/nutanix.ansible/pull/394/files)] + - ntnx_vms - [Bug] Error when updating size_gb using the int filter in module + ntnx_vms [[\#400](https://github.com/nutanix/nutanix.ansible/issues/400)] + - ntnx_vms - [Bug] hard_poweroff has been moved to state from operation [[\#415](https://github.com/nutanix/nutanix.ansible/issues/415)] + - ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone + [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)] + - website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)] + minor_changes: + - docs - [Imprv] add doc regarding running integration tests locally [[\#435](https://github.com/nutanix/nutanix.ansible/issues/435)] + - info modules - [Imprv] add examples for custom_filter [[\#416](https://github.com/nutanix/nutanix.ansible/issues/416)] + - ndb clones - [Imprv] Enable database clones and clone refresh using latest + snapshot flag [[\#391](https://github.com/nutanix/nutanix.ansible/issues/391)] + - ndb clones - [Imprv] add examples for NDB database clone under examples folder + [[\#386](https://github.com/nutanix/nutanix.ansible/issues/386)] + - ntnx_prism_vm_inventory - Add support for PC Categories [[\#405](https://github.com/nutanix/nutanix.ansible/issues/405)] + - ntnx_prism_vm_inventory - [Imprv] add examples for dynamic inventory using + ntnx_prism_vm_inventory [[\#401](https://github.com/nutanix/nutanix.ansible/issues/401)] + - ntnx_vms - [Imprv] add possibility to specify / modify vm user ownership and + project [[\#378](https://github.com/nutanix/nutanix.ansible/issues/378)] + - ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)] + - ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms + [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)] + release_date: '2023-10-09' diff --git a/examples/clusters_info.yml b/examples/clusters_info.yml index 12c0ec7c2..7eab579f3 100644 --- a/examples/clusters_info.yml +++ b/examples/clusters_info.yml @@ -28,3 +28,11 @@ sort_order: "ASCENDING" sort_attribute: "name" register: result + + - name: List clusters using filter and custom_filter + ntnx_clusters_info: + filter: + name: + custom_filter: + external_ip: + register: result diff --git a/examples/fip_info.yml b/examples/fip_info.yml index ac17a5231..804e9ebd4 100644 --- a/examples/fip_info.yml +++ b/examples/fip_info.yml @@ -29,3 +29,12 @@ offset: 0 register: result ignore_errors: True + + + - name: List floating_ips using filter and custom_filter + ntnx_floating_ips_info: + filter: + name: + custom_filter: + private_ip: + register: result diff --git a/examples/hosts_info.yml b/examples/hosts_info.yml index ea7483968..1984cc41c 100644 --- a/examples/hosts_info.yml +++ b/examples/hosts_info.yml @@ -29,3 +29,11 @@ sort_attribute: "name" register: result ignore_errors: True + + - name: List hosts using filter and custom_filter + ntnx_hosts_info: + filter: + name: + custom_filter: + serial_number: + register: result diff --git a/examples/inventory/ansible.cfg b/examples/inventory/ansible.cfg new file mode 100644 index 000000000..7c5781ba3 --- /dev/null +++ b/examples/inventory/ansible.cfg @@ -0,0 +1,7 @@ +[defaults] +inventory = nutanix.yaml + +[inventory] +enable_plugins = nutanix.ncp.ntnx_prism_vm_inventory + + diff --git a/examples/inventory/nutanix.yaml b/examples/inventory/nutanix.yaml new file mode 100644 index 000000000..b38ba655e --- /dev/null +++ b/examples/inventory/nutanix.yaml @@ -0,0 +1,13 @@ +plugin: nutanix.ncp.ntnx_prism_vm_inventory +nutanix_hostname: +nutanix_username: +nutanix_password: +validate_certs: false +data: {"offset": 0, "length": 1000} +groups: + group_1: "'' in name" + group_2: "''==name" +keyed_groups: + - prefix: "host" + separator: ':' + key: "ansible_host" \ No newline at end of file diff --git a/examples/ndb/create_clone.yml b/examples/ndb/create_clone.yml new file mode 100644 index 000000000..d2533e4f7 --- /dev/null +++ b/examples/ndb/create_clone.yml @@ -0,0 +1,121 @@ +--- +- name: Create clone + hosts: localhost + gather_facts: false + collections: + - nutanix.ncp + module_defaults: + group/nutanix.ncp.ntnx: + nutanix_host: + nutanix_username: + nutanix_password: + validate_certs: false + + tasks: + - set_fact: + clone_db: + name: + db_params_profile: + name: + vm: + name: + password: + cluster: + name: + network_profile: + name: + compute_profile: + name: + public_ssh_key: + time_machine: + name: