---
- name: Ajout du compte SIP
  debconf:
    name: jigasi
    question: jigasi/sip-account
    value: '{{ jigasi_sip_account }}'
    vtype: string

- name: Ajout du mot de passe SIP
  debconf:
    name: jigasi
    question: jigasi/sip-password
    value: '{{ jigasi_sip_password }}'
    vtype: string

- name: Installation de jigasi
  apt:
    name:
      - jigasi

- name: Nommage de la room SIP
  lineinfile:
    path: /etc/jitsi/jigasi/sip-communicator.properties
    regexp: "org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME="
    line:
      # yamllint disable-line rule:line-length
      "org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME={{ jigasi_sip_room }}@conference.{{ inventory_hostname }}"
