{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/37883","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/37883/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/37883/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/37883/events","html_url":"https://github.com/ansible/ansible/pull/37883","id":308309099,"number":37883,"title":"Support list of censored attributes","user":{"login":"trondhindenes","id":1747120,"avatar_url":"https://avatars0.githubusercontent.com/u/1747120?v=4","gravatar_id":"","url":"https://api.github.com/users/trondhindenes","html_url":"https://github.com/trondhindenes","followers_url":"https://api.github.com/users/trondhindenes/followers","following_url":"https://api.github.com/users/trondhindenes/following{/other_user}","gists_url":"https://api.github.com/users/trondhindenes/gists{/gist_id}","starred_url":"https://api.github.com/users/trondhindenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trondhindenes/subscriptions","organizations_url":"https://api.github.com/users/trondhindenes/orgs","repos_url":"https://api.github.com/users/trondhindenes/repos","events_url":"https://api.github.com/users/trondhindenes/events{/privacy}","received_events_url":"https://api.github.com/users/trondhindenes/received_events","type":"User","site_admin":false},"labels":[{"id":852590921,"url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","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":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-24T23:50:57Z","updated_at":"2018-03-26T22:46:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/37883","html_url":"https://github.com/ansible/ansible/pull/37883","diff_url":"https://github.com/ansible/ansible/pull/37883.diff","patch_url":"https://github.com/ansible/ansible/pull/37883.patch"},"body":"##### SUMMARY\r\nThis change allows a comma-separated list of censored vars to be configured either in ansible.cfg or envvars. The rationale for this is that the \"no_log\" flag hides too much information, so in many situations it's desireable to only hide a few known variables from the output, and to have that controllable outside of module code (so that the setting will have a \"global\" effect)\r\n\r\nThis addition will traverse the \"dict tree\" of the output object prior to dumping, and rip out the value for any \"censored\" attribute - it should therefor work for obj attributes as well as string attributes.\r\n\r\n##### ISSUE TYPE\r\n - Feature Pull Request\r\n\r\n\r\n##### COMPONENT NAME\r\ncallback_yaml\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n2.5.0\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n\r\n```\r\ncat > test.yml <<EOF\r\n- name: Stuff\r\n  hosts: localhost\r\n  tasks:\r\n  - name: set a fact\r\n    set_fact:\r\n      myvar:\r\n        - firstname: Peter\r\n          lastname: File\r\n          secret: passw\r\n          objstuff:\r\n            wakka: makka\r\n            secret: passw\r\n  - name: write another thing\r\n    debug:\r\n      msg: \"{{ myvar }}\"\r\nEOF\r\n\r\nexport ANSIBLE_YAML_CALLBACK_CENSORED=\"secret,\"\r\nansible-playbook test.yml\r\nexport ANSIBLE_YAML_CALLBACK_CENSORED=\"secret, wakka\"\r\nansible-playbook test.yml\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/376336156","html_url":"https://github.com/ansible/ansible/pull/37883#issuecomment-376336156","issue_url":"https://api.github.com/repos/ansible/ansible/issues/37883","id":376336156,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars1.githubusercontent.com/u/836171?v=4","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T22:46:09Z","updated_at":"2018-03-26T22:46:09Z","author_association":"MEMBER","body":"@trondhindenes queued this for irc core meeting as this might make more sense as a global/default option for all callbacks."}}
{"actor":{"display_login":"bcoca"}}