소스 검색

By default don't install cloud dependencies using pip

The salt-cloud packages automatically pull in the pycrypto and libcloud
dependencies for RedHat and Debian (at least when using the SaltStack
repos), so it doesn't really make sense to install these dependencies
using pip. By default we no longer use pip, but the old behaviour can be
restored by setting 'salt:use_pip' to True in the pillar.

There could probably be a case made for removing the pip stuff
altogether, but we will leave it in for the time being to preserve some
backwards compatibility.
master
John Kristensen 8 년 전
부모
커밋
37f82242e7
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. +4
    -0
      salt/cloud.sls
  2. +1
    -0
      salt/defaults.yaml

+ 4
- 0
salt/cloud.sls 파일 보기

@@ -4,6 +4,7 @@
{% set cloudprofiles = salt['pillar.get']('salt:cloud:profiles', {}) -%}
{% set cloudproviders = salt['pillar.get']('salt:cloud:providers', {}) -%}

{%- if salt_settings.use_pip %}
python-pip:
pkg.installed

@@ -23,17 +24,20 @@ apache-libcloud:
pip.installed:
- require:
- pkg: python-pip
{%- endif %}

{% if salt_settings.install_packages %}
salt-cloud:
pkg.installed:
- 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 %}
{%- endif %}
{% endif %}

{% for cert in pillar.get('salt_cloud_certs', {}) %}

+ 1
- 0
salt/defaults.yaml 파일 보기

@@ -2,6 +2,7 @@
# vim: ft=yaml
salt:
install_packages: True
use_pip: False
clean_config_d_dir: True

config_path: /etc/salt

Loading…
취소
저장