docker_image: allow to specify pull platform (#89)

* Allow to specify pull platform.

* Add basic test and document that the value is not used for idempotency at the moment.

* Fix pulling.

* Simplify code.

* Add API version for pull_platform.

* Move pull_platform into new pull option. Use apply_defaults=True to avoid some special logic.

* Add example.

* Remove apply_defaults=True.
This commit is contained in:
Felix Fontein
2021-02-24 23:45:34 +01:00
committed by GitHub
parent f107ab281f
commit ed9bf1117f
4 changed files with 52 additions and 15 deletions
@@ -25,6 +25,8 @@
name: "{{ docker_test_image_hello_world }}"
state: present
source: pull
pull:
platform: amd64
register: present_1
- name: Make sure image is there (idempotent)
@@ -32,6 +34,8 @@
name: "{{ docker_test_image_hello_world }}"
state: present
source: pull
pull:
platform: amd64
register: present_2
- assert: