openstack-ansible-os_congress/tasks/congress_post_install.yml

45 lines
1.4 KiB
YAML

---
# Copyright 2017, taseer94@gmail.com
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: creating congress database
mysql_db:
name: "{{ congress_db_name }}"
state: present
login_host: "{{ congress_db_login_host }}"
login_user: "{{ congress_db_login_user }}"
login_password: "{{ congress_db_login_password }}"
- name: create congress user access
mysql_user:
name: "{{ congress_db_user }}"
password: "{{ congress_db_user_password }}"
login_host: "{{ congress_db_login_host }}"
login_user: "{{ congress_db_login_user }}"
login_password: "{{ congress_db_login_password }}"
priv: congress.*:ALL
host: "{{ item }}"
with_items:
- "%"
- "localhost"
- name: create congress database schema
shell: >
/usr/bin/congress-db-manage --config /etc/congress/congress.conf upgrade head
- name: install congress client
pip:
name: python-congressclient