mariadb-root secret
This commit is contained in:
parent
a11d259e0d
commit
c98223fa27
|
@ -2,10 +2,13 @@ coe_host: "https://127.0.0.1:8443"
|
|||
kube_context: "kubernetes-admin@kubernetes"
|
||||
config_file: "~/.kube/config"
|
||||
action: provision
|
||||
|
||||
service_name: mariadb
|
||||
namespace: openstack
|
||||
|
||||
hiera_data: {}
|
||||
hiera_data_file: ''
|
||||
|
||||
mariadb_config:
|
||||
host: '{{service_name}}'
|
||||
root_password: weakpassword
|
||||
|
|
|
@ -134,4 +134,44 @@
|
|||
tags:
|
||||
- statefulset
|
||||
|
||||
- set_fact:
|
||||
my_cnf: |
|
||||
[mysql]
|
||||
user=root
|
||||
host={{mariadb_config.host}}
|
||||
password='{{mariadb_config.root_password}}'
|
||||
|
||||
[client]
|
||||
user=root
|
||||
host={{mariadb_config.host}}
|
||||
password='{{mariadb_config.root_password}}'
|
||||
|
||||
[mysqldump]
|
||||
user=root
|
||||
host={{mariadb_config.host}}
|
||||
password='{{mariadb_config.root_password}}'
|
||||
|
||||
[mysqladmin]
|
||||
user=root
|
||||
host={{mariadb_config.host}}
|
||||
password='{{mariadb_config.root_password}}'
|
||||
|
||||
[mysqlcheck]
|
||||
user=root
|
||||
host={{mariadb_config.host}}
|
||||
password='{{mariadb_config.root_password}}'
|
||||
|
||||
- name: Create mariadb root secret
|
||||
k8s_v1_secret:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: mariadb-root
|
||||
namespace: "{{namespace}}"
|
||||
state: present
|
||||
data:
|
||||
my.cnf: |
|
||||
{{my_cnf | b64encode}}
|
||||
|
||||
|
||||
- debug: var=create_deployment
|
||||
|
|
Loading…
Reference in New Issue