Browse Source

probe partitions after creating them

Change-Id: I06994fec6f4771317f540d3e4339ff4460a5a493
pull/122/head
Tomáš Kukrál 7 years ago
parent
commit
0b7a6bf8ba
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      linux/storage/disk.sls

+ 12
- 6
linux/storage/disk.sls View File

@@ -36,9 +36,18 @@ create_partition_{{ disk_name }}_{{ loop.index }}:
- module: create_disk_label_{{ disk_name }}
- pkg: xfsprogs

{%- if partition.get('mkfs') %}
{% set end_size = end_size + partition.size -%}

{%- endfor %}

{%- if partition.type == "xfs" %}
probe_partions_{{ disk_name }}:
module.run:
- name: partition.probe
- device: {{ disk_name }}

{%- for partition in disk.get('partitions', []) %}

{%- if partition.get('mkfs') and partition.type == "xfs" %}

mkfs_partition_{{ disk_name }}_{{ loop.index }}:
module.run:
@@ -50,11 +59,8 @@ mkfs_partition_{{ disk_name }}_{{ loop.index }}:

{%- endif %}

{%- endif %}

{% set end_size = end_size + partition.size -%}

{%- endfor %}

{%- endfor %}

{%- endif %}

Loading…
Cancel
Save