Pārlūkot izejas kodu

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

pull/203/head
pavel-z1 pirms 5 gadiem
vecāks
revīzija
2496913837
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. +5
    -1
      linux/storage/mount.sls

+ 5
- 1
linux/storage/mount.sls Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt