{"action":"closed","issue":{"url":"https://api.github.com/repos/zerotao/ansible-packages/issues/2","repository_url":"https://api.github.com/repos/zerotao/ansible-packages","labels_url":"https://api.github.com/repos/zerotao/ansible-packages/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/zerotao/ansible-packages/issues/2/comments","events_url":"https://api.github.com/repos/zerotao/ansible-packages/issues/2/events","html_url":"https://github.com/zerotao/ansible-packages/issues/2","id":183003482,"number":2,"title":"conditional on debconf-set-selections","user":{"login":"jardleex","id":16123075,"avatar_url":"https://avatars.githubusercontent.com/u/16123075?v=3","gravatar_id":"","url":"https://api.github.com/users/jardleex","html_url":"https://github.com/jardleex","followers_url":"https://api.github.com/users/jardleex/followers","following_url":"https://api.github.com/users/jardleex/following{/other_user}","gists_url":"https://api.github.com/users/jardleex/gists{/gist_id}","starred_url":"https://api.github.com/users/jardleex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jardleex/subscriptions","organizations_url":"https://api.github.com/users/jardleex/orgs","repos_url":"https://api.github.com/users/jardleex/repos","events_url":"https://api.github.com/users/jardleex/events{/privacy}","received_events_url":"https://api.github.com/users/jardleex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T09:26:56Z","updated_at":"2016-10-14T09:41:08Z","closed_at":"2016-10-14T09:41:08Z","body":"Hello @zerotao,\r\n\r\nsorry to bother you again. In my tests I just did, I found a minor thing to improve. As it its only one line, may you add it directly?\r\nIt's again in `apt.yml` and adds the `when: packages_accept`. Background:\r\nWithout the conditional the empty template file will get placed by Ansible and `apt | run debconf-set-selections` will get executed afterwards. In my tests this altered the output of `debconf-get-selections`. As some users may not want this, the conditional checks if `packages_accept` is empty (default) or not (changed by user).\r\n\r\n````\r\n- name: apt | config debconf-set-selections\r\n  template:\r\n    src: debconf-set-selections.j2\r\n    dest: /tmp/debconf-set-selections.conf\r\n  when: packages_accept\r\n  register: selections_status\r\n````\r\n\r\nThank you\r\n\r\nJard"}}
{"actor":{"display_login":"zerotao"}}