Sha256: d241107bc61ddd1f3ca4e335e12989495d546aeec895d04197f94d6fed1b7f79

Contents?: true

Size: 827 Bytes

Versions: 6

Compression:

Stored size: 827 Bytes

Contents

test_name "Stop firewall" do
  skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
  hosts.each do |host|
    case host['platform']
    when /debian/
      result = on(host, 'which iptables', accept_all_exit_codes: true)
      if result.exit_code == 0
        on host, 'iptables -F'
      else
        logger.notify("Unable to locate `iptables` on #{host['platform']}; not attempting to clear firewall")
      end
    when /fedora|el-7/
      on host, puppet('resource', 'service', 'firewalld', 'ensure=stopped')
    when /el-|centos/
      on host, puppet('resource', 'service', 'iptables', 'ensure=stopped')
    when /ubuntu/
      on host, puppet('resource', 'service', 'ufw', 'ensure=stopped')
    else
      logger.notify("Not sure how to clear firewall on #{host['platform']}")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
beaker-puppet-1.14.0 setup/common/025_StopFirewall.rb
beaker-puppet-1.13.0 setup/common/025_StopFirewall.rb
beaker-puppet-1.12.0 setup/common/025_StopFirewall.rb
beaker-puppet-1.11.0 setup/common/025_StopFirewall.rb
beaker-puppet-1.10.0 setup/common/025_StopFirewall.rb
beaker-puppet-1.9.0 setup/common/025_StopFirewall.rb