fixed database credentials

This commit is contained in:
Radu Ioan Fericean
2014-02-20 23:12:53 +02:00
parent a3daecdbc9
commit 164b9f8945
3 changed files with 10 additions and 8 deletions

View File

@@ -15,10 +15,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :public_network
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
# config.vm.box_url = "http://domain.com/path/to/above.box"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.

View File

@@ -4,7 +4,7 @@
user: vagrant
sudo: yes
vars:
$root_db_password: CGRateS.org
root_db_password: CGRateS.org
tasks:
- name: install dependency
@@ -42,11 +42,14 @@
- name: install freeswitch
apt: pkg=cgrates update_cache=yes state=latest
- name: update mysql root password for all root accounts
mysql_user: login_user=root login_password=$root_db_password name=root host=localhost password=$root_db_password
- name: update mysql root password for root account
mysql_user: name=root host=localhost password={{ root_db_password }}
- name: copy .my.cnf
template: src=my.cnf dest=/root/.my.cnf mode=0600
- name: setup database tables
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root $root_db_password localhost
shell: chdir=/usr/share/cgrates/storage/mysql ./setup_cgr_db.sh root {{ root_db_password }} localhost
- hosts: all
user: vagrant

3
data/vagrant/my.cnf Normal file
View File

@@ -0,0 +1,3 @@
[client]
user=root
password={{ root_db_password }}