Skip to content

Commit

Permalink
Adding minor fixes for ansible lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
george-ghawali committed Dec 16, 2024
1 parent 013c7b4 commit 7255624
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 35 deletions.
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
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

0 comments on commit 7255624

Please sign in to comment.