dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
340 stars 165 forks source link

[FEATURE]: Improve Role Variable Naming for Enhanced Clarity and Scalability #711

Open rht-jbittner opened 3 months ago

rht-jbittner commented 3 months ago

Current Situation

In several roles within the dellemc-openmanage-ansible-modules project (e.g., idrac_attributes role), variable names lack specificity.

For instance, the variable for the iDRAC password is simply named password. This can lead to ambiguity and conflicts when working with larger inventories that include multiple roles, collections, and hosts.

Proposed Improvement

  1. Prefix Role Variables: Add a role-specific prefix (e.g., "idrac_") to all variables within a role. This immediately clarifies the context and purpose of each variable.
  2. Example Modification
    dellemc.openmanage.idrac_attributes:
    idrac_ip: "{{ idrac_hostname }}"  
    idrac_user: "{{ idrac_username }}"
    idrac_password: "{{ idrac_password }}"
    idrac_port: "{{ idrac_https_port }}" 
    idrac_ca_path: "{{ idrac_ca_path | default(omit) }}"
    idrac_validate_certs: "{{ idrac_validate_certs }}"
    idrac_attributes: "{{ idrac_attributes | default(omit) }}"
    # ... (rest of the variables similarly prefixed)