From 16de58108a4f0d88b1d387f88de9f8682600fa89 Mon Sep 17 00:00:00 2001 From: George Ghawali Date: Mon, 16 Dec 2024 12:24:15 +0200 Subject: [PATCH] Adding ansible lint fixes for examples --- .../clusters_nodes_v2.yml | 2 +- examples/iam_v2/authorization_policies_v2.yml | 2 +- examples/iam_v2/operations_v2.yml | 2 +- examples/iam_v2/roles_v2.yml | 76 ++++++------- examples/iam_v2/user_groups_v2.yml | 2 +- examples/iam_v2/users_v2.yml | 2 +- examples/networks_v2/address_groups_v2.yml | 2 +- examples/networks_v2/routes_v2.yml | 100 +++++++++--------- examples/networks_v2/security_rules_v2.yml | 2 +- examples/networks_v2/service_groups_v2.yml | 2 +- .../storage_container_v2.yml | 2 +- examples/vmm_v2/vms_v2.yml | 2 +- 12 files changed, 98 insertions(+), 98 deletions(-) diff --git a/examples/cluster_management_v2/clusters_nodes_v2.yml b/examples/cluster_management_v2/clusters_nodes_v2.yml index d94de0f4..a963eef4 100644 --- a/examples/cluster_management_v2/clusters_nodes_v2.yml +++ b/examples/cluster_management_v2/clusters_nodes_v2.yml @@ -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: diff --git a/examples/iam_v2/authorization_policies_v2.yml b/examples/iam_v2/authorization_policies_v2.yml index 6d3316dc..9f60a725 100644 --- a/examples/iam_v2/authorization_policies_v2.yml +++ b/examples/iam_v2/authorization_policies_v2.yml @@ -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: diff --git a/examples/iam_v2/operations_v2.yml b/examples/iam_v2/operations_v2.yml index 728362fc..1b902b12 100644 --- a/examples/iam_v2/operations_v2.yml +++ b/examples/iam_v2/operations_v2.yml @@ -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: diff --git a/examples/iam_v2/roles_v2.yml b/examples/iam_v2/roles_v2.yml index 16e35755..c33be5bc 100644 --- a/examples/iam_v2/roles_v2.yml +++ b/examples/iam_v2/roles_v2.yml @@ -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 diff --git a/examples/iam_v2/user_groups_v2.yml b/examples/iam_v2/user_groups_v2.yml index 14cfe66a..9a6da55d 100644 --- a/examples/iam_v2/user_groups_v2.yml +++ b/examples/iam_v2/user_groups_v2.yml @@ -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: diff --git a/examples/iam_v2/users_v2.yml b/examples/iam_v2/users_v2.yml index efe6d511..c6683be4 100644 --- a/examples/iam_v2/users_v2.yml +++ b/examples/iam_v2/users_v2.yml @@ -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: diff --git a/examples/networks_v2/address_groups_v2.yml b/examples/networks_v2/address_groups_v2.yml index ebfd0cbe..a4b71b15 100644 --- a/examples/networks_v2/address_groups_v2.yml +++ b/examples/networks_v2/address_groups_v2.yml @@ -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: diff --git a/examples/networks_v2/routes_v2.yml b/examples/networks_v2/routes_v2.yml index 62a4738e..1262fe1c 100644 --- a/examples/networks_v2/routes_v2.yml +++ b/examples/networks_v2/routes_v2.yml @@ -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 diff --git a/examples/networks_v2/security_rules_v2.yml b/examples/networks_v2/security_rules_v2.yml index 55494554..49e7674e 100644 --- a/examples/networks_v2/security_rules_v2.yml +++ b/examples/networks_v2/security_rules_v2.yml @@ -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: diff --git a/examples/networks_v2/service_groups_v2.yml b/examples/networks_v2/service_groups_v2.yml index 1002a448..c4a41cd0 100644 --- a/examples/networks_v2/service_groups_v2.yml +++ b/examples/networks_v2/service_groups_v2.yml @@ -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: diff --git a/examples/storage_container_v2/storage_container_v2.yml b/examples/storage_container_v2/storage_container_v2.yml index 4b741ad3..6be56abe 100644 --- a/examples/storage_container_v2/storage_container_v2.yml +++ b/examples/storage_container_v2/storage_container_v2.yml @@ -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: diff --git a/examples/vmm_v2/vms_v2.yml b/examples/vmm_v2/vms_v2.yml index 5591c5f1..3ba7a90d 100644 --- a/examples/vmm_v2/vms_v2.yml +++ b/examples/vmm_v2/vms_v2.yml @@ -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