Newer
Older
# The conditional base role import here is temporary. The "base" role should be loaded aside from the other roles in the site.yml playbook. RM#33134
- name: import base role if wowza servers is independant
include_role:
name: base
when: '"mediaserver" not in group_names'
- name: install wowza requirements
apt:
force_apt_get: true
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: "{{ wowza_requirements }}"
- name: install wowza
apt:
force_apt_get: true
install_recommends: false
deb: "{{ wowza_package_url }}"
state: present
- name: fix wowza init scripts
loop:
- /etc/init.d/WowzaStreamingEngine
- /etc/init.d/WowzaStreamingEngineManager
replace:
path: "{{ item }}"
regexp: '^#### BEGIN INIT INFO$'
replace: '### BEGIN INIT INFO'
- name: enable wowza service
systemd:
name: WowzaStreamingEngine
enabled: true
- name: disable wowza manager service
when: not wowza_manager_enabled
systemd:
name: WowzaStreamingEngineManager
enabled: "{{ wowza_manager_enabled }}"
state: stopped
- name: configure wowza license
notify: restart wowza
copy:
dest: /usr/local/WowzaStreamingEngine/conf/Server.license
content: "{{ wowza_license }}"
- name: configure wowza manager password
when: wowza_manager_enabled
notify: restart wowza manager
copy:
dest: /usr/local/WowzaStreamingEngine/conf/admin.password
content: ubicast {{ wowza_manager_pwd }} admin
- name: fix permissions on wowza logs dir
notify: restart wowza
file:
path: /usr/local/WowzaStreamingEngine/logs
mode: 0755
state: directory
- name: ensure live application directory exists
file:
path: /usr/local/WowzaStreamingEngine/applications/live
state: directory
- name: configure wowza live application
notify: restart wowza
template:
src: live-application.xml.j2
dest: /usr/local/WowzaStreamingEngine/conf/live/Application.xml
- name: configure wowza tunning
notify: restart wowza
template:
src: Tune.xml.j2
dest: /usr/local/WowzaStreamingEngine/conf/Tune.xml
- name: configure wowza server
notify: restart wowza
template:
src: Server.xml.j2
dest: /usr/local/WowzaStreamingEngine/conf/Server.xml
- name: configure wowza vhost
notify: restart wowza
template:
src: VHost.xml.j2
dest: /usr/local/WowzaStreamingEngine/conf/VHost.xml
- name: set wowza manager listening address
when: wowza_manager_enabled
notify: restart wowza manager
replace:
path: /usr/local/WowzaStreamingEngine/manager/bin/startmgr.sh
regexp: 'war --httpPort'
replace: 'war --httpListenAddress={{ wowza_manager_address }} --httpPort'
- name: set wowza manager listening port
when: wowza_manager_enabled
notify: restart wowza manager
replace:
path: /usr/local/WowzaStreamingEngine/manager/bin/startmgr.sh
regexp: '--httpPort=\d+'
replace: '--httpPort={{ wowza_manager_port }}'
- name: logs cleanup cron
copy:
dest: /etc/cron.daily/wowza-logs-cleanup
mode: 0755
content: |
#!/bin/bash
find /usr/local/WowzaStreamingEngine/logs/ -type f -mtime +{{ wowza_logs_retention }} -delete
# FIREWALL
- name: firewall
vars:
ferm_rules_filename: "{{ wowza_ferm_rules_filename }}"
ferm_input_rules: "{{ wowza_ferm_input_rules }}"
ferm_output_rules: "{{ wowza_ferm_output_rules }}"
ferm_global_settings: "{{ wowza_ferm_global_settings }}"
include_role:

Stéphane Diemer
committed
name: ferm-configure