Guest User

Untitled

a guest
Jul 15th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. I want to be able to do something like this:
  2.  
  3. $priority = 100
  4. $chain = ['FOO', 'BAR']
  5. iptables::filter{ "$priority-mysqld-$name":
  6. dport => '3306',
  7. state => 'new',
  8. protocol => 'tcp',
  9. jump => $chain,
  10. }
  11.  
  12. And, in iptables::filter, do something like:
  13.  
  14. for $chain in $jump {
  15. include iptables::chain::$chain
  16. file { "$name-$chain":
  17. content => template("iptables/filter.erb"),
  18. notify => Exec[rebuild_iptables],
  19. }
  20.  
  21. }
  22.  
  23. ie. include a pre-existing chain class and create an iptables fragment for each value in the $jump array.
  24.  
  25. Any idea how I might do this?
Add Comment
Please, Sign In to add comment