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

{%- from "linux/map.jinja" import storage with context %} {%- from "linux/map.jinja" import storage with context %}
{%- if storage.enabled %} {%- 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() %} {%- for name, mount in storage.mount.iteritems() %}


{%- if mount.enabled %} {%- if mount.enabled %}
- require_in: - require_in:
- mount: {{ mount.path }} - mount: {{ mount.path }}
{%- if mount.file_system == 'xfs' %} {%- if mount.file_system == 'xfs' %}
{%- set install_xfs = True %}
- require: - require:
- pkg: xfs_packages - pkg: xfs_packages
{%- endif %} {%- endif %}


{%- endfor %} {%- endfor %}


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

{%- endif %} {%- endif %}

Loading…
Cancel
Save