2020-12-08 22:10:59 +01:00
|
|
|
- name: Workaround ansible switch between users
|
|
|
|
file:
|
|
|
|
path: "/tmp/ansible/"
|
|
|
|
mode: 0777
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- ffmpeg
|
|
|
|
- base-devel
|
|
|
|
- yay
|
|
|
|
|
|
|
|
- name: Create AUR User for build
|
|
|
|
user:
|
|
|
|
name: aur_builder
|
|
|
|
|
|
|
|
- name: Add sudo permission to aur user
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/sudoers.d/11-install-aur_builder
|
|
|
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
|
|
|
create: yes
|
|
|
|
validate: 'visudo -cf %s'
|
|
|
|
|
|
|
|
- name: Install nginx with rtmp
|
|
|
|
become: yes
|
|
|
|
become_user: aur_builder
|
|
|
|
aur:
|
|
|
|
name: nginx-rtmp-sergey-git
|
|
|
|
|
|
|
|
- name: Configure NGINX
|
|
|
|
notify: reload nginx
|
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/etc/nginx/{{ item }}"
|
|
|
|
loop:
|
|
|
|
- nginx.conf
|
|
|
|
- osp-rtmp.conf
|
|
|
|
- osp-redirects.conf
|
|
|
|
|
|
|
|
- name: Create www directory
|
|
|
|
file:
|
|
|
|
path: "{{osp_edge_http_path }}/{{item}}"
|
|
|
|
owner: "{{ osp_edge_http_user }}"
|
|
|
|
group: "{{ osp_edge_http_group }}"
|
|
|
|
state: directory
|
|
|
|
loop:
|
|
|
|
- .
|
|
|
|
- live
|
|
|
|
- live-adapt
|
|
|
|
|
|
|
|
- name: Nginx
|
|
|
|
systemd:
|
|
|
|
name: nginx
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2020-12-08 23:54:31 +01:00
|
|
|
|
|
|
|
- name: tls
|
|
|
|
import_tasks: tls.yml
|
|
|
|
when: osp_edge_tls_enabled
|