Skip to content

Commit

Permalink
Initial Release Version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
psabhyan committed Dec 13, 2017
1 parent 08e36b7 commit 10b9ce8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
- name: add mariadb repository
template:
src: MariaDB.repo
dest: /etc/yum.repos.d/MariaDB.repo
- name: install mariadb
yum:
pkg: "{{item}}"
state: present
update_cache: yes
with_items:
- MariaDB-server
- MariaDB-client
- MySQL-python
- mariadb-devel
- name: start mariadb
service: name=mysql enabled=yes state=started
- name: add maria database users
mysql_user:
name: "{{project_name}}"
password: "{{project_name}}"
host: localhost
priv: "*.*:ALL"
state: present

- name: create project_name database
mysql_db:
name: "{{item}}"
state: present
with_items: "{{databases}}"
7 changes: 7 additions & 0 deletions templates/MariaDB.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MariaDB 10.0 CentOS repository list - created 2016-02-05 20:56 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

0 comments on commit 10b9ce8

Please sign in to comment.