Ask Your Question

custom type: How to handle write only properties ?

asked 2017-09-06 05:22:25 -0600

uherbst gravatar image


I have a software that has write only properties (yes, indeed).

So, I can set a password for an application user, but I can't read it.

I would like to set this password with puppet (in my custom type), but

  • I can't read the password - so I cant list a good value in self.instances.
  • I could set to something like ''''', but in that case, every puppet-run will set it again with the same old value (yes, thats possible - but I do not like it)

I'm pretty sure, I'm not the first one with such an issue. How do you solved this ?


edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-09-06 23:54:45 -0600

uherbst gravatar image

I think "replace" is just an attribute for file-resources, isnt it ? My need is in my own custom-type.

But I should have a look at the file type... maybe I can get some ideas.

edit flag offensive delete link more


Ah, I didn't know what you meant by 'write only properties', I thought you meant you had information that was written to files with 'write only properties', or write only permissions.

DarylW gravatar imageDarylW ( 2017-09-07 08:22:56 -0600 )edit

answered 2017-09-06 09:34:32 -0600

DarylW gravatar image

You can set the replace attribute to false, and it will only create it if it doesn't exist, but if it does it won't take action (it will still try to manage permissions/filename if they are specified)


Whether to replace a file or symlink that already exists on the local system but whose content doesn’t match what the source or content attribute specifies. Setting this to false allows file resources to initialize files without overwriting future changes. Note that this only affects content; Puppet will still manage ownership and permissions. Defaults to true.

Valid values are true, false, yes, no.

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-09-06 05:22:25 -0600

Seen: 34 times

Last updated: Sep 06 '17