Add firewall rule - best practice


#1

I'm creating a cookbook to install a web app, which require to open a firewall port tcp/9000.

The cookbook will be used on Centos/RHEL.

What is the best and easiset way to do this? Is there any built in resource for firewall management (like remote_file) to do this, or should I run firewall-cmd command?

Thanks in advance!