Glance: more configs, keystone_user fix
This commit is contained in:
parent
6176cf0e17
commit
5ced9d62b4
@ -23,6 +23,7 @@
|
||||
- file: path={{ config_dir.value['src'] }}/glance-scrubber.conf state=touch
|
||||
- file: path={{ config_dir.value['src'] }}/policy.json state=touch
|
||||
- file: path={{ config_dir.value['src'] }}/schema-image.json state=touch
|
||||
- file: path={{ config_dir.value['src'] }}/exports state=touch
|
||||
- template: src={{ resource_dir }}/templates/glance-api.conf dest={{ config_dir.value['src'] }}/glance-api.conf
|
||||
- template: src={{ resource_dir }}/templates/glance-api-paste.ini dest={{ config_dir.value['src'] }}/glance-api-paste.ini
|
||||
- template: src={{ resource_dir }}/templates/glance-cache.conf dest={{ config_dir.value['src'] }}/glance-cache.conf
|
||||
@ -31,3 +32,4 @@
|
||||
- template: src={{ resource_dir }}/templates/glance-scrubber.conf dest={{ config_dir.value['src'] }}/glance-scrubber.conf
|
||||
- template: src={{ resource_dir }}/templates/policy.json dest={{ config_dir.value['src'] }}/policy.json
|
||||
- template: src={{ resource_dir }}/templates/schema-image.json dest={{ config_dir.value['src'] }}/schema-image.json
|
||||
- template: src={{ resource_dir }}/templates/exports dest={{ config_dir.value['src'] }}/glance-export
|
||||
|
4
resources/glance_config/templates/exports
Normal file
4
resources/glance_config/templates/exports
Normal file
@ -0,0 +1,4 @@
|
||||
export OS_TENANT_NAME={{ keystone_admin_tenant }}
|
||||
export OS_USERNAME={{ keystone_admin_user }}
|
||||
export OS_PASSWORD={{ keystone_admin_password }}
|
||||
export OS_AUTH_URL=http://{{ keystone_ip }}:35357/v2.0
|
@ -2,6 +2,8 @@
|
||||
sudo: yes
|
||||
vars:
|
||||
admin_token: {{admin_token}}
|
||||
keystone_host: {{ ip }}
|
||||
keystone_port: {{ port }}
|
||||
db_user: {{db_user}}
|
||||
db_password: {{db_password}}
|
||||
db_host: {{db_host}}
|
||||
@ -12,3 +14,4 @@
|
||||
- template: src={{resource_dir}}/templates/default_catalog.templates dest={{config_dir}}/default_catalog.templates
|
||||
- template: src={{resource_dir}}/templates/logging.conf dest={{config_dir}}/logging.conf
|
||||
- template: src={{resource_dir}}/templates/policy.json dest={{config_dir}}/policy.json
|
||||
- template: src={{resource_dir}}/templates/exports dest={{ config_dir }}/keystone-exports
|
||||
|
2
resources/keystone_config/templates/exports
Normal file
2
resources/keystone_config/templates/exports
Normal file
@ -0,0 +1,2 @@
|
||||
export OS_SERVICE_ENDPOINT=http://localhost:35357/v2.0/
|
||||
export OS_SERVICE_TOKEN={{ admin_token }}
|
@ -1,6 +1,11 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- name: install python-keystoneclient
|
||||
shell: pip install python-keystoneclient
|
||||
- name: keystone tenant
|
||||
keystone_user: endpoint=http://localhost:35357/v2.0/ tenant={{ tenant_name }} token={{ login_token }} state=present
|
||||
- name: keystone user
|
||||
- keystone_user: endpoint=http://{{ keystone_host }}:{{ keystone_port }}/v2.0/ tenant={{ tenant_name }} token={{ login_token }} state=present
|
||||
- keystone_user: endpoint=http://{{ keystone_host }}:{{ keystone_port }}/v2.0/ user={{ user_name }} password={{ user_password }} tenant={{ tenant_name }} token={{ login_token }} state=present
|
||||
keystone_user: endpoint=http://localhost:35357/v2.0/ user={{ user_name }} password={{ user_password }} tenant={{ tenant_name }} token={{ login_token }} state=present
|
||||
- name: keystone role
|
||||
keystone_user: endpoint=http://localhost:35357/v2.0/ role={{ role_name }} user={{ user_name }} tenant={{ tenant_name }} token={{ login_token }} state=present
|
||||
|
@ -5,7 +5,7 @@ input:
|
||||
keystone_host:
|
||||
schema: str!
|
||||
value:
|
||||
keystone_port:
|
||||
keystone_admin_port:
|
||||
schema: int!
|
||||
value:
|
||||
login_user:
|
||||
@ -14,6 +14,9 @@ input:
|
||||
login_token:
|
||||
schema: str!
|
||||
value:
|
||||
role_name:
|
||||
schema: str!
|
||||
value:
|
||||
user_name:
|
||||
schema: str!
|
||||
value:
|
||||
|
@ -10,3 +10,8 @@
|
||||
- {{ port }}:3306
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: {{ root_password }}
|
||||
- shell: docker exec -t {{ name }} mysql -p{{ root_password }} -uroot -e "select 1"
|
||||
register: result
|
||||
until: result.rc == 0
|
||||
retries: 10
|
||||
delay: 0.5
|
||||
|
Loading…
Reference in New Issue
Block a user