Restore #6484 (YAML lists in apt) reverted by c751168.

It looks like my change in #6484 to add support for native YAML lists to the `package` parameter of the `apt` module was reverted in c751168 by @jctanner. Since it wasn't mentioned in the commit message I'm assuming the reversion was accidental, so I'm re-submitting the change.