Ensure apparmor is running before reloading

The 'Reload apparmor' handler can fail if the apparmor service is not
already in a running state. Add an additional handler to ensure that
apparmor is started and enabled on boot.

Change-Id: If2752d69beb2c646a64f2ca02ce39a0d4161a5b5
This commit is contained in:
Jimmy McCrory 2016-11-04 09:21:06 -07:00
parent b183a3d5fc
commit 3f0c8f642f
2 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Start apparmor
service:
name: "apparmor"
enabled: yes
state: "started"
- name: Reload apparmor
service:
name: "apparmor"

View File

@ -49,6 +49,7 @@
group: "root"
mode: "0644"
notify:
- Start apparmor
- Reload apparmor
tags:
- lxc-files