{"action":"created","issue":{"url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/35","repository_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault","labels_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/35/comments","events_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/35/events","html_url":"https://github.com/TerryHowe/ansible-modules-hashivault/issues/35","id":268510184,"number":35,"title":"hashivault_init does not return the generated keys in result","user":{"login":"thalesac","id":6757418,"avatar_url":"https://avatars0.githubusercontent.com/u/6757418?v=4","gravatar_id":"","url":"https://api.github.com/users/thalesac","html_url":"https://github.com/thalesac","followers_url":"https://api.github.com/users/thalesac/followers","following_url":"https://api.github.com/users/thalesac/following{/other_user}","gists_url":"https://api.github.com/users/thalesac/gists{/gist_id}","starred_url":"https://api.github.com/users/thalesac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thalesac/subscriptions","organizations_url":"https://api.github.com/users/thalesac/orgs","repos_url":"https://api.github.com/users/thalesac/repos","events_url":"https://api.github.com/users/thalesac/events{/privacy}","received_events_url":"https://api.github.com/users/thalesac/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-10-25T18:56:49Z","updated_at":"2017-10-25T19:43:46Z","closed_at":"2017-10-25T19:08:38Z","author_association":"NONE","body":"```\r\n- hashivault_init:\r\n  register: 'vault_init'\r\n  environment:\r\n    VAULT_ADDR: \"{{ VAULT_ADDR }}\"\r\n  when: vault_init\r\n  run_once: yes\r\n\r\n- debug: msg=\"{{vault_init}}\"\r\n```\r\nThe debug returns:\r\n```\r\nTASK [platform-vault-init : debug] ******************************************************************\r\nok: [10.0.20.143] => {\r\n    \"msg\": true\r\n}\r\n```\r\nIt's missing the keys.\r\n\r\nThis seems to be the culprit: https://github.com/TerryHowe/ansible-modules-hashivault/blob/master/ansible/modules/hashivault/hashivault_init.py#L101\r\n\r\nAny ideas?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/comments/339448239","html_url":"https://github.com/TerryHowe/ansible-modules-hashivault/issues/35#issuecomment-339448239","issue_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/35","id":339448239,"user":{"login":"TerryHowe","id":104113,"avatar_url":"https://avatars2.githubusercontent.com/u/104113?v=4","gravatar_id":"","url":"https://api.github.com/users/TerryHowe","html_url":"https://github.com/TerryHowe","followers_url":"https://api.github.com/users/TerryHowe/followers","following_url":"https://api.github.com/users/TerryHowe/following{/other_user}","gists_url":"https://api.github.com/users/TerryHowe/gists{/gist_id}","starred_url":"https://api.github.com/users/TerryHowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TerryHowe/subscriptions","organizations_url":"https://api.github.com/users/TerryHowe/orgs","repos_url":"https://api.github.com/users/TerryHowe/repos","events_url":"https://api.github.com/users/TerryHowe/events{/privacy}","received_events_url":"https://api.github.com/users/TerryHowe/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T19:43:46Z","updated_at":"2017-10-25T19:43:46Z","author_association":"OWNER","body":"I guess one other thing, you should be able to specify VAULT_ADDR as an argument rather than the environment if you like\r\n\r\n```\r\n- hashivault_unseal:\r\n    keys: '{{ vault_init_keys.keys_base64.0 }} {{ vault_init_keys.keys_base64.1 }} {{ vault_init_keys.keys_base64.2 }}'\r\n    url: \"{{ VAULT_ADDR }}\"\r\n  when: vault_init_keys\r\n```\r\n\r\nI didn't test that, but it should work"}}
{"actor":{"display_login":"TerryHowe"}}