How to open port?

Miroslav Suchý msuchy at redhat.com
Mon Feb 2 14:59:15 UTC 2015


How do we open ports in ansible today?

I want to open port 5672 for 172.24.0.10/24. Currently it is open only to:

[root at fed-cloud09 ~]# iptables-save |grep 5672
-A INPUT -s 209.132.184.9/32 -p tcp -m multiport --dports 5671,5672 -m comment --comment "001 amqp incoming
amqp_209.132.184.9" -j ACCEPT

So I done this change:

diff --git a/inventory/host_vars/fed-cloud09.cloud.fedoraproject.org
b/inventory/host_vars/fed-cloud09.cloud.fedoraproject.org
index 2559de1..4a96e81 100644
--- a/inventory/host_vars/fed-cloud09.cloud.fedoraproject.org
+++ b/inventory/host_vars/fed-cloud09.cloud.fedoraproject.org
@@ -1,2 +1,3 @@
 ---
 root_auth_users:  msuchy
+tcp_ports: [ 80, 443, 5672 ]

But it have no effect (yes, I run the playbook again).
What is our best practice now and where I made mistake?

-- 
Miroslav Suchy, RHCE, RHCDS
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys


More information about the infrastructure mailing list