Sha256: 33af5380e1d18f6a1954d407c5dcb3cd70c4c3a651b8b8923dd958d0fcd28a56
Contents?: true
Size: 1.4 KB
Versions: 44
Compression:
Stored size: 1.4 KB
Contents
# # Cookbook Name:: mu-glusterfs # Recipe:: samba # # Copyright 2014, eGlobalTech # # All rights reserved - Do Not Redistribute # ::Chef::Recipe.send(:include, Chef::Mixin::ShellOut) case node['platform'] when "centos" include_recipe "mu-glusterfs" # %w{samba-vfs-glusterfs samba-client samba}.each do |pkg| # package pkg # end %w{samba4 samba4-client samba4-winbind samba4-winbind-clients samba4-winbind-krb5-locator}.each { |pkg| package pkg } service "smb" ["137", "139", "445"].each { |port| bash "Allow #{port} through iptables" do user "root" not_if "/sbin/iptables -nL | egrep '^ACCEPT.*dpt:#{port}($| )'" code <<-EOH iptables -I INPUT -s 10.0.0.0/8 --dport #{port} -j ACCEPT service iptables save EOH end } directory "/etc/samba/includes" template "/etc/samba/includes/smb.gluster.conf" do source "smb.conf.erb" owner "root" group "root" mode 0644 cookbook "mu-glusterfs" notifies :restart, "service[smb]", :immediately end execute "setsebool -P samba_run_unconfined on" do not_if "getsebool samba_run_unconfined | grep ' on$'" end execute "setsebool -P samba_export_all_rw on" do not_if "getsebool samba_export_all_rw | grep ' on$'" end directory "/run/samba" else Chef::Log.info("Unsupported platform #{node['platform']}") end
Version data entries
44 entries across 44 versions & 1 rubygems