Skip to content

Commit

Permalink
Adding ansible lint fixes for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
george-ghawali committed Dec 16, 2024
1 parent f3a4316 commit 16de581
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion examples/cluster_management_v2/clusters_nodes_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 4. Remove the node from the cluster
# 5. Destroy the cluster

- name: cluster expanding playbook
- name: Cluster expanding playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/iam_v2/authorization_policies_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# 5. Fetch authorization policies using filters
# 6. Delete created authorization policy

- name: authorization policies playbook
- name: Authorization policies playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/iam_v2/operations_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1. List all operations
# 2. List permission using ext_id criteria

- name: operations playbook
- name: Operations playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
76 changes: 38 additions & 38 deletions examples/iam_v2/roles_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,45 +25,45 @@
test_operation_2_uuid: 00000000-0000-0000-0000-000000000002
role_uuid: 00000000-0000-0000-0000-000000000003

- name: Create roles with operations
nutanix.ncp.ntnx_roles_v2:
state: present
display_name: "{{ role_name }}"
description: test-ansible-role-1-desc
operations:
- "{{ test_operation_1_uuid }}"
- "{{ test_operation_2_uuid }}"
wait: true
register: result
ignore_errors: true
- name: Create roles with operations
nutanix.ncp.ntnx_roles_v2:
state: present
display_name: "{{ role_name }}"
description: test-ansible-role-1-desc
operations:
- "{{ test_operation_1_uuid }}"
- "{{ test_operation_2_uuid }}"
wait: true
register: result
ignore_errors: true

- name: Update roles in check mode
nutanix.ncp.ntnx_roles_v2:
state: present
ext_id: "{{ role_uuid }}"
display_name: "{{ role_name_updated }}"
description: test-ansible-role-2-desc
operations:
- "{{ test_operation_2_uuid }}"
wait: true
register: result
check_mode: true
ignore_errors: true
- name: Update roles in check mode
nutanix.ncp.ntnx_roles_v2:
state: present
ext_id: "{{ role_uuid }}"
display_name: "{{ role_name_updated }}"
description: test-ansible-role-2-desc
operations:
- "{{ test_operation_2_uuid }}"
wait: true
register: result
check_mode: true
ignore_errors: true

- name: List all roles
nutanix.ncp.ntnx_roles_info_v2:
register: result
ignore_errors: true
- name: List all roles
nutanix.ncp.ntnx_roles_info_v2:
register: result
ignore_errors: true

- name: Fetch role using external ID
nutanix.ncp.ntnx_roles_info_v2:
ext_id: "{{ role_uuid }}"
register: result
ignore_errors: true
- name: Fetch role using external ID
nutanix.ncp.ntnx_roles_info_v2:
ext_id: "{{ role_uuid }}"
register: result
ignore_errors: true

- name: Delete role
nutanix.ncp.ntnx_roles_v2:
state: absent
ext_id: "{{ role_uuid }}"
register: result
ignore_errors: true
- name: Delete role
nutanix.ncp.ntnx_roles_v2:
state: absent
ext_id: "{{ role_uuid }}"
register: result
ignore_errors: true
2 changes: 1 addition & 1 deletion examples/iam_v2/user_groups_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 4. List user groups using filter criteria
# 5. Delete created user group

- name: user groups playbook
- name: User groups playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/iam_v2/users_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 7. List users with specific username
# 8. Delete created user

- name: users playbook
- name: Users playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/networks_v2/address_groups_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 3. Fetch the address group info
# 4. Delete the address group

- name: address groups playbook
- name: Address groups playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
100 changes: 50 additions & 50 deletions examples/networks_v2/routes_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,56 +28,56 @@
ip1: "10.0.0.1"
ip2: "10.0.0.2"

- name: Create static route
nutanix.ncp.ntnx_routes_v2:
state: present
name: "{{ route_name }}"
description: "Route for testing"
vpc_reference: "{{ vpc_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
route_type: STATIC
destination:
ipv4:
ip:
value: "{{ ip1 }}"
prefix_length: 32
nexthop:
nexthop_type: "EXTERNAL_SUBNET"
nexthop_reference: "{{ external_subnet_uuid }}"
metadata:
owner_reference_id: "{{ user_uuid }}"
project_reference_id: "{{ project_uuid }}"
register: result
ignore_errors: true
- name: Create static route
nutanix.ncp.ntnx_routes_v2:
state: present
name: "{{ route_name }}"
description: "Route for testing"
vpc_reference: "{{ vpc_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
route_type: STATIC
destination:
ipv4:
ip:
value: "{{ ip1 }}"
prefix_length: 32
nexthop:
nexthop_type: "EXTERNAL_SUBNET"
nexthop_reference: "{{ external_subnet_uuid }}"
metadata:
owner_reference_id: "{{ user_uuid }}"
project_reference_id: "{{ project_uuid }}"
register: result
ignore_errors: true

- name: Update route
nutanix.ncp.ntnx_routes_v2:
state: present
name: "{{ route_name }}_updated"
description: "Route for testing updated"
vpc_reference: "{{ vpc_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
ext_id: "{{ route_uuid }}"
route_type: STATIC
destination:
ipv4:
ip:
value: "{{ ip2 }}"
prefix_length: 32
register: result
ignore_errors: true
- name: Update route
nutanix.ncp.ntnx_routes_v2:
state: present
name: "{{ route_name }}_updated"
description: "Route for testing updated"
vpc_reference: "{{ vpc_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
ext_id: "{{ route_uuid }}"
route_type: STATIC
destination:
ipv4:
ip:
value: "{{ ip2 }}"
prefix_length: 32
register: result
ignore_errors: true

- name: Fetch route by external ID
nutanix.ncp.ntnx_routes_info_v2:
ext_id: "{{ route_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
register: result
ignore_errors: true
- name: Fetch route by external ID
nutanix.ncp.ntnx_routes_info_v2:
ext_id: "{{ route_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
register: result
ignore_errors: true

- name: Delete static route
nutanix.ncp.ntnx_routes_v2:
state: absent
ext_id: "{{ route_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
register: result
ignore_errors: true
- name: Delete static route
nutanix.ncp.ntnx_routes_v2:
state: absent
ext_id: "{{ route_uuid }}"
route_table_ext_id: "{{ route_table_external_id }}"
register: result
ignore_errors: true
2 changes: 1 addition & 1 deletion examples/networks_v2/security_rules_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 3. Fetch the security rule info
# 4. Delete the security rule

- name: security rules playbook
- name: Security rules playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/networks_v2/service_groups_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 3. Fetch the service group details using ext_id
# 4. Delete the service group

- name: service groups playbook
- name: Service groups playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/storage_container_v2/storage_container_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 6. Fetch all storage containers
# 7. Delete the storage container

- name: storage container playbook
- name: Storage container playbook
hosts: localhost
gather_facts: false
module_defaults:
Expand Down
2 changes: 1 addition & 1 deletion examples/vmm_v2/vms_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
ignore_errors: true

- name: Fetch VM
nutanix.ncp.ntnx_vms_info_v2.py:
nutanix.ncp.ntnx_vms_info_v2:
ext_id: "{{ vm_uuid }}"
register: result
ignore_errors: true
Expand Down

0 comments on commit 16de581

Please sign in to comment.