freepbx
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'alisio-freepbx', '0.1.6'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
Overview
This module installs FreePBX open source IP PBX.
Module Description
This module download, install and configure FreePBX with optional asterisk telephony framework and its dependencies installation.
This module is based on Sangoma 'Installing FreePBX 14 on CentOS 7' document, but using asterisk packages from tucny repo instead of building it from source.
- Implemented via resources, so beware of resource duplication
Setup
This module requires the requirements:
- puppet-archive
- puppet-nodejs
- puppet-selinux
- puppet-yum
- puppetlabs-augeas_core
- puppetlabs-stdlib
Usage
Usage Example
Simple example that downloads and installs FreePBX, asterisk and all dependencies
include freepbx
More complex example :
This example will install asterisk 13, set verbose to 10, set SELinux mode and reboot to apply SELinux changes
class {'freepbx':
asterisk_version => 13,
asterisk_verbose => 10,
selinux_mode => 'permissive',
reboot_after_install => true,
}
If you do not want to install asterisk using this module. Note that you must install asterisk another way before including freepbx class
class {'freepbx':
asterisk_install => false
}
Install FreePBX module 'queue'
freepbx::config::module {'queue':}
Testing
In a virtualbox machine using Vagrant
It is possible to use vagrant to provision a VM for testing purposes. All you have to do is type:
# Start the VM
vagrant up
# Access VM terminal
vagrant ssh
Once the provisioning ends you can type the VM's IP address to access the FreePBX Web UI.
In a remote server using bolt
Installing a test FreePBX on a remote server using bolt (mind you that a passwordless ssh key access must be configured first):
bolt task run puppet_agent::install --targets SERVER_IP_ADDRESS -u root
bolt file upload tests/freepbx.pp /tmp/freepbx.pp --targets SERVER_IP_ADDRESS -u root
bolt command run '/opt/puppetlabs/bin/puppet module install alisio-freepbx' --targets SERVER_IP_ADDRESS -u root
bolt command run '/opt/puppetlabs/bin/puppet apply /tmp/freepbx.pp' --targets SERVER_IP_ADDRESS -u root
Once the provisioning ends you can type IP address of the server on your browser to access the FreePBX Web UI.
In a local server
Installing locally on a server:
rpm -Uvh https://yum.puppet.com/puppet5-release-el-7.noarch.rpm
yum -y --nogpgcheck install puppet-agent git
/opt/puppetlabs/bin/puppet module install alisio-freepbx
git clone https://github.com/alisio/alisio-freepbx.git
/opt/puppetlabs/bin/puppet apply alisio-freepbx/tests/freepbx.pp
Once the provisioning ends you can type IP address of the server on your browser to access the FreePBX Web UI.
Reference
Classes
freepbx
: Install FreePBX and its dependencies
Defined Types
freepbx::config::repo
: Enable or disable FreePBX repositoriesfreepbx::config::module
: Install or remove FreePBX modules
Resources
Freepbx
asterisk_install
= Enable or disable asterisk install. Default (boolean): trueasterisk_default_language
= Set asterisk default language in /etc/asterisk/asterisk.conf file. Default (string): 'en'asterisk_verbose
= Set asterisk verbose in /etc/asterisk/asterisk.conf file. Default (integer): 1package_repo_install
= Enable or disable installation of FreePBX and asterisk related repos. Default (boolean): trueasterisk_version
= Set asterisk version to be installed. Default (integer): 16freepbx_version
= Set FreePBX version to me installed. Only version 14 was tested. Default (integer): 14reboot_after_install
= Enable reboot after install. Default (boolean): falseselinux_mode
= Set SELinux mode. Default (string): 'disabled'selinux_type
= Set SELinux type. Default (string): 'targeted'
Freepbx::config::repo
repo
: The name of the repository.enable
: Enable or disable repository. Default (boolean): truetimeout
: Timeout for the operation in seconds. Default (integer): 120,
Freepbx::config::module
module
: Name of the moduleensure
: Ensure that the module is present or absent. Default (string): presenttimeout
: Timeout for the operation in seconds. Default (integer): 120
Limitations
This module was testes using CentOS 7, FreePBX 14 and asterisk 16.
Development
Project URL: https://github.com/alisio/alisio-freepbx
Fell free to contribute to this module and submit your pull requests.
License
Copyright 2019 Antonio Alisio de Meneses Cordeiro
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Changelog
Release 0.1.6
Features
Bugfixes
- Set php_set_memory_limit to 256M
- freepbx::config::repo doesn't check if repos are enabled and runs everytime
Known Issues
- FreePBX module installation check takes too long when several modules are managed through puppet
Release 0.1.5
Features
- Add pt_BR extra audio install to test manifest
- Add wav music on hold package
Bugfixes
- Fix asterisk sounds folder
Known Issues
- freepbx::config::repo doesn't check if repos are enabled and runs everytime
Release 0.1.4
Bugfixes
- Remove unused variable
Known Issues
- freepbx::config::repo doesn't check if repos are enabled and runs everytime
Release 0.1.3
Features
- Remove puppet-nodejs module depedency
- Add package_repo_install for control installation of related repositories
Bugfixes
- Remove garbage characters from README
Known Issues
- freepbx::config::repo doesn't check if repos are enabled and runs everytime
Release 0.1.2
Features
- Add testing instructions to the README file
Bugfixes
- Fix freepbx::module defined type
- Apply button throws an error
Known Issues
- Error when applying changes. Fixed running /var/lib/asterisk/bin/retrieve_conf
Release 0.1.1
Features
- Set FreePBX file ownership during install
- Update README
Bugfixes
- Fix freepbx::module defined type
Known Issues
- Error when applying changes. Fixed running /var/lib/asterisk/bin/retrieve_conf
Release 0.1.0
- First Release
Dependencies
- puppet-archive (>= 4.5.0 < 5.0.0)
- puppet-selinux (>= 3.2.0 < 4.0.0)
- puppet-yum (>= 4.2.0 < 5.0.0)
- puppetlabs-augeas_core (>= 1.0.5 < 2.0.0)
- puppetlabs-concat (>= 6.2.0 < 7.0.0)
- puppetlabs-stdlib (>= 5.2.0 < 7.0.0)
- puppetlabs-translate (>= 2.2.0 < 3.0.0)