Skip to content

Commit

Permalink
Made minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rajshekarp87 committed Nov 15, 2024
1 parent c97b3ac commit f512504
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: "OMAM_Firm_Repo"
description: "Firmware repository profile created by OMAM"
state: present
catalog_path: "http://100.96.37.71/myrepo/automation/omevv_baseline_profile_catalog.xml"
catalog_path: "{{ http_share_dir_path }}/omevv_baseline_profile_catalog.xml"
protocol_type: HTTP
register: firm_repo

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fetch volume details from iDRAC
# Retrieve baseline information from OMEVV
---
- block:
- name: Retrieve Baseline information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
name: OMAM_Baseline_Profile
repository_profile: OMAM_Firm_Repo
cluster:
- Raj-Cluster-1
- Raj-Cluster-2
- OMAM-Cluster-1
- OMAM-Cluster-2
days:
- all
time: "00:00"
register: cm_result_baseline
check_mode: true

- name: Verify task status - Create a baseline profile with multiple
cluster (Check mode - Changes expected)
cluster (Check mode - Changes expected)
ansible.builtin.assert:
that:
- cm_result_baseline.changed
Expand All @@ -46,7 +46,7 @@
register: cm_dm_result_baseline

- name: Verify task status - Create a baseline profile with multiple
cluster (Check and Diff mode - Changes expected)
cluster (Check and Diff mode - Changes expected)
ansible.builtin.assert:
that:
- cm_dm_result_baseline.changed
Expand All @@ -60,13 +60,13 @@
register: normal_result_baseline

- name: Verify task status - Create a baseline profile with multiple
cluster (Normal mode)
cluster (Normal mode)
ansible.builtin.assert:
that:
- normal_result_baseline.changed
- 'normal_result_baseline.msg == "Successfully created OMEVV the
baseline profile."'
- normal_result_baseline.profile_info
- 'normal_result_baseline.msg == "Successfully created the baseline
profile."'
- normal_result_baseline.baseline_profile_info

- name: Verify baseline details
ansible.builtin.include_tasks: _verify_baseline.yml
Expand All @@ -77,7 +77,7 @@
register: idempotence_result_baseline

- name: Verify task status - Create a baseline profile with multiple
cluster (Idempotence)
cluster (Idempotence)
ansible.builtin.assert:
that:
- not idempotence_result_baseline.changed
Expand All @@ -94,15 +94,15 @@
register: normal_diff_result_baseline

- name: Verify task status - Create a baseline profile with multiple
cluster (Normal and Diff mode)
cluster (Normal and Diff mode)
ansible.builtin.assert:
that:
- normal_diff_result_baseline.changed
- 'normal_diff_result_baseline.msg == "Successfully created OMEVV the
- 'normal_diff_result_baseline.msg == "Successfully created the
baseline profile."'
- normal_diff_result_baseline.profile_info
- normal_diff_result_baseline.before | length == 0
- normal_diff_result_baseline.after | length > 1
- normal_diff_result_baseline.baseline_profile_info
- normal_diff_result_baseline.diff.before | length == 0
- normal_diff_result_baseline.diff.after | length > 1

- name: Verify baseline details
ansible.builtin.include_tasks: _verify_baseline.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
state: present
name: OMAM_Baseline_Profile
repository_profile: OMAM_Firm_Repo
cluster: Raj-Cluster-1
cluster: OMAM-Cluster-1
days:
- sunday
- wednesday
Expand Down Expand Up @@ -63,9 +63,9 @@
ansible.builtin.assert:
that:
- normal_result_baseline.changed
- 'normal_result_baseline.msg == "Successfully created OMEVV the
baseline profile."'
- normal_result_baseline.profile_info
- 'normal_result_baseline.msg == "Successfully created the baseline
profile."'
- normal_result_baseline.baseline_profile_info

- name: Create a baseline profile with single cluster (Idempotence)
dellemc.openmanage.omevv_baseline_profile:
Expand Down Expand Up @@ -97,11 +97,11 @@
ansible.builtin.assert:
that:
- normal_diff_result_baseline.changed
- 'normal_diff_result_baseline.msg == "Successfully created OMEVV the
- 'normal_diff_result_baseline.msg == "Successfully created the
baseline profile."'
- normal_diff_result_baseline.profile_info
- normal_diff_result_baseline.before | length == 0
- normal_diff_result_baseline.after | length > 1
- normal_diff_result_baseline.baseline_profile_info
- normal_diff_result_baseline.diff.before | length == 0
- normal_diff_result_baseline.diff.after | length > 1

- name: Verify baseline details
ansible.builtin.include_tasks: _verify_baseline.yml
Expand Down

0 comments on commit f512504

Please sign in to comment.