Ask Your Question

remove statements/resources from a class without to touch the original module

asked 2017-06-01 16:50:26 -0500

minimike gravatar image

updated 2017-06-01 17:01:26 -0500

Hi there

In a class for example designate::keystone::authtoken are some resources they will be used as default by calling this class. For example:

$auth_uri = 'http://localhost:5000',
$auth_url = 'http://localhost:35357',

On my setup I don't need these settings or rewrite values of these settings but puppet writes it because It's a default with default values from these class, in the configuration of my node. What would break my setup later.

result after puppet-run on my node:

auth_host =
auth_port = 35357
auth_protocol = http
project_name = services
username = designate
password = something_secret
project_domain_id = default
user_domain_id = default
auth_type = password 

but it should be:

auth_host =
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = designate
admin_password = something_secret

So I would like to ask what would been an elegant way to remove stuff in resoucres from classes without to touch the files inside the module? Write an class using in profiles, copy the whole class and rewrite it and remove the unwanted stuff?

cheers Darko

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-02 10:38:44 -0500

DarylW gravatar image

The isn't an elegant way to do it in puppet. The general consensus is to design the modules so you can 'turn off' things that you don't need, or submit PR's upstream to the original modules to add that functionality. Sometimes it comes from a difference of philosophy... managing an entire config file via a template vs using something like Augeas to replace/ensure individual config entries line by line.

I'm not sure which module you are specifically talking about, but I know that any modules under the voxpupuli namespace are pretty easy to get changes for. the Voxpupuli team (usually available in the #voxpupuli channel on the freenode irc server) can help you make a good PR against their modules, and get them merged (if they own them). They could possibly help you with a well structured PR for other modules, but if they don't control the repos, there's not much they can do toward getting it merged.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-06-01 16:50:26 -0500

Seen: 34 times

Last updated: Jun 02