Ask Your Question
0

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

Hi,

How do I apply the following manifest to all nodes?

node 'mynode' {


  file{'/info.txt':
    ensure  =>  'present',
    content  =>  inline_template("Created by Puppet at <%= Time.now %>\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
0

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

stivesso gravatar image

Hi LiteGamer,

The following thread already provides the best answer to your question: https://ask.puppet.com/question/14550...

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

Stats

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

Seen: 57 times

Last updated: Nov 06