Merge pull request #6 from tcpcloud/multipath
Refactored multipath support
diff --git a/linux/map.jinja b/linux/map.jinja
index 1945a40..cdc6123 100644
--- a/linux/map.jinja
+++ b/linux/map.jinja
@@ -15,7 +15,7 @@
'doc_validity_pkgs': ['python-yaml'],
},
'Debian': {
- 'pkgs': ['python-apt','vim'],
+ 'pkgs': ['python-apt','vim-nox', 'apt-transport-https'],
'utc': true,
'user': {},
'group': {},
diff --git a/linux/system/certificate.sls b/linux/system/certificate.sls
index a342cbe..f9f39d4 100644
--- a/linux/system/certificate.sls
+++ b/linux/system/certificate.sls
@@ -3,19 +3,39 @@
{%- if system.ca_certificates is defined %}
-{%- for certificate in system.ca_certificates %}
+linux_system_ca_certificates:
+ pkg.installed:
+ - name: ca-certificates
+{%- if system.ca_certificates is mapping %}
+{%- for name, cert in system.ca_certificates.iteritems() %}
+{{ system.ca_certs_dir }}/{{ name }}.crt:
+ file.managed:
+ - contents_pillar: "linux:system:ca_certificates:{{ name }}"
+ - watch_in:
+ - cmd: update_certificates
+ - require:
+ - pkg: linux_system_ca_certificates
+{%- endfor %}
+
+{%- else %}
+{#- salt-pki way #}
+
+{%- for certificate in system.ca_certificates %}
{{ system.ca_certs_dir }}/{{ certificate }}.crt:
file.managed:
- source: salt://pki/{{ certificate }}/{{ certificate }}-chain.cert.pem
- watch_in:
- cmd: update_certificates
-
+ - require:
+ - pkg: linux_system_ca_certificates
{%- endfor %}
+{%- endif %}
+
update_certificates:
cmd.wait:
- - name: /usr/sbin/update-ca-certificates
+ - name: update-ca-certificates
{%- endif %}
diff --git a/linux/system/repo.sls b/linux/system/repo.sls
index 08b4abc..04e7070 100644
--- a/linux/system/repo.sls
+++ b/linux/system/repo.sls
@@ -29,7 +29,7 @@
{%- do default_repos.update({name: repo}) %}
-{%- if repo.key_url %}
+{%- if repo.key_url|default(False) %}
linux_repo_{{ name }}_key:
cmd.wait: