This repository has been archived on 2023-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
skylab-ansible/roles/swarm/tasks/main.yaml

19 lines
675 B
YAML
Raw Normal View History

---
- name: Install Docker
ansible.builtin.import_tasks: install.yaml
- name: Configure Docker
ansible.builtin.import_tasks: configure.yaml
# This taskfile will set two facts that will be used in subsequent tasks:
# * _docker_swarm_needs_join: a boolean indicating whether the host needs to be joined to the swarm
# or is already joined
# * _docker_swarm_manager: the inventory hostname of a swarm manager that can be delegated to to
# fetch swarm joining info
- name: Check swarm state ahead of swarm configuration
ansible.builtin.import_tasks: check.yaml
- name: Join server to swarm
when: _docker_swarm_needs_join
ansible.builtin.include_tasks: join.yaml