---
- name: ensure the safe uploader service is started
  hosts: all
  become: True
  tasks:
    - name: stop all autonomi uploader service
      ansible.builtin.systemd:
        name: "autonomi_uploader_{{ item }}"
        state: started
        enabled: yes
      become: true
      loop: "{{ range(1, autonomi_uploader_instances | int + 1) | list }}"