ansible-role-openstreamingp.../tasks/main.yml

57 lines
1.1 KiB
YAML

- 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