I'm trying to use a private docker registry, and seeing some weirdness that I can't explain. Running the exact same task yaml is working as expected when I put it in a playbook and run it, but not working when running as part of a role (the task runs, but comes back with status "changed": false
Here's my playbook, which works: - name: docker login test hosts: myhost-02 tasks: - name: log in to my docker registry docker_login: registry: hoylu.azurecr.io username: hoylu password: MyPassword and here's what I have under roles/dockerhost/tasks: --- - name: reset ssh connection to allow user changes to affect 'current login user' meta: reset_connection - name: log in to my docker registry docker_login: registry: hoylu.azurecr.io username: hoylu password: MyPassword in the playbook case (first example), this results in the ~/.docker/config.json file being created on the host and it being logged in to the registry: changed: [myhost-02] => { "changed": true, "invocation": { "module_args": { "api_version": null, "cacert_path": null, "cert_path": null, "config_path": "~/.docker/config.json", "debug": false, "docker_host": null, "email": null, "filter_logger": false, "key_path": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "reauthorize": false, "registry": "hoylu.azurecr.io", "registry_url": "hoylu.azurecr.io", "ssl_version": null, "state": "present", "timeout": null, "tls": null, "tls_hostname": null, "tls_verify": null, "username": "hoylu" } }, "login_result": { "IdentityToken": "", "Status": "Login Succeeded" } but in the second case (after deleting the ~/.docker folder on the host to make sure it's not already logged in) I get: ok: [myhost-02] => { "changed": false, "invocation": { "module_args": { "api_version": null, "cacert_path": null, "cert_path": null, "config_path": "~/.docker/config.json", "debug": false, "docker_host": null, "email": null, "filter_logger": false, "key_path": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "reauthorize": false, "registry": "hoylu.azurecr.io", "registry_url": "hoylu.azurecr.io", "ssl_version": null, "state": "present", "timeout": null, "tls": null, "tls_hostname": null, "tls_verify": null, "username": "hoylu" } }, "login_result": { "email": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "serveraddress": "hoylu.azurecr.io", "username": "hoylu" } highlights show the only difference, but I don't understand why I might be seeing different behavior here, or how to troubleshoot it. Thanks, Bjørn -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5a9d47ab-f867-4ccc-9171-81c4927d0e86%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.