From 63bac17a0f47704d6a716349b825d3c6fccd33f9 Mon Sep 17 00:00:00 2001 From: andronache Date: Fri, 29 Oct 2021 12:30:34 +0300 Subject: [PATCH] Fixed ansible script for calls freeswitch --- data/ansible/calls/freeswitch/main.yaml | 39 ++++++++++++++++--------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/data/ansible/calls/freeswitch/main.yaml b/data/ansible/calls/freeswitch/main.yaml index 8825f34a3..c471b47cd 100644 --- a/data/ansible/calls/freeswitch/main.yaml +++ b/data/ansible/calls/freeswitch/main.yaml @@ -1,4 +1,13 @@ --- +- name: Install Python + hosts: all + remote_user: '{{ user }}' + gather_facts: false + tasks: + - name: Install Python3s + raw: apt -y install python3 + become: true + - hosts: all vars: ansible_python_interpreter: auto # to disable deprication warning related to the use of python2 @@ -6,7 +15,7 @@ ##################### Golang Vars ############################# ############################################################### # Go language SDK version number - golang_version: '1.16.6' + golang_version: '1.17.2' go_version_target: "go version go{{ golang_version }} linux/amd64" # Mirror to download the Go language SDK redistributable package from golang_mirror: 'https://storage.googleapis.com/golang' @@ -50,22 +59,26 @@ - name: Install dependencies become: yes apt: name={{ dependencies }} state=present - - - name: Add key for freeswitch + + - name: apt-get update && apt-get install gnupg2 become: yes - apt_key: url=https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc state=present + shell: 'apt-get update && apt-get install -y gnupg2 wget lsb-release' - - name: Add FreeSwitch apt repository + - name: Freeswitch add key become: yes - apt_repository: - repo: deb [ allow-insecure=yes ] http://files.freeswitch.org/repo/deb/debian-release/ buster main - state: present - filename: 'freeswitch' + shell: 'wget -O /usr/share/keyrings/freeswitch-archive-keyring.gpg https://files.freeswitch.org/repo/deb/debian-release/freeswitch-archive-keyring.gpg' - # Install FreeSwitch - - name: Install FreeSwitch - become: yes - apt: name={{ freeswitch_packages }} state=latest + - name: Add FreeSwitch apt repository + become: yes + shell: 'echo "deb [signed-by=/usr/share/keyrings/freeswitch-archive-keyring.gpg trusted=yes] http://files.freeswitch.org/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list' + + - name: Add FreeSwitch apt repository 1.8 + become: yes + shell: 'echo "deb-src [signed-by=/usr/share/keyrings/freeswitch-archive-keyring.gpg trusted=yes] http://files.freeswitch.org/repo/deb/debian-unstable/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list' + + - name: Install FreeSwitch + become: yes + shell: 'apt-get update && apt-get install -y freeswitch-meta-all' ########################################################################################################################### # Install Golang