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.

32 lines
949 B

  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. - name: container_download | Create dest directory for saved/loaded container images
  11. file:
  12. path: "{{local_release_dir}}/containers"
  13. state: directory
  14. recurse: yes
  15. mode: 0755
  16. owner: "{{ansible_ssh_user|default(ansible_user_id)}}"
  17. - name: container_download | create local directory for saved/loaded container images
  18. file:
  19. path: "{{local_release_dir}}/containers"
  20. state: directory
  21. recurse: yes
  22. delegate_to: localhost
  23. delegate_facts: false
  24. become: false
  25. run_once: true
  26. when:
  27. - download_run_once
  28. - download_delegate == 'localhost'
  29. tags:
  30. - localhost