# SLES Set to Permissive Mode

**URL:** <https://forums.suse.com/t/sles-set-to-permissive-mode/34386>\
**Category:** SLES Configure-Administer\
**Created:** [September 23, 2019, 5:36pm UTC](https://forums.suse.com/t/sles-set-to-permissive-mode/34386 "2019-09-23T17:36:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![semajkp](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@semajkp](https://forums.suse.com/u/semajkp)\
**Post date:** [September 23, 2019, 5:36pm UTC](https://forums.suse.com/t/sles-set-to-permissive-mode/34386/1 "2019-09-23T17:36:43Z")

</div>

Happy Monday All,

I’m working on a task to set SELinux to permissive mode for RHEL/Debian and to set Apparmor to permissive mode for SLES15/12/11. I have my code in place for SELinux but I don’t know what to do for SLES! This is what I have:

[CODE]—

- 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  
…[/CODE]

Ansible Version:

`ansible 2.8.4
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jamekeit/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]`

Controller Machine OS:

`NAME="Red Hat Enterprise Linux Server"
VERSION="7.5 (Maipo)"
ID="rhel"`

Pointers will be greatly appreciated!

Can anyone help me out with setting apparmor to permissive for SLES?

I’m totally stuck!

---

<div class="post-metadata">

**Author:** ![strahil-nikolov-dxc](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@strahil-nikolov-dxc](https://forums.suse.com/u/strahil-nikolov-dxc)\
**Post date:** [September 26, 2019, 7:54am UTC](https://forums.suse.com/t/sles-set-to-permissive-mode/34386/2 "2019-09-26T07:54:35Z")

</div>

I guess you can disable/stop the apparmor service.
