mwolff44.freeswitch-mw
Freeswitch-mw
Ansible役割 - FreeSwitch 1.6用
要件
- Ansible 2.0以上でテスト済み。
pipを使ったAnsibleのインストール
sudo apt-get install -y ansible
役割変数
役割変数とそのデフォルト値。
FreeSwitch
freeswitch_conf_dir: '/etc/freeswitch' # 設定ディレクトリ
freeswitch_symlinks: True # デフォルトのFSレイアウトでシンボリックリンクを作成する
freeswitch_install_conf: True # 設定ファイルのインストールを許可する - 更新時には無効にできる
freeswitch_conf_backup_dir: '/etc/freeswitch.orig' # バックアップ設定ディレクトリ
freeswitch_config_template_dir: '../templates/freeswitch/config' # FreeSwitch設定用のテンプレートディレクトリ
freeswitch_config_list: # ".j2"で終わるテンプレート設定ファイルのリスト
- autoload_configs/console.conf.xml.j2
- autoload_configs/logfile.conf.xml.j2
- autoload_configs/modules.conf.xml.j2
- autoload_configs/switch.conf.xml.j2
- autoload_configs/syslog.conf.xml.j2
freeswitch_install_script: True # スクリプトファイルのインストールを許可する - 更新時には無効にできる
freeswitch_script_dir: '/usr/share/freeswitch/scripts' # スクリプトディレクトリ
freeswitch_script_backup_dir: '/usr/share/freeswitch/scripts.orig' # スクリプトのバックアップディレクトリ
freeswitch_script_template_dir: '../templates/freeswitch/scripts' # FreeSwitchスクリプト用のテンプレートディレクトリ
freeswitch_script_list: # ".j2"で終わるテンプレートスクリプトファイルのリスト
- test.lua.j2
freeswitch_packages: # インストールするFreeSwitchパッケージ
- freeswitch-meta-all
- freeswitch-all-dbg
- gdb
FreeSwitch設定
freeswitch_log_mapping: <map name="err" value="debug,info,notice,warning,err,crit,alert"/>
freeswitch_log_max_rotate: <!-- <param name="maximum-rotate" value="32"/> -->
freeswitch_max_db_handles: 50 # 同時にオープンできるDBハンドルの最大数
freeswitch_db_handle_timeout: 10 # 新しいDBハンドルを待つ最大秒数
freeswitch_min_idle_cpu: 25 # 呼び出しを拒否する前の最小アイドルCPU
freeswitch_max_sessions: 1000 # 一度に許可するセッションの最大数
freeswitch_sessions_per_second: 30 # 一秒あたりの最も多く作成できるチャネル数
freeswitch_global_loglevel: debug # デフォルトのグローバルログレベル - 値はdebug, info, notice, warning, err, crit, alertのいずれか
freeswitch_rtp_start_port: 16384
freeswitch_rtp_end_port: 32768
ODBC
odbc_install: false
odbc_packages_install: false
odbc_packages:
- unixodbc-bin
- unixodbc-dev
odbc_postgresql_install: false
odbc_postgresql_packages:
- odbc-postgresql
postgresql_packages_install: false
odbc_template_dir: '../templates/odbc' # ODBC用のテンプレートディレクトリ
odbc_server: 127.0.0.1
odbc_port: 5432
odbc_database: 'mydatabase'
odbc_user: 'myuser'
odbc_password: 'mypass'
odbc_tracefile: '/tmp/psqlodbc.log'
Fail2ban
fail2ban_install: False # デフォルト:fail2banはインストールされない
fail2ban_local_jail_file: /etc/fail2ban/jail.local # FreeSwitch用のfail2banジailファイル
fail2ban_filter_dir: /etc/fail2ban/filter.d # fail2banフィルダーディレクトリ
fail2ban_local_jail: ../templates/fail2ban/jail.local # FreeSwitch用のfail2banテンプレートジail
fail2ban_fs: ../templates/fail2ban/freeswitch.conf # FreeSwitch用のFail2banフィルタテンプレート
fail2ban_dos_fs: ../templates/fail2ban/freeswitch-dos.conf # FreeSwitch用のfail2ban dosフィルタテンプレート
Sngrep
sngrep_install: False # デフォルト:sngrepはインストールされない
systemdによる時間同期
ntp_install: False # デフォルト:時間同期は設定されない
ntp_servers: '{{ ntp_servers_map[ansible_distribution]
| d(ntp_servers_map["default"]) }}'
ntp_servers_map:
'Debian': [ '0.debian.pool.ntp.org', '1.debian.pool.ntp.org',
'2.debian.pool.ntp.org', '3.debian.pool.ntp.org' ]
'Ubuntu': [ '0.ubuntu.pool.ntp.org', '1.ubuntu.pool.ntp.org',
'2.ubuntu.pool.ntp.org', '3.ubuntu.pool.ntp.org' ]
'default': [ '0.pool.ntp.org', '1.pool.ntp.org',
'2.pool.ntp.org', '3.pool.ntp.org' ]
ntp_timezone: 'Europe/Paris'
ntp_timesyncd_template: ../templates/etc/systemd/timesyncd.conf.d/ansible.conf.j2
依存関係
特になし
使い方
mwolff44.freeswitch-mw
を役割に追加し、プレイブックファイルで変数を設定します。例:
- hosts: all
vars_files:
- 'defaults/main.yml'
tasks:
- include: 'tasks/main.yml'
handlers:
- include: 'handlers/main.yml'
ライセンス
GPL v3ライセンスの下でライセンスされています。詳細はLICENSEファイルを参照してください。
貢献者
特別感謝: Bruno SALZANO / [email protected]
著者情報
Mathias WOLFF / ブログ des télécoms - PyFreeBilling
インストール
ansible-galaxy install mwolff44.freeswitch-mw
ライセンス
gpl-3.0
ダウンロード
80
所有者