Install fails, needs AppArmor compatibility patch

Problem

Installation fails, with this failure message:

TASK [edxapp : code sandbox | (bootstrap) load code sandbox profile] ***********
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["apparmor_parser", "-r", "/etc/apparmor.d/code.sandbox"], "delta": "0:00:00.002615", "end": "2017-06-14 17:56:05.877917", "failed": true, "rc": 1, "start": "2017-06-14 17:56:05.875302", "stderr": "Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)\nWarning: unable to find a suitable fs in /proc/mounts, is it mounted?\nUse --subdomainfs to override.", "stdout": "", "stdout_lines": [], "warnings": []}


Solution

This problem occurs on Linode machines using a custom kernel.  If you select to use a generic kernel instead, the problem is solved.