mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
Finished making all Ansible scripts for calls work
This commit is contained in:
committed by
Dan Christian Bogos
parent
6759cb54bb
commit
c8b0016758
@@ -73,4 +73,4 @@
|
||||
- name: set versions
|
||||
command: 'cgr-migrator -exec=*set_versions -config_path=/usr/share/cgrates/conf/samples/tutmysql'
|
||||
environment:
|
||||
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
|
||||
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
|
||||
|
||||
@@ -119,4 +119,4 @@
|
||||
lineinfile:
|
||||
dest: ~/.bashrc
|
||||
line: export PATH=$PATH:$GOPATH/bin
|
||||
insertafter: last
|
||||
insertafter: last
|
||||
|
||||
@@ -92,37 +92,37 @@
|
||||
become: yes
|
||||
shell: "sudo ./configure --with-jansson-bundled"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Make Asterisk
|
||||
become: yes
|
||||
shell: "sudo make"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Make all Asterisk
|
||||
become: yes
|
||||
shell: "make all"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Make install Asterisk
|
||||
become: yes
|
||||
shell: "sudo make install"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Make samples Asterisk
|
||||
become: yes
|
||||
shell: "sudo make samples"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Make config Asterisk
|
||||
become: yes
|
||||
shell: "sudo make config"
|
||||
args:
|
||||
chdir: '/tmp/asterisk-18.4.0'
|
||||
chdir: '/tmp/asterisk-18.5.0'
|
||||
|
||||
- name: Add user for Asterisk
|
||||
become: yes
|
||||
@@ -136,4 +136,4 @@
|
||||
|
||||
# Configure PJSUA
|
||||
- name: Config PJSUA
|
||||
include: pjsua.yaml
|
||||
include: pjsua.yaml
|
||||
|
||||
@@ -32,14 +32,21 @@
|
||||
dest: "/usr/share/cgrates"
|
||||
state: link
|
||||
|
||||
- name: symbol link
|
||||
- name: symbol link 2
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ golang_gopath }}/bin/cgr-engine"
|
||||
dest: "/usr/bin/cgr-engine"
|
||||
state: link
|
||||
# post install
|
||||
- name: post install mysql
|
||||
|
||||
- name: post install for ers mysql
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mysql/setup_ers_db.sh root CGRateS.org localhost'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/mysql/'
|
||||
|
||||
- name: post install mysql
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mysql/setup_cgr_db.sh root CGRateS.org localhost'
|
||||
args:
|
||||
@@ -50,3 +57,20 @@
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/postgres/create_db_with_users.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/postgres/'
|
||||
|
||||
- name: post install for ers postgres
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/postgres/create_ers_db.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/postgres/'
|
||||
|
||||
- name: post install mongo
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mongo/setup_cgr_db.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/mongo/'
|
||||
|
||||
- name: set versions
|
||||
command: 'cgr-migrator -exec=*set_versions -config_path=/usr/share/cgrates/conf/samples/tutmysql'
|
||||
environment:
|
||||
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
|
||||
|
||||
@@ -44,66 +44,83 @@
|
||||
|
||||
remote_user: '{{ user }}'
|
||||
tasks:
|
||||
###########################################################################################################################
|
||||
# install dependencies
|
||||
- name: Install dependencies
|
||||
become: yes
|
||||
apt: name={{ dependencies }} state=present
|
||||
###########################################################################################################################
|
||||
# install dependencies
|
||||
- name: Install dependencies
|
||||
become: yes
|
||||
apt: name={{ dependencies }} state=present
|
||||
|
||||
- name: Add key for freeswitch
|
||||
become: yes
|
||||
apt_key: url=https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc state=present
|
||||
- name: Add key for freeswitch
|
||||
become: yes
|
||||
apt_key: url=https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc state=present
|
||||
|
||||
- name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie)
|
||||
become: yes
|
||||
apt_repository:
|
||||
repo: deb http://files.freeswitch.org/repo/deb/debian-release/ stretch main
|
||||
state: present
|
||||
filename: 'freeswitch'
|
||||
- name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie)
|
||||
become: yes
|
||||
apt_repository:
|
||||
repo: deb http://files.freeswitch.org/repo/deb/debian-release/ buster main
|
||||
state: present
|
||||
filename: 'freeswitch'
|
||||
|
||||
# Install FreeSwitch
|
||||
- name: Install FreeSwitch
|
||||
become: yes
|
||||
apt: name={{ freeswitch_packages }} state=latest
|
||||
- name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie)
|
||||
become: yes
|
||||
apt_repository:
|
||||
repo: deb-src http://files.freeswitch.org/repo/deb/debian-release/ buster main
|
||||
state: present
|
||||
filename: 'freeswitch'
|
||||
|
||||
###########################################################################################################################
|
||||
# Install Golang
|
||||
- name: install unarchive dependencies (zypper)
|
||||
become: yes
|
||||
zypper:
|
||||
name:
|
||||
- gzip
|
||||
- tar
|
||||
state: present
|
||||
when: ansible_pkg_mgr == 'zypper'
|
||||
# Install FreeSwitch
|
||||
- name: Install FreeSwitch
|
||||
become: yes
|
||||
apt: name={{ freeswitch_packages }} state=latest
|
||||
|
||||
- name: Install golang
|
||||
include: go.yaml
|
||||
###########################################################################################################################
|
||||
# Install Golang
|
||||
- name: install unarchive dependencies (zypper)
|
||||
become: yes
|
||||
zypper:
|
||||
name:
|
||||
- gzip
|
||||
- tar
|
||||
state: present
|
||||
when: ansible_pkg_mgr == 'zypper'
|
||||
|
||||
###########################################################################################################################
|
||||
# Install and config CGRateS
|
||||
- name: Install and config CGRateS
|
||||
include: cgrates.yaml
|
||||
- name: Install golang
|
||||
include: go.yaml
|
||||
|
||||
# Configure FreeSwitch
|
||||
- name: Unzip FreeSWITCH config
|
||||
become: yes
|
||||
shell: 'sudo tar -xvf freeswitch_conf.tar.gz'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc'
|
||||
###########################################################################################################################
|
||||
# Install and config CGRateS
|
||||
- name: Install and config CGRateS
|
||||
include: cgrates.yaml
|
||||
|
||||
- name: Remove FreeSWITCH default config from /etc/freesitch
|
||||
become: yes
|
||||
shell: 'sudo rm -rf *'
|
||||
args:
|
||||
chdir: '/etc/freeswitch'
|
||||
# Configure FreeSwitch
|
||||
- name: Unzip FreeSWITCH config
|
||||
become: yes
|
||||
shell: 'sudo tar -xvf freeswitch_conf.tar.gz'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc'
|
||||
|
||||
- name: Copy our custom config for FreeSWITCH in /etc/freesitch
|
||||
become: yes
|
||||
shell: 'sudo cp -r {{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch/* /etc/freeswitch'
|
||||
args:
|
||||
chdir: '/etc/freeswitch'
|
||||
- name: Unzip FreeSWITCH config 2
|
||||
become: yes
|
||||
shell: 'sudo tar -xvf freeswitch_conf.tar.gz'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/tutorials/fs_evsock/freeswitch/etc'
|
||||
|
||||
# Configure PJSUA
|
||||
- name: Config PJSUA
|
||||
include: pjsua.yaml
|
||||
- name: Remove FreeSWITCH default config from /etc/freeswitch
|
||||
become: yes
|
||||
shell: 'sudo rm -rf *'
|
||||
args:
|
||||
chdir: '/etc/freeswitch'
|
||||
|
||||
- name: Copy our custom config for FreeSWITCH in /etc/freeswitch
|
||||
become: yes
|
||||
shell: 'sudo cp -r {{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch/* /etc/freeswitch'
|
||||
args:
|
||||
chdir: '/etc/freeswitch'
|
||||
|
||||
- name: Add user for CGRateS
|
||||
become: yes
|
||||
shell: 'sudo useradd cgrates'
|
||||
|
||||
# Configure PJSUA
|
||||
- name: Config PJSUA
|
||||
include: pjsua.yaml
|
||||
|
||||
@@ -32,14 +32,21 @@
|
||||
dest: "/usr/share/cgrates"
|
||||
state: link
|
||||
|
||||
- name: symbol link
|
||||
- name: symbol link 2
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ golang_gopath }}/bin/cgr-engine"
|
||||
dest: "/usr/bin/cgr-engine"
|
||||
state: link
|
||||
# post install
|
||||
- name: post install mysql
|
||||
|
||||
- name: post install for ers mysql
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mysql/setup_ers_db.sh root CGRateS.org localhost'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/mysql/'
|
||||
|
||||
- name: post install mysql
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mysql/setup_cgr_db.sh root CGRateS.org localhost'
|
||||
args:
|
||||
@@ -50,3 +57,20 @@
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/postgres/create_db_with_users.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/postgres/'
|
||||
|
||||
- name: post install for ers postgres
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/postgres/create_ers_db.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/postgres/'
|
||||
|
||||
- name: post install mongo
|
||||
become: yes
|
||||
command: 'sh {{ cgrates_dir }}/data/storage/mongo/setup_cgr_db.sh'
|
||||
args:
|
||||
chdir: '{{ cgrates_dir }}/data/storage/mongo/'
|
||||
|
||||
- name: set versions
|
||||
command: 'cgr-migrator -exec=*set_versions -config_path=/usr/share/cgrates/conf/samples/tutmysql'
|
||||
environment:
|
||||
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
become: yes
|
||||
apt: name={{ dependencies }} state=present
|
||||
|
||||
# Install FreeSwitch
|
||||
# Install Kamailio
|
||||
- name: Install Kamailio
|
||||
become: yes
|
||||
apt: name={{ kamailio_package }} state=latest
|
||||
@@ -77,6 +77,10 @@
|
||||
include: cgrates.yaml
|
||||
|
||||
|
||||
- name: Add user for CGRateS
|
||||
become: yes
|
||||
shell: 'sudo useradd cgrates'
|
||||
|
||||
# Configure PJSUA
|
||||
- name: Config PJSUA
|
||||
include: pjsua.yaml
|
||||
|
||||
Reference in New Issue
Block a user