|
12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- {% from "salt/map.jinja" import control with context %}
- {%- for provider_name, provider in control.provider.iteritems() %}
-
- {{ provider_name }}:
- provider: {{ provider.engine }}
- {%- if provider.insecure is defined %}
- insecure: true
- {%- endif %}
- {%- if provider.engine == 'openstack' %}
- identity_url: '{{ provider.identity_url }}'
- {%- if provider.compute_name is defined %}
- compute_name: {{ provider.get('compute_name', 'nova') }}
- {%- endif %}
- protocol: ipv4
- compute_region: {{ provider.region }}
- tenant: {{ provider.tenant }}
- user: {{ provider.user }}
- {%- if provider.api_key is defined %}
- apikey: {{ provider.api_key }}
- {%- elif provider.password is defined %}
- password: {{ provider.password }}
- {%- endif %}
- ssh_key_name: salt-cloud
- ssh_key_file: /root/.ssh/id_rsa
- ssh_interface: {{ provider.get('interface', 'private') }}_ips
- networks:
- - fixed:
- {%- for net in provider.fixed_networks %}
- - {{ net }}
- {%- endfor %}
- - floating:
- {%- for net in provider.floating_networks %}
- - {{ net }}
- {%- endfor %}
- {%- if provider.ignore_cidr is defined %}
- ignore_cidr: {{ provider.ignore_cidr }}
- {%- endif %}
- {%- elif provider.engine == 'digital_ocean' %}
- {#- location: {{ provider.region }} #}
- personal_access_token: {{ provider.api_key }}
- {%- endif %}
-
- {%- endfor %}
|