Skip to content

playbooks/redfish: Fix security issues and consolidate job tracking#1073

Open
tobiasb-dell wants to merge 2 commits intodell:collectionsfrom
tobiasb-dell:fix/playbook-improvements
Open

playbooks/redfish: Fix security issues and consolidate job tracking#1073
tobiasb-dell wants to merge 2 commits intodell:collectionsfrom
tobiasb-dell:fix/playbook-improvements

Conversation

@tobiasb-dell
Copy link

This PR fixes security vulnerabilities and improves maintainability of the Redfish playbooks.

Security Fixes

  • Removed hardcoded credentials in several playbooks
  • Replaced hardcoded ca_path with optional variables
  • Fixed hardcoded IP addresses to use baseuri variable

Consolidation

Created reusable job tracking templates:

  • redfish_firmware_jobtracking.yml - consolidated firmware update job tracking
  • redfish_storage_volume_jobtracking.yml - consolidated storage volume job tracking

Updated playbooks to use include_tasks.

Consistency Improvements

  • Standardized hosts: redfish_hosts across all playbooks
  • Added connection: local at play level
  • Added register: to all tasks for error handling
  • Fixed typos and improved task name consistency

Files Changed

  • 11 existing playbook files modified
  • 2 new job tracking template files created

- Remove hardcoded credentials and use variables for baseuri, username, password
- Replace hardcoded ca_path with optional {{ ca_path | default(omit) }}
- Standardize hosts to redfish_hosts across all playbooks
- Add connection: local to eliminate repeated delegate_to: localhost
- Add register: to all tasks for error handling
- Consolidate duplicate job tracking logic into reusable templates
- Fix typos and improve consistency in task names

Consolidated firmware job tracking into redfish_firmware_jobtracking.yml
Consolidated storage volume job tracking into redfish_storage_volume_jobtracking.yml
@ansible-collections-svc
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.54%. Comparing base (95a5900) to head (565661b).

Additional details and impacted files
@@             Coverage Diff              @@
##           collections    #1073   +/-   ##
============================================
  Coverage        93.54%   93.54%           
============================================
  Files              296      296           
  Lines            46333    46333           
  Branches          4220     4220           
============================================
  Hits             43340    43340           
  Misses            1909     1909           
  Partials          1084     1084           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Remove play structure from job tracking templates (hosts, gather_facts, vars)
- Files meant to be included via include_tasks should only contain tasks
- Add default values for optional retry/polling variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants