-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'client_sdk_with_inventory' into main
# Conflicts: # .gitignore # README.md # galaxy.yml # plugins/module_utils/base_module.py # plugins/module_utils/entity.py # plugins/module_utils/prism/prism.py # plugins/module_utils/prism/vms.py
- Loading branch information
Showing
21 changed files
with
1,357 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[defaults] | ||
inventory = nutanix.yaml | ||
|
||
[inventory] | ||
enable_plugins = nutanix.ncp.ntnx_prism_vm_inventory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
- name: VM Creation using all poissible options | ||
hosts: localhost | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
tasks: | ||
- name: create Vm | ||
ntnx_vms: | ||
state: present | ||
nutanix_host: '' | ||
nutanix_username: '' | ||
nutanix_password: '' | ||
name: "ansible_automation_demo" | ||
desc: "ansible_vm_description" | ||
categories: | ||
AppType: | ||
- "Apache_Spark" | ||
cluster: | ||
#uuid: "0005d578-2faf-9fb6-3c07-ac1f6b6f9780" | ||
name: "auto_cluster_prod_1aa888141361" | ||
networks: | ||
- is_connected: True | ||
subnet: | ||
name: "vlan.800" | ||
disks: | ||
- type: "DISK" | ||
size_gb: 30 | ||
bus: "SATA" | ||
clone_image: | ||
name: "CentOS-7-cloudinit" | ||
vcpus: 1 | ||
cores_per_vcpu: 1 | ||
memory_gb: 1 | ||
guest_customization: | ||
type: "cloud_init" | ||
script_path: "test.json" | ||
is_overridable: True | ||
register: output | ||
|
||
- name: output of list Subnets | ||
debug: | ||
msg: '{{ output }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- name: Auto Generated Playbook | ||
hosts: localhost | ||
vars_files: credentials.yml | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
tasks: | ||
- name: delete Vm | ||
ntnx_vms: | ||
state: absent | ||
auth: | ||
credentials: '{{credentials}}' | ||
url: '{{config.ip_address}}:{{config.port}}' | ||
nutanix_host: '{{config.ip_address}}' | ||
nutanix_username: '{{credentials.username}}' | ||
nutanix_password: '{{credentials.password}}' | ||
uuid: "63f7115e-e071-4dc3-b417-69fe6d6ff37f" | ||
register: output | ||
|
||
- name: output of delete vm | ||
debug: | ||
msg: '{{ output }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
plugin: nutanix.ncp.ntnx_prism_vm_inventory | ||
validate_certs: False | ||
data: | ||
offset: 0 | ||
length: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Collections Plugins Directory | ||
|
||
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that | ||
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that | ||
would contain module utils and modules respectively. | ||
|
||
Here is an example directory of the majority of plugins currently supported by Ansible: | ||
|
||
``` | ||
└── plugins | ||
├── action | ||
├── become | ||
├── cache | ||
├── callback | ||
├── cliconf | ||
├── connection | ||
├── filter | ||
├── httpapi | ||
├── inventory | ||
├── lookup | ||
├── module_utils | ||
├── modules | ||
├── netconf | ||
├── shell | ||
├── strategy | ||
├── terminal | ||
├── test | ||
└── vars | ||
``` | ||
|
||
A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/devel/plugins/plugins.html). |
Oops, something went wrong.