Parcourir la source

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

pull/203/head
pavel-z1 il y a 5 ans
Parent
révision
2496913837
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. +5
    -1
      linux/storage/mount.sls

+ 5
- 1
linux/storage/mount.sls Voir le fichier

@@ -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 %}


Chargement…
Annuler
Enregistrer