Skip to content
Snippets Groups Projects
main.yml 3.54 KiB
---

# 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: force directory creation
  file:
    path: /usr/share/man/man1
    force: true
    state: directory

- name: install wowza requirements
  apt:
    force_apt_get: true
    install_recommends: false
    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: