Bladeren bron

Add option make_fs that will allow to manage making file system for the new mounted device

pull/203/head
pavel-z1 5 jaren geleden
bovenliggende
commit
2496913837
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. +5
    -1
      linux/storage/mount.sls

+ 5
- 1
linux/storage/mount.sls Bestand weergeven

@@ -7,6 +7,7 @@

{%- if not mount.file_system in ['nfs', 'nfs4', 'cifs', 'tmpfs'] %}

{%- if mount.make_fs is defined and mount.make_fs %}
mkfs_{{ mount.device}}:
cmd.run:
- name: "mkfs.{{ mount.file_system }} -L {{ name }} {{ mount.device }}"
@@ -16,11 +17,14 @@ mkfs_{{ mount.device}}:
{%- if mount.file_system == 'xfs' %}
- require:
- pkg: xfs_packages_{{ mount.device }}
{%- endif %}
{%- endif %}

{%- if mount.file_system == 'xfs' %}
xfs_packages_{{ mount.device }}:
pkg.installed:
- name: xfsprogs
{%- endif %}
{% endif %}

{%- endif %}


Laden…
Annuleren
Opslaan