-
-
Save jahkeup/784b412d5530900b9148 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set openstack = pillar['openstack'] %} | |
service-tenant: | |
keystone.service_present: | |
- name: {{openstack['auth']['service']}} | |
- description: Service Tenant | |
{% for service in ['nova','quantum','cinder','glance','swift'] %} | |
{% set setup = pillar['openstack'][service]['service'] -%} | |
{% set tenant = salt['keystone.tenant_get'](openstack['auth']['service']) %} | |
{% if not tenant.get('Error') %} | |
{{service}}-service-user: | |
keystone.user_present: | |
- name: {{setup['username']}} | |
- password: {{setup['password']}} | |
- tenant_id: {{salt['keystone.tenant_get'](openstack['auth']['service'])['id']}} | |
- require: | |
- keystone.service_present: service-tenant | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment