---
- name: Install libraries
  pip: name={{item}} executable={{ coreos_pypy_home }}/bin/pip
  with_items:
    - docker-py
    - boto

- name: Copy config dir over
  synchronize: >
    src={{playbook_dir}}/../config/
    dest={{ ansible_env.HOME }}/config/
    recursive=yes

- name: Kill off containers
  shell: docker rm -f {{backup_container_name}} {{nginx_container_name}} {{conf_container_name}} {{ci_container_name}} {{cert_container_name}}
  ignore_errors: yes

- name: Kill off data container
  shell: docker rm -f {{data_container_name}}
  ignore_errors: yes
  when: "dump_data == 'yes'"

---
- name: Install libraries
  pip: name={{item}} executable={{ coreos_pypy_home }}/bin/pip
  with_items:
    - docker-py
    - boto

- name: Copy config dir over
  synchronize: >
    src={{playbook_dir}}/../config/
    dest={{ ansible_env.HOME }}/config/
    recursive=yes

- name: Kill off containers
  shell: docker rm -f {{item}}
  ignore_errors: yes
  with_items:
    - "{{backup_container_name}}"
    - "{{nginx_container_name}}"
    - "{{conf_container_name}}"
    - "{{ci_container_name}}"
    - "{{cert_container_name}}"

- name: Kill off data container
  shell: docker rm -f {{item}}
  ignore_errors: yes
  with_items:
    - "{{data_container_name}}"
  when: dump_data == 'yes'

Use with_items for "kill off containers" tasks
Use with_items for "kill off containers" tasks
