1

I'm using ansible. I want to upload a docker-compose.yml and pull its images, but not start them.

I tried this, but it also starts the images:

- name: dc
  docker_compose:
    project_src: /srv/foo/
    state: present
    pull: true
    stopped: true

I only want to pull - the same as if I use docker-compose pull.

Can I do that?

lonix
  • 757
  • 9
  • 20

1 Answers1

1

Currently unsupported.

Workaround:

- shell: "docker-compose pull"
  args:
    chdir: /path/to/docker-compose-yml/
  changed_when: "'... pull complete' in result.stderr | default('')"
lonix
  • 757
  • 9
  • 20