Skip to content

Commit

Permalink
Add saltstack sls for RHEL
Browse files Browse the repository at this point in the history
  • Loading branch information
retspen committed Dec 20, 2013
1 parent 4fa5448 commit 74e22b3
Show file tree
Hide file tree
Showing 5 changed files with 871 additions and 0 deletions.
50 changes: 50 additions & 0 deletions conf/saltstack/centos_rhel/salt/libvirt/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
qemu-kvm:
pkg.installed

libvirt:
pkg.installed

/etc/libvirt/libvirtd.conf:
file.managed:
- user: root
- group: root
- mode: 644
- source: salt://libvirt/libvirtd.conf
- require:
- pkg: libvirt

/etc/libvirt/qemu.conf:
file.managed:
- user: root
- group: root
- mode: 644
- source: salt://libvirt/qemu.conf
- require:
- pkg: qemu-kvm

/etc/sysconfig/iptables:
file.managed:
- user: root
- group: root
- mode: 644
- source: salt://libvirt/iptables

iptables:
service:
- dead
- running

libvirtd:
service:
- running
- enable: True

ksm:
service:
- running
- enable: True

ksmtuned:
service:
- running
- enable: True
20 changes: 20 additions & 0 deletions conf/saltstack/centos_rhel/salt/libvirt/iptables
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5930 -j ACCEPT
#-A INPUT -m state --state NEW -m tcp -p tcp --dport 6800 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 16509 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -i br0 -o br0 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Loading

0 comments on commit 74e22b3

Please sign in to comment.