Files
cgrates/data/ansible/calls/freeswitch/main.yaml
ionutboangiu f87e52cf63 Update ansible calls playbooks
Fixes issue where cgrates role would attempt to run setup
scripts for postgres, when postgres is not installed.
2024-05-16 10:29:05 +02:00

58 lines
1.7 KiB
YAML

---
- name: Set up environment in order to run call tests for Freeswitch
hosts: all
tasks:
- name: Install freeswitch
ansible.builtin.import_role:
name: ../../roles/freeswitch
- name: Install Go
ansible.builtin.import_role:
name: ../../roles/go
- name: Install and config CGRateS
ansible.builtin.import_role:
name: ../../roles/cgrates
vars:
cgrates_dbs:
- mysql
cgrates_dependencies:
- git
- redis-server
- mariadb-server
- 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: Unzip FreeSWITCH config 2
become: yes
shell: 'sudo tar -xvf freeswitch_conf.tar.gz'
args:
chdir: '{{ cgrates_dir }}/data/tutorials/fs_evsock/freeswitch/etc'
- name: Update internal.xml with the correct IP
ansible.builtin.replace:
path: '{{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch/sip_profiles/internal.xml'
regexp: '192\.168\.56\.203'
replace: '{{ ansible_host }}'
- 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: Configure PJSUA
ansible.builtin.import_role:
name: ../../roles/pjsua
vars:
pjsua_version: '2.9'