aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/modules/freeswitch/manifests/init.pp
blob: 4ebdf3a23e1fa0159dba1efb0deefc11b4b2083b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class freeswitch($freeswitch_password, $freeswitch_address, $freeswitch_rtp_start_port, $freeswitch_rtp_end_port) {
    package {'okay-release':
        source => 'http://repo.okay.com.mx/centos/9/x86_64/release/okay-release-1-9.el9.noarch.rpm',
    }
    ->
    package {['freeswitch-config-vanilla', 'freeswitch-systemd', 'freeswitch-sounds-en-us-callie-all']:}
    ->
    service {'freeswitch':
        enable => true,
        ensure => running,
    }

    file {'/etc/freeswitch/vars.xml':
        content => template('freeswitch/vars.xml'),
        require => Package['freeswitch-config-vanilla'],
        notify => Service['freeswitch'],
    }

    file {'/etc/freeswitch/autoload_configs/switch.conf.xml':
        content => template('freeswitch/switch.conf.xml'),
        require => Package['freeswitch-config-vanilla'],
        notify => Service['freeswitch'],
    }
}