You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ansible-roles/netmaker_server/tasks/rqlite.yml

31 lines
1.1 KiB
YAML

- name: Deploy rqlite config
ansible.builtin.template:
src: rqlite-config.json.template
2 years ago
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]"