- name: restarts supervisor
  hosts: all
  become: True
  gather_facts: False
  vars_files:
    - roles/common_vars/defaults/main.yml
    - roles/supervisor/defaults/main.yml
  tasks:
    - name: supervisor | restart supervisor
      service:
        name: "{{ supervisor_service }}"
        state: restarted
      register: rc
      until: rc is succeeded
      retries: 5
