Created
May 13, 2014 15:50
-
-
Save iamjohnnym/82a9570a5e96b4e3f305 to your computer and use it in GitHub Desktop.
Revisions
-
ecko created this gist
May 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ - name: Setup default firewall rules command: "/sbin/iptables -I INPUT 1 -p tcp -m tcp -m comment --comment '{{item.type}}' --dport {{item.port}} -j ACCEPT" with_items: - {'type':'SSH', 'port':22} - {'type':'HTTP', 'port':80} - {'type':'HTTPS', 'port':443} when: ansible_os_family == 'RedHat' - name: Setup default firewall rules command: ufw allow {{item}} with_items: - 22 - 80 - 443 when: ansible_os_family == 'Debian'