You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

  1. ---
  2. - name: Register docker images info
  3. raw: >-
  4. {{ docker_bin_dir }}/docker images -q | xargs {{ docker_bin_dir }}/docker inspect -f "{{ '{{' }} (index .RepoTags 0) {{ '}}' }},{{ '{{' }} (index .RepoDigests 0) {{ '}}' }}" | tr '\n' ','
  5. no_log: true
  6. register: docker_images
  7. failed_when: false
  8. changed_when: false
  9. check_mode: no
  10. when: download_container
  11. - name: container_download | Create dest directory for saved/loaded container images
  12. file:
  13. path: "{{local_release_dir}}/containers"
  14. state: directory
  15. recurse: yes
  16. mode: 0755
  17. owner: "{{ansible_ssh_user|default(ansible_user_id)}}"
  18. when: download_container
  19. - name: container_download | create local directory for saved/loaded container images
  20. file:
  21. path: "{{local_release_dir}}/containers"
  22. state: directory
  23. recurse: yes
  24. delegate_to: localhost
  25. delegate_facts: false
  26. become: false
  27. run_once: true
  28. when:
  29. - download_run_once
  30. - download_delegate == 'localhost'
  31. - download_container
  32. tags:
  33. - localhost