ginsys/ansible-plugins — pull request #5 by jcassee (2013-10-23 22:42:46+00:00)
Title: Work around debconf booleans in dpkg_reconfigure

To enable Ubuntu unattended upgrades I use this Ansible task:

```yaml
- name: Enable unattended security updates
dpkg_reconfigure:
pkg: unattended-upgrades
answers:
unattended-upgrades/enable_auto_updates: yes
```

This task will always show as changed.

I traced it to a problem with the way booleans handled: `debconf-show` uses `true` and `false`, while `dpkg-reconfigure` uses `yes` and `no`. Another problem is that in playbooks a plain `yes` or `no` is converted into a Python boolean.

This pull request fixes both problems.