How to get facts about firewall type?

13 views
Skip to first unread message

Андрей Круглов

unread,
May 18, 2016, 4:59:48 PM5/18/16
to Ansible Project
Hi,

I have a lot of centos7 webservers with firewalld onboard and a lot of centos7 webservers with iptables onboard and i need to write role webserves, some parts are differ to different firewall type.

Is a simple way to get fact about firewall presence (installed or not) and its type (firewalld/iptables) or i need to input this info manually into variables?

Matt Davis

unread,
May 18, 2016, 6:44:47 PM5/18/16
to Ansible Project
Doesn't work that way today, but that sounds like an awesome enhancement to the facts module... #lowhangingfruit

Johannes Kastl

unread,
May 19, 2016, 4:19:03 AM5/19/16
to ansible...@googlegroups.com
On 19.05.16 00:44 Matt Davis wrote:
> Doesn't work that way today, but that sounds like an awesome enhancement to
> the facts module... #lowhangingfruit

+1

But using a pre-task testing for /etc/firewalld, systemctl status
firewalld or /etc/sysconfig/iptables-config should do the trick...

Johannes



signature.asc
Reply all
Reply to author
Forward
0 new messages