Merge pull request #75 from salt-formulas/pr_proxy_advance2

Add system.env, system.profile, system.proxy and configure proxy for repo
diff --git a/linux/meta/heka.yml b/linux/meta/heka.yml
index d3abda2..d45504d 100644
--- a/linux/meta/heka.yml
+++ b/linux/meta/heka.yml
@@ -17,7 +17,7 @@
         function: avg
     linux_system_cpu_warning:
       description: 'The CPU wait times are high.'
-      severity: critical
+      severity: warning
       rules:
       - metric: cpu_wait
         relational_operator: '>='
diff --git a/linux/network/interface.sls b/linux/network/interface.sls
index a72f472..ad695ae 100644
--- a/linux/network/interface.sls
+++ b/linux/network/interface.sls
@@ -77,11 +77,15 @@
 linux_interfaces_include_{{ interface_name }}:
   file.prepend:
   - name: /etc/network/interfaces
-  - text: 'source /etc/network/interfaces.d/*'
+  - text: |
+      source /etc/network/interfaces.d/*
+      # Workaround for Upstream-Bug: https://github.com/saltstack/salt/issues/40262
+      source /etc/network/interfaces.u/*
 
 ovs_port_{{ interface_name }}:
   file.managed:
-  - name: /etc/network/interfaces.d/ifcfg-{{ interface_name }}
+  - name: /etc/network/interfaces.u/ifcfg-{{ interface_name }}
+  - makedirs: True
   - source: salt://linux/files/ovs_port
   - defaults:
       port: {{ interface|yaml }}
@@ -272,7 +276,10 @@
 linux_interfaces_final_include:
   file.prepend:
   - name: /etc/network/interfaces
-  - text: 'source /etc/network/interfaces.d/*'
+  - text: |
+      source /etc/network/interfaces.d/*
+      # Workaround for Upstream-Bug: https://github.com/saltstack/salt/issues/40262
+      source /etc/network/interfaces.u/*
 
 {%- endif %}
 
diff --git a/linux/storage/lvm.sls b/linux/storage/lvm.sls
index 76191d1..9c99956 100644
--- a/linux/storage/lvm.sls
+++ b/linux/storage/lvm.sls
@@ -38,7 +38,7 @@
     - require_in:
       - mount: {{ volume.mount.path }}
     {%- if not volume.mount.get('file_system', None) in ['nfs', 'nfs4', 'cifs', 'tmpfs', None] %}
-      - mkfs_{{ volume.mount.device}}:
+      - cmd: mkfs_{{ volume.mount.device}}
     {%- endif %}
     {%- endif %}
 
diff --git a/linux/system/repo.sls b/linux/system/repo.sls
index fe3f246..5a4dce7 100644
--- a/linux/system/repo.sls
+++ b/linux/system/repo.sls
@@ -97,6 +97,9 @@
   {%- if repo.key_url is defined %}
   - key_url: {{ repo.key_url }}
   {%- endif %}
+  - consolidate: {{ repo.get('consolidate', False) }}
+  - clean_file: {{ repo.get('clean_file', False) }}
+  - refresh_db: {{ repo.get('refresh_db', True) }}
   - require:
     - pkg: linux_packages
   {%- if repo.get('proxy', {}).get('enabled', False) %}
diff --git a/tests/pillar/storage.sls b/tests/pillar/storage.sls
index af63dbe..17f3b9c 100644
--- a/tests/pillar/storage.sls
+++ b/tests/pillar/storage.sls
@@ -36,7 +36,20 @@
           lv01:
             size: 5M
             mount:
-              path: /mnt
+              device: /dev/vg0/lv01
+              path: /mnt/lv01
+          lv02:
+            size: 5M
+            mount:
+              device: /dev/vg0/lv02
+              path: /mnt/lv02
+              file_system: ext4
+          lv03:
+            size: 5M
+            mount:
+              device: /dev/vg0/lv03
+              path: /mnt/lv03
+              file_system: xfs
     disk1:
       enabled: true
       device: /dev/loop_dev4