Ask Your Question

How do I set Selinux to permissive

asked 2017-11-06 06:41:03 -0600

updated 2017-11-06 14:11:24 -0600

DarylW gravatar image


How do I apply the following manifest to all nodes?

node 'mynode' {

    ensure  =>  'present',
    content  =>  inline_template("Created by Puppet at <%= %>\n"),

  exec { "Selinux in permissive mode":
    command => "/usr/sbin/setenforce 0",
    unless => "/usr/sbin/getenforce |grep Permissive",

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-11-06 14:26:03 -0600

stivesso gravatar image

Hi LiteGamer,

The following thread already provides the best answer to your question:

Also, related to the code you used to set selinux in permissive mode, I am strongly advising that you make use of the puppet forge selinux module instead of using exec. Below is what your code will look like :

class { selinux:
  mode => 'disabled',
  type => 'targeted',
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-11-06 06:12:00 -0600

Seen: 167 times

Last updated: Nov 06 '17