Override class parameters using inheritence

asked 2019-01-22 03:01:43 -0600

Hello everyone! I already have a class with a list of parameters along with their default values. Those parameters are referenced in template (.erb) files.

Roughly, the structure is the below:

  • module folder for class X
    • manifests
      • init.pp
    • templates
      • template1.erb
      • template2.erb

Assuming I wish to create a new module/class (let's call it Y) that inherits all properties of class X and overrides the value of a specific parameter, will I be able to do so by using the 'include' keyword?

If that is the case, then will I be able to re-use the templates under the parent class X or do I need to have a distinct copy of them?

edit retag flag offensive close merge delete