Results 1 to 2 of 2

Thread: SLES Set to Permissive Mode

  1. #1
    Join Date
    Sep 2019
    Location
    Houston, TX
    Posts
    4

    SLES Set to Permissive Mode

    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
    ...
    Ansible Version:

    Code:
    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:

    Code:
    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!

  2. Re: SLES Set to Permissive Mode

    I guess you can disable/stop the apparmor service.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •