From 6322f4d2fe14968a243c825ded4e8c9d251d3eac Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 28 May 2015 16:45:43 +0000 Subject: Configure Mysql user in postgres.yml for now --- openstack/usr/share/openstack/postgres.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/openstack/usr/share/openstack/postgres.yml b/openstack/usr/share/openstack/postgres.yml index 5ff9355e..76888c18 100644 --- a/openstack/usr/share/openstack/postgres.yml +++ b/openstack/usr/share/openstack/postgres.yml @@ -46,3 +46,34 @@ state: started with_items: - postgres-server + +### MARIADB conf + - name: Create postgres user + user: + name: mysql + comment: MySQL Server + shell: /sbin/nologin + home: /var/lib/mysql + + - name: Install database priviledge tables + shell: mysql_install_db --basedir=/usr --datadir=/var/lib/mysql --user=mysql + + - name: Setup mysql server daemon + shell: install -v -m755 -o mysql -g mysql -d /run/mysqld + + - name: Enable and start postgres services + service: + name: "{{ item }}" + enabled: yes + state: started + with_items: + - mariadb + + - name: Create a database user (for the first run only) + mysql_user: + name: "{{ mysqldb_admin_user | default('root') }}" + password: "{{ mysqldb_admin_password | default('toor') }}" + priv: "*.*:ALL" + host: localhost + state: present + ignore_errors: yes -- cgit v1.2.1