---

- name: Live packages installation
  apt:
    force_apt_get: true
    install_recommends: false
    name: "{{ debian_packages }}"
    state: present
  register: apt_status
  retries: 60
  until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)

- name: TMPFS creation to store the live chunks
  notify: restart nginx
  mount:
    path: /var/tmp/nginx-rtmp
    src: 'tmpfs'
    fstype: tmpfs
    opts: 'defaults,size={{ role_tmpfs_size }}'
    state: mounted

- name: Changing the rights on the TMPFS directory
  notify: restart nginx
  file:
    path: /var/tmp/nginx-rtmp
    owner: nginx
    group: root
    mode: '0700'

...