{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/26190","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/26190/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/26190/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/26190/events","html_url":"https://github.com/ansible/ansible/issues/26190","id":239227953,"number":26190,"title":"Allow decrypting of files with vaulted variables","user":{"login":"jhkrischel","id":2132602,"avatar_url":"https://avatars2.githubusercontent.com/u/2132602?v=4","gravatar_id":"","url":"https://api.github.com/users/jhkrischel","html_url":"https://github.com/jhkrischel","followers_url":"https://api.github.com/users/jhkrischel/followers","following_url":"https://api.github.com/users/jhkrischel/following{/other_user}","gists_url":"https://api.github.com/users/jhkrischel/gists{/gist_id}","starred_url":"https://api.github.com/users/jhkrischel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhkrischel/subscriptions","organizations_url":"https://api.github.com/users/jhkrischel/orgs","repos_url":"https://api.github.com/users/jhkrischel/repos","events_url":"https://api.github.com/users/jhkrischel/events{/privacy}","received_events_url":"https://api.github.com/users/jhkrischel/received_events","type":"User","site_admin":false},"labels":[{"id":454885231,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":511882096,"url":"https://api.github.com/repos/ansible/ansible/labels/c:parsing/vault/","name":"c:parsing/vault/","color":"b60205","default":false},{"id":48457795,"url":"https://api.github.com/repos/ansible/ansible/labels/feature_idea","name":"feature_idea","color":"006b75","default":false},{"id":54811101,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"alikins","id":15162,"avatar_url":"https://avatars0.githubusercontent.com/u/15162?v=4","gravatar_id":"","url":"https://api.github.com/users/alikins","html_url":"https://github.com/alikins","followers_url":"https://api.github.com/users/alikins/followers","following_url":"https://api.github.com/users/alikins/following{/other_user}","gists_url":"https://api.github.com/users/alikins/gists{/gist_id}","starred_url":"https://api.github.com/users/alikins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alikins/subscriptions","organizations_url":"https://api.github.com/users/alikins/orgs","repos_url":"https://api.github.com/users/alikins/repos","events_url":"https://api.github.com/users/alikins/events{/privacy}","received_events_url":"https://api.github.com/users/alikins/received_events","type":"User","site_admin":false},"assignees":[{"login":"alikins","id":15162,"avatar_url":"https://avatars0.githubusercontent.com/u/15162?v=4","gravatar_id":"","url":"https://api.github.com/users/alikins","html_url":"https://github.com/alikins","followers_url":"https://api.github.com/users/alikins/followers","following_url":"https://api.github.com/users/alikins/following{/other_user}","gists_url":"https://api.github.com/users/alikins/gists{/gist_id}","starred_url":"https://api.github.com/users/alikins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alikins/subscriptions","organizations_url":"https://api.github.com/users/alikins/orgs","repos_url":"https://api.github.com/users/alikins/repos","events_url":"https://api.github.com/users/alikins/events{/privacy}","received_events_url":"https://api.github.com/users/alikins/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/11","html_url":"https://github.com/ansible/ansible/milestone/11","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/11/labels","id":2644825,"number":11,"title":"2.5.0","description":"","creator":{"login":"gundalow","id":940557,"avatar_url":"https://avatars1.githubusercontent.com/u/940557?v=4","gravatar_id":"","url":"https://api.github.com/users/gundalow","html_url":"https://github.com/gundalow","followers_url":"https://api.github.com/users/gundalow/followers","following_url":"https://api.github.com/users/gundalow/following{/other_user}","gists_url":"https://api.github.com/users/gundalow/gists{/gist_id}","starred_url":"https://api.github.com/users/gundalow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundalow/subscriptions","organizations_url":"https://api.github.com/users/gundalow/orgs","repos_url":"https://api.github.com/users/gundalow/repos","events_url":"https://api.github.com/users/gundalow/events{/privacy}","received_events_url":"https://api.github.com/users/gundalow/received_events","type":"User","site_admin":false},"open_issues":73,"closed_issues":371,"state":"open","created_at":"2017-07-17T13:35:32Z","updated_at":"2018-02-21T20:41:38Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2017-06-28T16:50:58Z","updated_at":"2018-02-21T21:14:02Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Feature Idea\r\n\r\n##### COMPONENT NAME\r\nansible-vault\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.3.1.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n  python version = 2.7.13 (default, Apr 23 2017, 16:50:35) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]\r\n```\r\n\r\n##### CONFIGURATION\r\nn/a\r\n\r\n##### OS / ENVIRONMENT\r\nn/a\r\n\r\n##### SUMMARY\r\nansible-vault decrypt allows the decryption of completely encrypted yaml files, but it will not decrypt vaulted variables in an unencrypted yaml file with encrypted variables.\r\n\r\nIt would be nice, for CLI purposes, to have decrypt take a partially encrypted file, and give us the decrypted text.\r\n\r\n##### STEPS TO REPRODUCE\r\n* create `test.yml` file with single encrypted variable encrypted by `~/.vault_pass.txt`\r\n* ansible-vault decrypt file\r\n\r\n```\r\nansible-vault decrypt test.yml --vault-password-file ~/.vault_pass.txt\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n* Expected plain text output with encrypted variable decrypted.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nERROR! input is not vault encrypted data for test.yml\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/367474313","html_url":"https://github.com/ansible/ansible/issues/26190#issuecomment-367474313","issue_url":"https://api.github.com/repos/ansible/ansible/issues/26190","id":367474313,"user":{"login":"andrunah","id":17752048,"avatar_url":"https://avatars0.githubusercontent.com/u/17752048?v=4","gravatar_id":"","url":"https://api.github.com/users/andrunah","html_url":"https://github.com/andrunah","followers_url":"https://api.github.com/users/andrunah/followers","following_url":"https://api.github.com/users/andrunah/following{/other_user}","gists_url":"https://api.github.com/users/andrunah/gists{/gist_id}","starred_url":"https://api.github.com/users/andrunah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrunah/subscriptions","organizations_url":"https://api.github.com/users/andrunah/orgs","repos_url":"https://api.github.com/users/andrunah/repos","events_url":"https://api.github.com/users/andrunah/events{/privacy}","received_events_url":"https://api.github.com/users/andrunah/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T21:14:02Z","updated_at":"2018-02-21T21:14:02Z","author_association":"NONE","body":"So. I ended up going thru ansible code to understand how it works with encrypted variables and wrote some tiny script that I can use in my automation jobs. I hope it would be useful for anyone who is waiting for this issue to be fixed.\r\nhttps://github.com/andrunah/ansible-vault-variable-updater"}}
{"actor":{"display_login":"andrunah"}}