---
- name: configure master for docker swarm 
  become: yes
  become_user: dockerman
  hosts: masters
  # add var file
  vars_files:
    - "var/swarm.yml"
  tasks:
    - name: join master in swarm as manager
      shell: docker swarm join --token {{ manager_token }} {{ master_ip }}:2377