mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2024-11-28 05:07:54 +01:00
5a6302e021
It doesn't seem to be available from pip anymore, and may not be a real dependency. Salt-cloud certainly seems to work fine without it.
75 lines
1.8 KiB
Plaintext
75 lines
1.8 KiB
Plaintext
{% from "salt/package-map.jinja" import pkgs with context %}
|
|
{% set salt = pillar.get('salt', {}) -%}
|
|
{% set cloud = salt.get('cloud', {}) -%}
|
|
|
|
python-pip:
|
|
pkg.installed
|
|
|
|
pycrypto:
|
|
pip.installed:
|
|
- require:
|
|
- pkg: python-pip
|
|
|
|
apache-libcloud:
|
|
pip.installed:
|
|
- require:
|
|
- pkg: python-pip
|
|
|
|
salt-cloud:
|
|
pkg.installed:
|
|
- name: {{ pkgs['salt-cloud'] }}
|
|
- require:
|
|
- pip: apache-libcloud
|
|
- pip: pycrypto
|
|
|
|
{% for folder in cloud['folders'] %}
|
|
{{ folder }}:
|
|
file.directory:
|
|
- name: /etc/salt/{{ folder }}
|
|
- user: root
|
|
- group: root
|
|
- file_mode: 744
|
|
- dir_mode: 755
|
|
- makedirs: True
|
|
{% endfor %}
|
|
|
|
{% for cert in pillar.get('salt_cloud_certs', {}) %}
|
|
{% for type in ['pem'] %}
|
|
cloud-cert-{{ cert }}-pem:
|
|
file.managed:
|
|
- name: /etc/salt/cloud.providers.d/key/{{ cert }}.pem
|
|
- source: salt://salt/files/key
|
|
- template: jinja
|
|
- user: root
|
|
- group: root
|
|
- mode: 600
|
|
- defaults:
|
|
key: {{ cert }}
|
|
type: {{ type }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
{% for providers in cloud['providers'] %}
|
|
salt-cloud-profiles-{{ providers }}:
|
|
file.managed:
|
|
- name: /etc/salt/cloud.profiles.d/{{ providers }}.conf
|
|
- template: jinja
|
|
- source: salt://salt/files/cloud.profiles.d/{{ providers }}.conf
|
|
{% endfor %}
|
|
|
|
{% for providers in cloud['providers'] %}
|
|
salt-cloud-providers-{{ providers }}:
|
|
file.managed:
|
|
- name: /etc/salt/cloud.providers.d/{{ providers }}.conf
|
|
- template: jinja
|
|
- source: salt://salt/files/cloud.providers.d/{{ providers }}.conf
|
|
{% endfor %}
|
|
|
|
{% for providers in cloud['providers'] %}
|
|
salt-cloud-maps-{{ providers }}:
|
|
file.managed:
|
|
- name: /etc/salt/cloud.maps.d/{{ providers }}.conf
|
|
- template: jinja
|
|
- source: salt://salt/files/cloud.maps.d/{{ providers }}.conf
|
|
{% endfor %}
|