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
349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/beaker/host_prebuilt_steps.rb', line 349 def disable_se_linux host, opts logger = opts[:logger] block_on host do |host| if /centos|el-|redhat|fedora/.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 |