--- - name: Initialize base server. hosts: all become: yes roles: - install-base-packages - docker - net-security - name: Initialize Docker swarm. hosts: admin become: yes roles: - docker-swarm-init tags: swarm - name: Add managers to swarm. hosts: managers become: yes roles: - docker-swarm-add-manager tags: swarm - name: Add workers to swarm. hosts: workers become: yes roles: - docker-swarm-add-worker tags: swarm