Clean keystone resources
This commit is contained in:
parent
4957dd9d30
commit
ecfd4d103c
@ -69,13 +69,13 @@ def deploy():
|
||||
|
||||
# KEYSTONE
|
||||
keystone_puppet = vr.create('keystone_puppet', 'resources/keystone_puppet', {})[0]
|
||||
keystone_db = vr.create('keystone_db', 'resources/mariadb_keystone_db/', {
|
||||
keystone_db = vr.create('keystone_db', 'resources/mariadb_db/', {
|
||||
'db_name': 'keystone_db',
|
||||
'login_user': 'root'
|
||||
})[0]
|
||||
keystone_db_user = vr.create('keystone_db_user', 'resources/mariadb_keystone_user/', {
|
||||
'new_user_name': 'keystone',
|
||||
'new_user_password': 'keystone',
|
||||
keystone_db_user = vr.create('keystone_db_user', 'resources/mariadb_user/', {
|
||||
'user_name': 'keystone',
|
||||
'user_password': 'keystone',
|
||||
})[0]
|
||||
keystone_service_endpoint = vr.create('keystone_service_endpoint', 'resources/keystone_service_endpoint', {
|
||||
'endpoint_name': 'keystone',
|
||||
@ -107,12 +107,14 @@ def deploy():
|
||||
'port': 'login_port',
|
||||
'root_user': 'login_user',
|
||||
'root_password': 'login_password',
|
||||
'ip' : 'db_host',
|
||||
})
|
||||
signals.connect(keystone_db, keystone_db_user, {
|
||||
'db_name',
|
||||
'login_port',
|
||||
'login_user',
|
||||
'login_password'
|
||||
'login_password',
|
||||
'db_host'
|
||||
})
|
||||
|
||||
signals.connect(node1, keystone_service_endpoint)
|
||||
@ -141,8 +143,9 @@ def deploy():
|
||||
'db_name',
|
||||
})
|
||||
signals.connect(keystone_db_user, keystone_puppet, {
|
||||
'new_user_name': 'db_user',
|
||||
'new_user_password': 'db_password'
|
||||
'user_name': 'db_user',
|
||||
'user_password': 'db_password',
|
||||
'db_host' : 'db_host'
|
||||
})
|
||||
|
||||
# OPENRC
|
||||
|
@ -8,16 +8,16 @@ input:
|
||||
value: admin_token
|
||||
db_user:
|
||||
schema: str!
|
||||
value: keystone
|
||||
value:
|
||||
db_password:
|
||||
schema: str!
|
||||
value: keystone
|
||||
value:
|
||||
db_name:
|
||||
schema: str!
|
||||
value: keystone
|
||||
value:
|
||||
db_host:
|
||||
schema: str!
|
||||
value: keystone
|
||||
value:
|
||||
|
||||
admin_port:
|
||||
schema: int!
|
||||
|
@ -8,4 +8,4 @@
|
||||
login_user: root
|
||||
login_password: {{login_password}}
|
||||
login_port: {{login_port}}
|
||||
login_host: 127.0.0.1
|
||||
login_host: {{db_host}}
|
||||
|
@ -8,4 +8,4 @@
|
||||
login_user: root
|
||||
login_password: {{ login_password }}
|
||||
login_port: {{ login_port }}
|
||||
login_host: 127.0.0.1
|
||||
login_host: {{db_host}}
|
||||
|
@ -8,6 +8,9 @@ input:
|
||||
db_name:
|
||||
schema: str!
|
||||
value:
|
||||
db_host:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
login_user:
|
||||
schema: str!
|
||||
|
@ -1,11 +0,0 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- name: mariadb db
|
||||
mysql_db:
|
||||
name: {{db_name}}
|
||||
state: absent
|
||||
login_user: root
|
||||
login_password: {{login_password}}
|
||||
login_port: {{login_port}}
|
||||
login_host: 127.0.0.1
|
@ -1,13 +0,0 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- name: mariadb db
|
||||
mysql_db:
|
||||
name: {{ db_name }}
|
||||
#collation: utf8_encode_ci
|
||||
encoding: utf8
|
||||
state: present
|
||||
login_user: root
|
||||
login_password: {{ login_password }}
|
||||
login_port: {{ login_port }}
|
||||
login_host: 127.0.0.1
|
@ -1,30 +0,0 @@
|
||||
id: mariadb_keystone_db
|
||||
handler: ansible
|
||||
version: 1.0.0
|
||||
actions:
|
||||
run: run.yml
|
||||
remove: remove.yml
|
||||
input:
|
||||
db_name:
|
||||
schema: str!
|
||||
value: keystone_db
|
||||
login_user:
|
||||
schema: str!
|
||||
value: root
|
||||
login_password:
|
||||
schema: str!
|
||||
value:
|
||||
login_port:
|
||||
schema: int!
|
||||
value:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
tags: [resource/mariadb_keystone_db, resources/mariadb]
|
@ -1,11 +0,0 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- name: mariadb user
|
||||
mysql_user:
|
||||
name: {{new_user_name}}
|
||||
state: absent
|
||||
login_user: root
|
||||
login_password: {{login_password}}
|
||||
login_port: {{login_port}}
|
||||
login_host: 127.0.0.1
|
@ -1,14 +0,0 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- name: mariadb user
|
||||
mysql_user:
|
||||
name: {{ new_user_name }}
|
||||
password: {{ new_user_password }}
|
||||
priv: {{ db_name }}.*:ALL
|
||||
host: '%'
|
||||
state: present
|
||||
login_user: root
|
||||
login_password: {{ login_password }}
|
||||
login_port: {{ login_port }}
|
||||
login_host: 127.0.0.1
|
@ -1,37 +0,0 @@
|
||||
id: mariadb_keystone_user
|
||||
handler: ansible
|
||||
version: 1.0.0
|
||||
actions:
|
||||
run: run.yml
|
||||
remove: remove.yml
|
||||
input:
|
||||
new_user_password:
|
||||
schema: str!
|
||||
value: keystone
|
||||
new_user_name:
|
||||
schema: str!
|
||||
value: keystone
|
||||
db_name:
|
||||
schema: str!
|
||||
value:
|
||||
login_password:
|
||||
schema: str!
|
||||
value:
|
||||
login_port:
|
||||
schema: int!
|
||||
value:
|
||||
login_user:
|
||||
schema: str!
|
||||
value:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
tags: [resource/mariadb_keystone_user, resources/mariadb]
|
||||
|
@ -8,4 +8,4 @@
|
||||
login_user: root
|
||||
login_password: {{login_password}}
|
||||
login_port: {{login_port}}
|
||||
login_host: 127.0.0.1
|
||||
login_host: {{db_host}}
|
||||
|
@ -11,4 +11,4 @@
|
||||
login_user: root
|
||||
login_password: {{ login_password }}
|
||||
login_port: {{ login_port }}
|
||||
login_host: 127.0.0.1
|
||||
login_host: {{db_host}}
|
||||
|
@ -15,6 +15,9 @@ input:
|
||||
db_name:
|
||||
schema: str!
|
||||
value:
|
||||
db_host:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
login_password:
|
||||
schema: str!
|
||||
|
@ -25,6 +25,7 @@ resources:
|
||||
login_password: 'mariadb_service::root_password'
|
||||
login_port: 'mariadb_service::port'
|
||||
db_name: 'keystone'
|
||||
db_host: 'mariadb_service::ip'
|
||||
user_password: 'keystone'
|
||||
user_name: 'keystone'
|
||||
ip: '{{ip}}'
|
||||
|
@ -4,7 +4,8 @@ resources:
|
||||
- id: keystone_db
|
||||
from: resources/mariadb_db
|
||||
values:
|
||||
db_name: {{db_name}}
|
||||
db_name: '{{db_name}}'
|
||||
db_host: '{{db_host}}'
|
||||
login_user: '{{login_user}}'
|
||||
login_password: '{{login_password}}'
|
||||
login_port: '{{login_port}}'
|
||||
@ -18,6 +19,7 @@ resources:
|
||||
user_password: '{{user_password}}'
|
||||
user_name: '{{user_name}}'
|
||||
db_name: 'keystone_db::db_name'
|
||||
db_host: '{{db_host}}'
|
||||
login_user: 'keystone_db::login_user'
|
||||
login_password: 'keystone_db::login_password'
|
||||
login_port: 'keystone_db::login_port'
|
||||
|
Loading…
Reference in New Issue
Block a user