You can use this Ansible roles to install full Opensips + Control Panel with one command.
For some reason roles to install Opensips from ansible galaxy not working as expected.
I have modified some roles to make it works.
This will good only for Debian 10 and Centos 7. Most popular systems.
Roles will install Mysql server with defaults, opensips-cli, opensips 3.2 and opensips control panel with opensips DB. Access to panel is login “admin” and password “opensips”.
Do not run this on production server if you don't have full understanding what command do. It may cause your system loose some important things like ssh keys.
- Make usr/local/bin inpath to run command from it.
echo “export PATH=$PATH:/usr/local/sbin” > /root/.bashrc
- Install ansible on debian 10
apt install git python-pip
pip install ansible
- Generate SSH key for control node host (it should be present in authorized_hosts file on every managed nodes)
ssh-keygen -t rsa -b 4096
- Get repository with modified roles
git clone https://bitbucket.org/yooxy/ansible-opensips.git
- Put roles into /root/.ansible repository.
cp -r ansible-opensips/roles /root/.ansible
- Modify hosts file in ansible-opensips repo and copy it to /etc/ansible (default directory for hosts file)
Run ansible-playbook where you have “ansible-playbook inst_opensips.yml”
Here is the script to place on vanilla debian 10 to have control node ready for action. Just do step 6 after this script done.
export PATH=$PATH:/usr/local/sbin echo "export PATH=$PATH:/usr/local/sbin" > /root/.bashrc apt install git python-pip -y pip install ansible ssh-keygen -t rsa -b 4096 git clone https://bitbucket.org/yooxy/ansible-opensips.git mkdir /etc/ansible mkdir /root/.ansible mkdir /root/.ansible/roles cp -r ansible-opensips/roles /root/.ansible