I've tried this:
- name: Log into Docker registry
command: docker login --username "{{ docker_registry_username }}" --password-stdin
stdin: "{{ docker_registry_password }}"
This results in a warning and a failing command:
[WARNING]: Ignoring invalid attribute: stdin
…
Cannot perform an interactive login from a non TTY device
I've also tried this:
- name: Log into Docker registry
command: docker login --username "{{ docker_registry_username }}" --password-stdin
stdin: "{{ docker_registry_password }}"
This results in a syntax error:
ERROR! Syntax Error while loading YAML.
Does command stdin actually work in Ansible 2.7? If so, how am I supposed to use it?