Handling Different Hardware Disk Configs

How to handle different disk partitioning and raid across disparate hardware:

# salt/storage/disks.sls
{%- set hardware = grains.get('productname','') %}
{%- set is_virtual = grains.get('virtual','') != 'physical' %}

include:
  {% if hardware == 'ProLiant DL380 Gen9' %}
  - storage.disks.hp
  {% elif hardware == 'PowerEdge R515' %}
  - storage.disks.dell
  {% elif is_virtual %}
  - storage.disks.virtual
  {% endif %}
Posted in on
Tagged with saltstack

Comments