-
Notifications
You must be signed in to change notification settings - Fork 0
/
joint.yml
61 lines (45 loc) · 1.52 KB
/
joint.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
---
# ubuntu20.04インストールされている想定
# ファイルサーバのユーザはubuntuである必要がある
- hosts: file_server
become: on
vars:
conf_file: ./conf/smb.conf
tasks:
- name: install samba
apt: name=samba update_chache=yes cache_valid_time=3600
- name: make share_directory
shell: mkdir /home/ubuntu/sambashare
- name: replace samba_conf
copy: src=/etc/samba/smb.conf dest={{ conf_file }} force=yes
- name: restart samba
shell: systemctl restart smbd
- name: open 445 port
shell: ufw allow 445/tcp
- name: open 139 port
shell: ufw allow 139/tcp
- name: open 138 port
shell: ufw allow 138/udp
- name: open 137 port
shell: ufw allow 137/udp
- name: restart ufw
shell: systemctl restart ufw
# ubuntuOSを想定
# ストリーミングサーバに向けている
- hosts: stream_server
become: on
vars:
server_ip: 0.0.0.0 #ファイルサーバのIPアドレス
tasks:
- name: install cmake
shell: apt-get install -y cmake lib41-dev libjpeg-dev imagemagick
- name: download mjpeg-streamer
shell: git clone https://github.com/jacksonliam/mjpg-streamer.git
- name: cd
shell: cd mjpg-streamer/mjpg-streamer-experimental
- name: make install
shell: make; make install
- name: mount file
shell: mount -t cifs -o file_mode=0777, dir_mode=0777 //{{ server_ip }}/sambashare /mnt/samba
- name: save settings
shell: ffmpeg -i http://127.0.0.1:8080/?action=stream -an -vcodec h264 //{{ server_ip }}/sambashare/file.mp4