commit
559039768e
@ -0,0 +1,3 @@ |
|||||||
|
# ---> Ansible |
||||||
|
*.retry |
||||||
|
|
@ -0,0 +1,29 @@ |
|||||||
|
--- |
||||||
|
language: python |
||||||
|
python: "2.7" |
||||||
|
|
||||||
|
# Use the new container infrastructure |
||||||
|
sudo: false |
||||||
|
|
||||||
|
# Install ansible |
||||||
|
addons: |
||||||
|
apt: |
||||||
|
packages: |
||||||
|
- python-pip |
||||||
|
|
||||||
|
install: |
||||||
|
# Install ansible |
||||||
|
- pip install ansible |
||||||
|
|
||||||
|
# Check ansible version |
||||||
|
- ansible --version |
||||||
|
|
||||||
|
# Create ansible.cfg with correct roles_path |
||||||
|
- printf '[defaults]\nroles_path=../' >ansible.cfg |
||||||
|
|
||||||
|
script: |
||||||
|
# Basic role syntax check |
||||||
|
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check |
||||||
|
|
||||||
|
notifications: |
||||||
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
@ -0,0 +1,14 @@ |
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
||||||
|
|
||||||
|
Version 2, December 2004 |
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> |
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified copies of |
||||||
|
this license document, and changing it is allowed as long as the name is changed. |
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO. |
@ -0,0 +1,3 @@ |
|||||||
|
# freepbx_ansible |
||||||
|
|
||||||
|
Ansible role for deploying Verdexus freepbx |
@ -0,0 +1,2 @@ |
|||||||
|
--- |
||||||
|
# defaults file for verdexus-asterisk |
@ -0,0 +1,2 @@ |
|||||||
|
--- |
||||||
|
# handlers file for verdexus-asterisk |
@ -0,0 +1,60 @@ |
|||||||
|
galaxy_info: |
||||||
|
author: your name |
||||||
|
description: your description |
||||||
|
company: your company (optional) |
||||||
|
|
||||||
|
# If the issue tracker for your role is not on github, uncomment the |
||||||
|
# next line and provide a value |
||||||
|
# issue_tracker_url: http://example.com/issue/tracker |
||||||
|
|
||||||
|
# Some suggested licenses: |
||||||
|
# - BSD (default) |
||||||
|
# - MIT |
||||||
|
# - GPLv2 |
||||||
|
# - GPLv3 |
||||||
|
# - Apache |
||||||
|
# - CC-BY |
||||||
|
license: license (GPLv2, CC-BY, etc) |
||||||
|
|
||||||
|
min_ansible_version: 2.4 |
||||||
|
|
||||||
|
# If this a Container Enabled role, provide the minimum Ansible Container version. |
||||||
|
# min_ansible_container_version: |
||||||
|
|
||||||
|
# Optionally specify the branch Galaxy will use when accessing the GitHub |
||||||
|
# repo for this role. During role install, if no tags are available, |
||||||
|
# Galaxy will use this branch. During import Galaxy will access files on |
||||||
|
# this branch. If Travis integration is configured, only notifications for this |
||||||
|
# branch will be accepted. Otherwise, in all cases, the repo's default branch |
||||||
|
# (usually master) will be used. |
||||||
|
#github_branch: |
||||||
|
|
||||||
|
# |
||||||
|
# Provide a list of supported platforms, and for each platform a list of versions. |
||||||
|
# If you don't wish to enumerate all versions for a particular platform, use 'all'. |
||||||
|
# To view available platforms and versions (or releases), visit: |
||||||
|
# https://galaxy.ansible.com/api/v1/platforms/ |
||||||
|
# |
||||||
|
# platforms: |
||||||
|
# - name: Fedora |
||||||
|
# versions: |
||||||
|
# - all |
||||||
|
# - 25 |
||||||
|
# - name: SomePlatform |
||||||
|
# versions: |
||||||
|
# - all |
||||||
|
# - 1.0 |
||||||
|
# - 7 |
||||||
|
# - 99.99 |
||||||
|
|
||||||
|
galaxy_tags: [] |
||||||
|
# List tags for your role here, one per line. A tag is a keyword that describes |
||||||
|
# and categorizes the role. Users find roles by searching for tags. Be sure to |
||||||
|
# remove the '[]' above, if you add tags to this list. |
||||||
|
# |
||||||
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. |
||||||
|
# Maximum 20 tags per role. |
||||||
|
|
||||||
|
dependencies: [] |
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above, |
||||||
|
# if you add dependencies to this list. |
@ -0,0 +1,45 @@ |
|||||||
|
#Get stuff from the internet |
||||||
|
cd /tmp |
||||||
|
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz |
||||||
|
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz |
||||||
|
wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.10.tar.gz |
||||||
|
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz |
||||||
|
|
||||||
|
#Compile and Install DAHDI |
||||||
|
cd /usr/src |
||||||
|
tar xvfz /tmp/dahdi-linux-complete-current.tar.gz |
||||||
|
tar xvfz /tmp/libpri-current.tar.gz |
||||||
|
rm -f /tmp/dahdi-linux-complete-current.tar.gz /tmp/libpri-current.tar.gz |
||||||
|
cd dahdi-linux-complete-* |
||||||
|
make all |
||||||
|
make install |
||||||
|
make config |
||||||
|
cd /usr/src/libpri-* |
||||||
|
make |
||||||
|
make install |
||||||
|
|
||||||
|
#Compile and Install jansson |
||||||
|
cd /usr/src |
||||||
|
tar vxfz /tmp/jansson.tar.gz |
||||||
|
rm -f /tmp/jansson.tar.gz |
||||||
|
cd jansson-* |
||||||
|
autoreconf -i |
||||||
|
./configure --libdir=/usr/lib64 |
||||||
|
make |
||||||
|
make install |
||||||
|
|
||||||
|
#Compile and install Asterisk |
||||||
|
cd /usr/src |
||||||
|
tar xvfz /tmp/asterisk-16-current.tar.gz |
||||||
|
rm -f /tmp/asterisk-16-current.tar.gz |
||||||
|
cd asterisk-* |
||||||
|
contrib/scripts/install_prereq install |
||||||
|
./configure --libdir=/usr/lib64 --with-pjproject-bundled |
||||||
|
contrib/scripts/get_mp3_source.sh |
||||||
|
make full |
||||||
|
|
||||||
|
make |
||||||
|
make install |
||||||
|
make config |
||||||
|
ldconfig |
||||||
|
chkconfig asterisk off |
@ -0,0 +1,77 @@ |
|||||||
|
--- |
||||||
|
- name: disable selinux :( |
||||||
|
template: |
||||||
|
src: selinux.j2 |
||||||
|
dest: /etc/sysconfig/selinux |
||||||
|
|
||||||
|
- name: disable selinux :( |
||||||
|
template: |
||||||
|
src: selinux.j2 |
||||||
|
dest: /etc/selinux/config |
||||||
|
|
||||||
|
- name: reboot if needed |
||||||
|
reboot: |
||||||
|
reboot_timeout: 3600 |
||||||
|
when: ansible_selinux.status == "enabled" |
||||||
|
|
||||||
|
- name: upgrade stuff via dnf |
||||||
|
dnf: |
||||||
|
state: latest |
||||||
|
name: "*" |
||||||
|
|
||||||
|
- name: Install development tools |
||||||
|
dnf: |
||||||
|
name: '@Development tools' |
||||||
|
state: present |
||||||
|
|
||||||
|
- name: add asterisk user |
||||||
|
user: |
||||||
|
name: asterisk |
||||||
|
shell: /sbin/nologin |
||||||
|
system: yes |
||||||
|
|
||||||
|
- name: add epel |
||||||
|
yum: |
||||||
|
name: epel-release |
||||||
|
state: latest |
||||||
|
|
||||||
|
- name: install a bunch of packages |
||||||
|
dnf: |
||||||
|
state: latest |
||||||
|
name: lynx, tftp-server, unixODBC, mysql-connector-odbc, mariadb-server, mariadb, httpd, ncurses-devel, sendmail, sendmail-cf, sox, newtdevel, libxml2-devel, libtiff-devel, audiofile-devel, gtk2-devel, subversion, kernel-devel, git, crontabs, cronie, cronie-anacron, wget, vim, uuiddevel, sqlite-devel, net-tools, gnutl-sdevel, python-devel, info, libuuid-devel, npm, php, php-pdo, php-mysql, php-mbstring, php-pear, php-process, php-xml, php-opcache, php-ldap, php-intl, php-soap |
||||||
|
|
||||||
|
- name: Enable mariadb |
||||||
|
service: |
||||||
|
name: mariadb |
||||||
|
enabled: yes |
||||||
|
state: started |
||||||
|
|
||||||
|
- name: Enable httpd |
||||||
|
service: |
||||||
|
name: httpd |
||||||
|
enabled: yes |
||||||
|
state: started |
||||||
|
|
||||||
|
- name: install Console_Getopt via pear |
||||||
|
shell: pear install Console_Getopt |
||||||
|
ignore_errors: yes |
||||||
|
|
||||||
|
- name: Check that /etc/asterisk exists |
||||||
|
stat: |
||||||
|
path: /etc/asterisk |
||||||
|
register: asterisk |
||||||
|
|
||||||
|
- name: debug |
||||||
|
debug: |
||||||
|
var: asterisk |
||||||
|
|
||||||
|
- name: Install Asterisk if needed |
||||||
|
block: |
||||||
|
- name: install install-asterisk.sh script |
||||||
|
template: |
||||||
|
src: install-asterisk.sh.j2 |
||||||
|
dest: /tmp/install-asterisk.sh |
||||||
|
|
||||||
|
- name: install asterisk via install-asterisk.sh script |
||||||
|
shell: sh /tmp/install-asterisk.sh |
||||||
|
when: not asterisk.stat.exists |
@ -0,0 +1,11 @@ |
|||||||
|
# This file controls the state of SELinux on the system. |
||||||
|
# SELINUX= can take one of these three values: |
||||||
|
# enforcing - SELinux security policy is enforced. |
||||||
|
# permissive - SELinux prints warnings instead of enforcing. |
||||||
|
# disabled - No SELinux policy is loaded. |
||||||
|
SELINUX=permissive |
||||||
|
# SELINUXTYPE= can take one of these three values: |
||||||
|
# targeted - Targeted processes are protected, |
||||||
|
# minimum - Modification of targeted policy. Only selected processes are protected. |
||||||
|
# mls - Multi Level Security protection. |
||||||
|
SELINUXTYPE=targeted |
@ -0,0 +1,2 @@ |
|||||||
|
localhost |
||||||
|
|
@ -0,0 +1,5 @@ |
|||||||
|
--- |
||||||
|
- hosts: localhost |
||||||
|
remote_user: root |
||||||
|
roles: |
||||||
|
- verdexus-asterisk |
@ -0,0 +1,2 @@ |
|||||||
|
--- |
||||||
|
# vars file for verdexus-asterisk |
Loading…
Reference in new issue