- name: Deploy rqlite config ansible.builtin.template: src: rqlite-config.json.template dest: /opt/netmaker_server/rqlite/config.json - name: Start rqlite service for 1st-node command: "docker-compose --project-directory /opt/netmaker_server/ up -d rqlite" register: command failed_when: command.rc != 0 when: "inventory_hostname == groups['netmaker_server'][0]" # - name: Waiting for rqlite to accept connections on 1st-node # ansible.builtin.wait_for: # host: "{{ inventory_hostname }}" # port: 4001 # state: started # when: "inventory_hostname == groups['netmaker_server'][0]" - name: Start rqlite service for other nodes command: "docker-compose --project-directory /opt/netmaker_server/ up -d rqlite" register: command failed_when: command.rc != 0 when: "inventory_hostname != groups['netmaker_server'][0]" # - name: Waiting for rqlite to accept connections on other nodes # ansible.builtin.wait_for: # host: "{{ inventory_hostname }}" # port: 4001 # state: started # when: "inventory_hostname != groups['netmaker_server'][0]"