Trim whitespace from uri password for docker promote

The uri module faithfully passes the entire string, even if it has
trailing whitespace such as a newline. The zuul encrypt_secret
command currently does not trim, so if echo was used instead of
echo -n this can fail in a hard to debug manner.

Change-Id: Ic9525ac2925b6639f58604ca40dc878d20511ff8
This commit is contained in:
Monty Taylor 2020-03-23 13:01:46 -05:00
parent b4dc66ec33
commit a86510bd02

View File

@ -3,7 +3,7 @@
uri:
url: "https://auth.docker.io/token?service=registry.docker.io&scope=repository:{{ image.repository }}:pull,push"
user: "{{ docker_credentials.username }}"
password: "{{ docker_credentials.password }}"
password: "{{ docker_credentials.password | trim }}"
force_basic_auth: true
register: token
- name: Retag image