-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrtmp.yml
76 lines (57 loc) · 2.59 KB
/
rtmp.yml
1
2
3
4
5
6
7
8
9
10
11
12
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
---
- hosts: all
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: Install rtmp
apt: name=ffmpeg state=present
- name: Install rtmp
apt: name=rtmpdump state=present
- name: Install rtmp
apt: name=libpcre++-dev state=present
- name: Install rtmp
apt: name=libssl-dev state=present
- name: Install rtmp
apt: name=libxslt1-dev state=present
- name: Install rtmp
apt: name=libgd2-xpm-dev state=present
- name: Install rtmp
apt: name=libgeoip-dev state=present
- name: Rtml
file:
path: /build
state: directory
mode: 0775
- name: Rtml
get_url: url=http://nginx.org/download/nginx-1.10.0.tar.gz dest=/build/nginx-1.10.0.tar.gz
- name: Rtml
get_url: url=https://github.com/arut/nginx-rtmp-module/archive/master.tar.gz dest=/build/master.tar.gz
- name: Rtml
unarchive: src='/build/nginx-1.10.0.tar.gz' dest='/build' remote_src=yes
- name: Rtml
unarchive:
src: '/build/master.tar.gz'
dest: /build
remote_src: yes
- name: Rtml
command: ./configure --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_sub_module --with-mail --with-mail_ssl_module --add-module=/build/nginx-rtmp-module-master
args:
chdir: /build/nginx-1.10.0/
- name: Rtml
shell: /usr/bin/make --directory=/build/nginx-1.10.0
- name: Stop nginx
shell: service nginx stop
- name: Rtml
shell: cp /build/nginx-1.10.0/objs/nginx /usr/sbin/nginx
- name: Start nginx
service:
service: name=nginx state=start
- name: Setting RTMP
template:
src: nginx/rtpm.j2
dest: /etc/nginx/nginx.conf
- name: Stop nginx
service:
service: name=nginx state=restart