Alberto
Hello,
I didn't like that way node.override[:shorewall][:rules] << {<rulehash>}. Have a look at my cookbook with an already formed view onto attributes and their usage. Long time ago it was based on community one, but since it has changed a lot.
https://github.com/dennybaa/shorewall
Regards,
Denis
On 18/02/14 22:04, aL. wrote:
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 FordAlberto
Archive powered by MHonArc 2.6.16.