Zack Williams | 22b0917 | 2016-04-30 16:12:20 -0700 | [diff] [blame] | 1 | --- |
| 2 | # docker-compose-pull/tasks/main.yml |
| 3 | |
| 4 | - name: Pull images from dockerhub with docker-compose |
| 5 | command: ansible "{{ item.name }}" -b -u ubuntu -m command \ |
Zack Williams | e603ce7 | 2016-04-30 21:13:24 -0700 | [diff] [blame] | 6 | -a "docker-compose pull chdir={{ item.path | expanduser }}" |
Zack Williams | 22b0917 | 2016-04-30 16:12:20 -0700 | [diff] [blame] | 7 | with_items: "{{ docker_compose_pull_list }}" |
| 8 | |
| 9 | |
Zack Williams | 0e58312 | 2016-04-30 16:57:03 -0700 | [diff] [blame] | 10 | - name: Run "docker-compose up" where specified |
Zack Williams | 22b0917 | 2016-04-30 16:12:20 -0700 | [diff] [blame] | 11 | command: ansible "{{ item.name }}" -b -u ubuntu -m command \ |
Zack Williams | e603ce7 | 2016-04-30 21:13:24 -0700 | [diff] [blame] | 12 | -a "docker-compose up -d chdir={{ item.path | expanduser }}" |
Zack Williams | 22b0917 | 2016-04-30 16:12:20 -0700 | [diff] [blame] | 13 | with_items: "{{ docker_compose_pull_list | selectattr('up') }}" |
| 14 | |