From dce9bea40b77e8bdd6183f26fe19e2ccfef5462a Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Mon, 10 Apr 2017 09:54:56 +0200 Subject: [PATCH] Compact salt-cloud pip.installed instructions --- salt/cloud.sls | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/salt/cloud.sls b/salt/cloud.sls index bf66959..3db9685 100644 --- a/salt/cloud.sls +++ b/salt/cloud.sls @@ -8,20 +8,14 @@ python-pip: pkg.installed -pycrypto: - pip.installed: - - require: - - pkg: python-pip - -{% if grains['os_family'] not in ['Debian', 'RedHat'] %} -crypto: - pip.installed: - - require: - - pkg: python-pip -{% endif %} - -apache-libcloud: +salt-cloud-pip-packages: pip.installed: + - pkgs: + - apache-libcloud + {%- if grains['os_family'] not in ['Debian', 'RedHat'] %} + - crypto + {%- endif %} + - pycrypto - require: - pkg: python-pip {%- endif %} @@ -32,11 +26,7 @@ salt-cloud: - name: {{ salt_settings.salt_cloud }} {%- if salt_settings.use_pip %} - require: - - pip: apache-libcloud - - pip: pycrypto - {% if grains['os_family'] not in ['Debian', 'RedHat'] %} - - pip: crypto - {% endif %} + - pip: salt-cloud-pip-packages {%- endif %} {% endif %}