---
# yamllint disable rule:line-length
- name: copy des fichiers de personnalisation de la page d'accueil de jitsi
  copy:
    src: '../file/{{ item[0] }}'
    dest: '/usr/share/jitsi-meet/{{ item[1] }}'
    owner: root
    group: root
    mode: '0644'
  loop:
    - ['body.html', '']
    - ['custom.css', 'css/']
    - ['favicon.ico', 'images/']
    - ['illustration-visio.png', 'images/']
    - ['logo-komuniki-txt.svg', 'images/']
    - ['logo-komuniki.svg', 'images/']
    - ['title.html', '']

- name: Adaptation du js
  lineinfile:
    path: /usr/share/jitsi-meet/interface_config.js
    regexp: '{{ item[0] }}'
    line: '{{ item[1] }}'
  loop:
    - ['APP_NAME: ', "    APP_NAME: 'Komuniki',"]
    - ['DEFAULT_LOGO_URL: ', "    DEFAULT_LOGO_URL: 'images/logo-komuniki.svg',"]
    - ['DEFAULT_WELCOME_PAGE_LOGO_URL: ', "    DEFAULT_WELCOME_PAGE_LOGO_URL: 'images/logo-komuniki-txt.svg',"]
    - ['JITSI_WATERMARK_LINK: ', "    JITSI_WATERMARK_LINK: 'https://komuniki.fr',"]
# yamllint enable rule:line-length
