Method: Beaker::HostPrebuiltSteps#disable_se_linux
- Defined in:
- lib/beaker/host_prebuilt_steps.rb
#disable_se_linux(host, opts) ⇒ Object
Disable SELinux on centos, does nothing on other platforms
408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/beaker/host_prebuilt_steps.rb', line 408 def disable_se_linux host, opts logger = opts[:logger] block_on host do |host| if /centos|el-|redhat|fedora|eos/.match?(host['platform']) logger.debug("Disabling se_linux on #{host.name}") host.exec(Command.new("sudo su -c \"setenforce 0\""), { :pty => true }) else logger.warn("Attempting to disable SELinux on non-supported platform: #{host.name}: #{host['platform']}") end end end |