|
|
|
|
|
|
|
|
{% from "salt/map.jinja" import salt_settings with context %} |
|
|
{% from "salt/map.jinja" import salt_settings with context %} |
|
|
|
|
|
|
|
|
|
|
|
{% set cloudmaps = salt['pillar.get']('salt:cloud:maps', {}) -%} |
|
|
|
|
|
{% set cloudprofiles = salt['pillar.get']('salt:cloud:profiles', {}) -%} |
|
|
|
|
|
{% set cloudproviders = salt['pillar.get']('salt:cloud:providers', {}) -%} |
|
|
|
|
|
|
|
|
python-pip: |
|
|
python-pip: |
|
|
pkg.installed |
|
|
pkg.installed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- makedirs: True |
|
|
- makedirs: True |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{% for key, value in cloudmaps.items() %} |
|
|
|
|
|
/etc/salt/cloud.maps.d/{{ key }}: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- contents: | |
|
|
|
|
|
{{ value|yaml(False) | indent(8) }} |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{% for key, value in cloudprofiles.items() %} |
|
|
|
|
|
/etc/salt/cloud.profiles.d/{{ key }}: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- contents: | |
|
|
|
|
|
{{ value|yaml(False) | indent(8) }} |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{% for key, value in cloudproviders.items() %} |
|
|
|
|
|
/etc/salt/cloud.providers.d/{{ key }}: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- contents: | |
|
|
|
|
|
{{ value|yaml(False) | indent(8) }} |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
salt-cloud-providers-permissions: |
|
|
salt-cloud-providers-permissions: |
|
|
file.directory: |
|
|
file.directory: |
|
|
- name: {{ salt_settings.config_path }}/cloud.providers.d |
|
|
- name: {{ salt_settings.config_path }}/cloud.providers.d |