Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding minor fixes for ansible lint checks #542

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@
- '"{{ clusters[0].config.cluster_functions[0] }}" in "{{result.response.config.cluster_function}}"'
- result.response.config.redundancy_factor == clusters[0].config.redundancy_factor_cluster_crud
- result.response.config.cluster_arch == "{{ clusters[0].config.cluster_arch }}"
- result.response.config.fault_tolerance_state.domain_awareness_level == "{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_crud }}"
- >
result.response.config.fault_tolerance_state.domain_awareness_level ==
"{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_crud }}"
fail_msg: Failed verifying cluster creation
success_msg: Cluster creation passed successfully

Expand Down Expand Up @@ -677,7 +679,9 @@
- '"{{ clusters[0].config.cluster_functions[0] }}" in "{{result.response.config.cluster_function}}"'
- result.response.config.redundancy_factor == clusters[0].config.redundancy_factor_cluster_crud
- result.response.config.cluster_arch == "{{ clusters[0].config.cluster_arch }}"
- result.response.config.fault_tolerance_state.domain_awareness_level == "{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_crud }}"
- >
result.response.config.fault_tolerance_state.domain_awareness_level ==
"{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_crud }}"
- result.response.network.external_address.ipv4.value == "{{ clusters[0].network.virtual_ip }}"
- unique_ntp_servers | length == 4
- unique_dns_servers | length == 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@
- result.response.config.cluster_function[0] == "{{ clusters[0].config.cluster_functions[0] }}"
- result.response.config.redundancy_factor == clusters[0].config.redundancy_factor_cluster_expanding
- result.response.config.cluster_arch == "{{ clusters[0].config.cluster_arch }}"
- result.response.config.fault_tolerance_state.domain_awareness_level == "{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_expanding }}"
- >
result.response.config.fault_tolerance_state.domain_awareness_level ==
"{{ clusters[0].config.fault_tolerance_state.domain_awareness_level_cluster_expanding }}"
fail_msg: Failed verifying cluster creation
success_msg: Cluster creation passed successfully

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
success_msg: "succes: get imaged cluster using custom filter sucessfully"

# still offset and length
# - debug:
# - ansible.builtin.debug:
# var: clusters.response

# - name: get imaged cluster using image_cluster_uuid
Expand All @@ -62,5 +62,5 @@
# length: 20
# register: result
# ignore_errors: true
# - debug:
# - ansible.builtin.debug:
# var: result.response.imaged_clusters|length
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# register: result

# - name: Creation Status
# assert:
# ansible.builtin.assert:
# that:
# - result.blocks is defined
# - result.failed==false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
# ignore_errors: true

# - name: check listing status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.failed == false
Expand All @@ -133,7 +133,7 @@
# fail_msg: "Fail: unable to verify create of multiple cluster network profile "
# success_msg: "Pass: verify create of multiple cluster network profile finished sucessfully"

# - set_fact:
# - ansible.builtin.set_fact:
# todelete: "{{ todelete + [ result.profile_uuid ] }}"
################################################################
# - name: update the profile for multiple cluster by subnets, publish
Expand All @@ -156,7 +156,7 @@
# ignore_errors: true

# - name: check listing status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.failed == false
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/targets/ntnx_ndb_vlans/tasks/create_vlans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@
# - "{{st_vlan.vlans_subnet1[1]}}"
# register: result
# ignore_errors: true
# - debug:
# - ansible.builtin.debug:
# var: result
# - name: check listing status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand All @@ -354,7 +354,7 @@
# fail_msg: "fail: Unable to create ndb_stretched vlan"
# success_msg: "pass: create ndb_stretched vlan finished successfully"

# - set_fact:
# - ansible.builtin.set_fact:
# todelete: "{{ todelete + [ result.vlan_uuid ] }}"

# ################################################################
Expand All @@ -369,10 +369,10 @@
# - "{{st_vlan.vlans_subnet2[1]}}"
# register: result
# ignore_errors: true
# - debug:
# - ansible.builtin.debug:
# var: result
# - name: check listing status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand All @@ -394,10 +394,10 @@
# subnet_mask: "{{st_vlan.subnet_mask}}"
# register: result
# ignore_errors: true
# - debug:
# - ansible.builtin.debug:
# var: result
# - name: check listing status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
fail_msg: "Unable to update protection rule with asynchronous schedule"
success_msg: "Protection policy with with asynchronous schedule updated successfully"

##################################################################################################################################################################
####################################################################################

- name: Idempotency Check
ntnx_protection_rules:
Expand Down Expand Up @@ -323,7 +323,7 @@
fail_msg: "Idempotency check failed"
success_msg: "Idempotency check passed"

##################################################################################################################################################################
####################################################################################

- name: Check Mode while update
check_mode: true
Expand Down
25 changes: 12 additions & 13 deletions tests/integration/targets/ntnx_static_routes/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,21 @@
success_msg: "Succes: static routes updated successfully"

- name: Wait 1 minute for static routes to be become active
pause:
ansible.builtin.pause:
seconds: 60

- name: get all static routes
- name: Get all static routes
ntnx_static_routes_info:
vpc_uuid: "{{ vpc.uuid }}"
register: result

- set_fact:
- name: Set destination variables
ansible.builtin.set_fact:
d1: "{{ result.response.status.resources.static_routes_list[0].destination }}"
d2: "{{ result.response.status.resources.static_routes_list[1].destination }}"

- debug:
msg: "{{ result }}"

- name: check info module response
assert:
- name: Check info module response
ansible.builtin.assert:
that:
- result.response is defined
- result.changed == false
Expand Down Expand Up @@ -115,19 +113,20 @@
success_msg: "Static routes overriden successfully"

- name: Wait 1 minute for static routes to be become active
pause:
ansible.builtin.pause:
seconds: 60

- name: get all static routes
- name: Get all static routes
ntnx_static_routes_info:
vpc_uuid: "{{ vpc.uuid }}"
register: result

- set_fact:
- name: Set destination variable
ansible.builtin.set_fact:
d1: "{{ result.response.status.resources.static_routes_list[0].destination }}"

- name: check info module response
assert:
- name: Check info module response
ansible.builtin.assert:
that:
- result.response is defined
- result.changed == false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
###########################################################################################################

- name: Wait 60 seconds for static routes to be created
pause:
ansible.builtin.pause:
seconds: 60

- name: Get all static routes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@
# register: result
# ignore_errors: True

# - set_fact:
# - ansible.builtin.set_fact:
# group_type: "{{ result.response | map(attribute='group_type') | list | unique }}"

# - name: Fetch only LDAP user groups Status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == false
Expand All @@ -275,11 +275,11 @@
# register: result
# ignore_errors: True

# - set_fact:
# - ansible.builtin.set_fact:
# group_type: "{{ result.response | map(attribute='group_type') | list | unique }}"

# - name: Fetch only SAML user groups Status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
# ignore_errors: true

# - name: Deactivate local user status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand All @@ -445,7 +445,7 @@
# ignore_errors: True

# - name: Fetch user info using user ext_id criteria and check status result
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == false
Expand All @@ -465,7 +465,7 @@
# ignore_errors: true

# - name: Activate local user status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@
# ignore_errors: true

# - name: Upgrade NGT in VM Status
# assert:
# ansible.builtin.assert:
# that:
# - result.response is defined
# - result.changed == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# file:
# path: "{{ source }}"
# state: absent
# ignore_errors: true
# ignore_errors: true
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
block: |
ndb_ip: "{{ lookup('env', 'NDB_HOST') }}"
ndb_username: "{{ lookup('env', 'NDB_USERNAME') }}"
ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}"
ndb_password: "{{ lookup('env', 'NDB_PASSWORD') }}"
Loading