---
title: "Discussion on \"SELinux and AppArmor\" | Hashnode"
description: "Discussion on \"SELinux and AppArmor\". They both are security related technologies classified as MAC - Mandatory Access Control. SELinux was created by NSA - National Security Agency, while AppArmor become popular after it has adopted by Ubuntu Linux.\nThe main idea here is to create mecha..."
url: "https://hashnode.com/posts/selinux-and-apparmor/5ca80ecc36c6446d6c7d721b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SELinux and AppArmor](https://rodrigodelimavieira.com/selinux-and-apparmor?utm_source=hashnode&utm_medium=feed)

They both are security related technologies classified as MAC - Mandatory Access Control. SELinux was created by NSA - National Security Agency, while AppArmor become popular after it has adopted by Ubuntu Linux. The main idea here is to create mecha...

Apr 6, 2019 · rodrigodelimavieira.com  
Read the article

-   [#linux](https://hashnode.com/tag/linux)
-   [#sysadmin](https://hashnode.com/tag/sysadmin)
-   [#devops](https://hashnode.com/tag/devops)

## Written by

[Rodrigo Vieira](https://hashnode.com/@rodrigovieira)

@rodrigovieira · Curitiba, Parana, Brazil

  
[View profile](https://hashnode.com/@rodrigovieira)

#AWS #Docker #Ansible #Terraform #Python #PHP

Founder at OperacionalTI, where we help companies to migrate or to maintain their IT infrastructure on cloud. As a specialist in AWS, my focus is on meeting our client&#39;s needs through a structured approach in the - AWS Well Architected Framework - based on five pillars: operational excellence, security, reliability, performance efficiency, and cost optimization. For customers who prefer to avoid dependence - Vendor Lock-in - from AWS, we work with an infrastructure based on Hashicorp solutions: Terraform, Vault, Consul and Nomad.

## Responses 3

Markdown supported · ⌘↵ to post

[Keith Mills](https://hashnode.com/@semajkp)

[Sep 26, 2019](https://hashnode.com/posts/selinux-and-apparmor/5ca80ecc36c6446d6c7d721b/comment/5d8cb9a70d449511693cfa83)

Hello Rodrigo,

I'm quite new to AppArmor but I'm really excited to learn all that I can! I've read your article on SELinux and AppArmor. I see that you mention complain and enforce modes but not permissive mode! Does this mean that there isn't a permissive mode? Also, you mentioned AppArmor uses profiles defined in text files instead of policy managed by commands. My question is:

For SLSE 15-SP1 how would I set the mode using an Ansible task if this is possible?

This is what I have so far:

---

-   name: install selinux dependencies when selinux is installed on Debian apt: name: \['policycoreutils', 'checkpolicy', 'selinux-basics', 'python-selinux' \] state: present when: ansible\_distribution|lower == 'debian'
-   name: Set SELinux to permissive mode | RHEL selinux: policy: targeted state: permissive register: task\_result when: ansible\_distribution|lower == 'redhat'
-   name: Set SELinux to permissive mode | Debian selinux: policy: default state: permissive register: task\_result when:
    -   ansible\_selinux\_python\_present|bool
    -   ansible\_distribution|lower == 'debian'
-   name: Reboot the server and wait for it to come back up. reboot: when: task\_result is changed ...

As you can see, i don't have a task for AppArmor! If you can help me I would greatly appreciate it!
