diff --git a/examples/images.yml b/examples/images.yml new file mode 100644 index 000000000..1b19a917e --- /dev/null +++ b/examples/images.yml @@ -0,0 +1,84 @@ +--- +- name: Images playbook + hosts: localhost + gather_facts: false + collections: + - nutanix.ncp + module_defaults: + group/nutanix.ncp.ntnx: + nutanix_host: + nutanix_username: + nutanix_password: + validate_certs: false + tasks: + - name: Setting Variables + set_fact: + image_uuid: "" + source_path: "" + source_uri: "" + clusters_name: "" + + - name: create image from local workstation + ntnx_images: + state: "present" + source_path: "{{source_path}}" + clusters: + - name: "{{clusters_name}}" + categories: + AppFamily: + - Backup + checksum: + checksum_algorithm: SHA_1 + checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977 + name: "ansible-test-with-categories-mapping" + desc: "description" + image_type: "ISO_IMAGE" + version: + product_name: "test" + product_version: "1.2.0" + wait: true + + - name: create image from with source as remote server file location + ntnx_images: + state: "present" + source_uri: "{{source_uri}}" + clusters: + - name: "{{clusters_name}}" + categories: + AppFamily: + - Backup + checksum: + checksum_algorithm: SHA_1 + checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977 + name: "ansible-test-with-categories-mapping" + desc: "description" + image_type: "DISK_IMAGE" + version: + product_name: "test" + product_version: "1.2.0" + wait: true + + - name: override categories of existing image + ntnx_images: + state: "present" + image_uuid: "{{image-uuid}}" + categories: + AppTier: + - Default + AppFamily: + - Backup + wait: true + + - name: dettach all categories from existing image + ntnx_images: + state: "present" + image_uuid: "00000000-0000-0000-0000-000000000000" + remove_categories: true + wait: true + + - name: delete existing image + ntnx_images: + state: "absent" + image_uuid: "00000000-0000-0000-0000-000000000000" + wait: true + \ No newline at end of file diff --git a/examples/static_routes.yml b/examples/static_routes.yml new file mode 100644 index 000000000..8c64354f2 --- /dev/null +++ b/examples/static_routes.yml @@ -0,0 +1,46 @@ +--- +- name: Static Routes playbook + hosts: localhost + gather_facts: false + collections: + - nutanix.ncp + module_defaults: + group/nutanix.ncp.ntnx: + nutanix_host: + nutanix_username: + nutanix_password: + validate_certs: false + tasks: + - name: Setting Variables + set_fact: + vpc_uuid: "" + vpn_uuid: "" + external_nat_subnet: + name: "" + uuid: "" + + - name: create static routes and default static routes with external nat subnet + ntnx_static_routes: + vpc_uuid: "{{ vpc_uuid }}" + static_routes: + - destination: "0.0.0.0/0" + next_hop: + external_subnet_ref: + name: "{{ external_nat_subnet.name }}" + - destination: "10.2.2.0/24" + next_hop: + external_subnet_ref: + uuid: "{{ external_nat_subnet.uuid }}" + - destination: "10.2.3.0/24" + next_hop: + external_subnet_ref: + uuid: "{{ external_nat_subnet.uuid }}" + - destination: "10.2.4.0/24" + next_hop: + vpn_connection_ref: + uuid: "{{ vpn_uuid }}" + + - name: remove all routes excluding dynamic and local routes + ntnx_static_routes: + vpc_uuid: "{{ vpc_uuid }}" + remove_all_routes: true \ No newline at end of file