You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to set the contents of a config file in a custom module utilizing the functionality this module provides. In order to be able to see directly what configuration file are written by puppet, I usually put a header such as #managed by puppet on the first line of the configuration file.
Describe the Solution You Would Like
I would like to have a header ini_setting that allows me to set this comment on the beginning of a file.
So that it looks like this or something similar:
In addition to using the inifile::create_ini_settings I use for actually writing the rest of the configuration file.
However this does put the comment in the beginning of the file. Rather it always puts the comment on the last line (which is not really helping when considering long configuration files.)
This behaviour seems independent of the positioning of the comment-ini_setting in the code (bevore or after using the function)
Additionally this brakes idempotency in the latest puppetforge version, as fixed by #483 (is there a release planned in the near future to push this change?)
Additional Context
I guess this touches a bit on #72, but as this was never resolved I wanted to reopen the discussion.
I am not sure how I would be able to influence the order of the sections.
I did look into implementing child providers. I guess my solution is somewhere there? But then we maybe can improve the documentation with a working example of such a use case? I would guess I am not the only one who would appreciate the possibility to provide a header :)
Let me know your thoughts on this :)
The text was updated successfully, but these errors were encountered:
Use Case
I am trying to set the contents of a config file in a custom module utilizing the functionality this module provides. In order to be able to see directly what configuration file are written by puppet, I usually put a header such as
#managed by puppet
on the first line of the configuration file.Describe the Solution You Would Like
I would like to have a header ini_setting that allows me to set this comment on the beginning of a file.
So that it looks like this or something similar:
Describe Alternatives You've Considered
I tried so manually do this with:
In addition to using the
inifile::create_ini_settings
I use for actually writing the rest of the configuration file.However this does put the comment in the beginning of the file. Rather it always puts the comment on the last line (which is not really helping when considering long configuration files.)
This behaviour seems independent of the positioning of the comment-ini_setting in the code (bevore or after using the function)
Additionally this brakes idempotency in the latest puppetforge version, as fixed by #483 (is there a release planned in the near future to push this change?)
Additional Context
I guess this touches a bit on #72, but as this was never resolved I wanted to reopen the discussion.
I am not sure how I would be able to influence the order of the sections.
I did look into implementing child providers. I guess my solution is somewhere there? But then we maybe can improve the documentation with a working example of such a use case? I would guess I am not the only one who would appreciate the possibility to provide a header :)
Let me know your thoughts on this :)
The text was updated successfully, but these errors were encountered: