Browse Source

Fix installation of xfsprogs

tags/2016.12
Filip Pytloun 9 years ago
parent
commit
6f9326c625
1 changed files with 7 additions and 15 deletions
  1. +7
    -15
      linux/storage/mount.sls

+ 7
- 15
linux/storage/mount.sls View File

@@ -1,21 +1,6 @@
{%- from "linux/map.jinja" import storage with context %}
{%- if storage.enabled %}

{%- set install_xfs = False %}

{%- for name, mount in storage.mount.iteritems() %}
{%- if mount.enabled and mount.file_system == 'xfs' %}
{%- set install_xfs = True %}
{%- endif %}
{%- endfor %}

{%- if install_xfs == True %}
xfs_packages:
package.installed:
- name: xfsprogs
{%- endif %}


{%- for name, mount in storage.mount.iteritems() %}

{%- if mount.enabled %}
@@ -29,6 +14,7 @@ mkfs_{{ mount.device}}:
- require_in:
- mount: {{ mount.path }}
{%- if mount.file_system == 'xfs' %}
{%- set install_xfs = True %}
- require:
- pkg: xfs_packages
{%- endif %}
@@ -61,4 +47,10 @@ mkfs_{{ mount.device}}:

{%- endfor %}

{%- if install_xfs is defined %}
xfs_packages:
pkg.installed:
- name: xfsprogs
{%- endif %}

{%- endif %}

Loading…
Cancel
Save