There are many ways to turn on the unattended upgrades in Ubuntu. Creating files in /etc/apt/apt.conf.d, reconfiguring the package by hand, reinstalling after debconf, etc.
Here’s a simple way to do it with salt without breaking the Ubuntu / debconf integration:
unattended-upgrades:
debconf.set:
- data:
'unattended-upgrades/enable_auto_updates':
type: boolean
value: "true"
cmd.wait:
- name: "dpkg-reconfigure unattended-upgrades"
- watch:
- debconf: unattended-upgrades
- env:
DEBIAN_FRONTEND: noninteractive
DEBCONF_NONINTERACTIVE_SEEN: "true"