Hi, reading the README of shorewall community
cookbok[1] it says that you can declare rules by:
- Doing node.override[:shorewall][:rules] <<
{<rulehash>} on recipes.
- A library helper method add_shorewal_rules() that wil
<< on rules attribute also.
I have tested that doing that "append" on override
attributes, template does not need lazy attributes. I dont
know why, but it works, even if you add a rule later on the
runlist, on an apache2_app recipe to open 8080.
I wanted to make an LWRP to declare rules on an
idempotentially way, but you cant modify attributes on
providers. At least those modifications are not available when
template renders..
My questions:
- ¿Is this the right way of defining attributes with that
override << stuff?
- ¿Is there any pattern for that situation where your
application cookbook should open a port on the firewall and
you du it by adding a shorewall rule? Attributes and then
render to template sounds good but that override << is
an ungly thing :S
Thanks in advance guys!
--
Si necesitas una máquina para hacer algo y no la compras
al final te darás cuenta de que has pagado lo mismo y no
tienes la máquina.--Henry Ford
Alberto