10 lines
356 B
YAML
10 lines
356 B
YAML
- name: "Pull Docker images"
|
|
shell: "docker pull {{ item.name }}"
|
|
with_items:
|
|
- "{{ services }}"
|
|
|
|
- name: "Create Docker services on the swarm"
|
|
shell: "docker -H {{ masterip }} service create --replicas {{ node_count }} --publish {{ item.port }}:{{item.port}} --detach=false --network aws-demo {{ item.name }}"
|
|
with_items:
|
|
- "{{ services }}"
|