diff --git a/data/vagrant/Vagrantfile b/data/vagrant/Vagrantfile index 6dca8cb35..73bc0bff8 100644 --- a/data/vagrant/Vagrantfile +++ b/data/vagrant/Vagrantfile @@ -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. diff --git a/data/vagrant/ansible_golang_release.yml b/data/vagrant/ansible_golang_release.yml index bada28d4e..a265d6352 100644 --- a/data/vagrant/ansible_golang_release.yml +++ b/data/vagrant/ansible_golang_release.yml @@ -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 diff --git a/data/vagrant/my.cnf b/data/vagrant/my.cnf new file mode 100644 index 000000000..f86974c39 --- /dev/null +++ b/data/vagrant/my.cnf @@ -0,0 +1,3 @@ +[client] +user=root +password={{ root_db_password }}