I am trying to log into private docker container registry and I need to use 
a json-string as a password. So I do the following
  registry: cr.yandex
  username: json_key
  password: "{{ lookup('file', 'key.json') }}"
  reauthorize: yes
And I got an error "Get https://cr.yandex/v2/: unauthorized: Password is 
invalid - must be JSON key".

When I ran "ansible-playbook" in verbose mode I saw that the content of the 
file "key.json" was transcoded – double quotes were changed to single 
quotes so it have become an invalid json string.

Luckily I found a code that caused this 
The "password" is of type "string". Then I changed "type='str'" to 
"type='json'" in my local file and everything worked!

I don't know if I am doing something wrong or it is a real bug and I should 
create an issue on github. Could someone please help me?

You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to