Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Hiera support for postfix::config, postfix::hash, postfix::transport and postfix::virtual #50

Closed
wants to merge 1 commit into from

Conversation

baurmatt
Copy link

This PR adds support for Hiera. Some dependency were removed since Puppet throw dependency cycle errors:

Class['postfix']

I not really sure if this will throw errors in some edge cases, i found none in my tests.

Class['postfix'] -> Postfix::Hash <| |>

No longer needed since dependency to class{ 'postfix': } is managed in hash.pp


create_resources('postfix::config', $configs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create_resources should be done in postfix::config class

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be done in postfix::config since this is define type... My proposed way is the recommend way to implement hiera support.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right, not in postfix::config, in postfix::files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But thats not the way other module work. I just want to do 'include postfix' and everything else is done in hiera. If i would implemented it that way you suggest, i would also need to do 'include postfix::files'. I don't see any benefit here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, postfix::files is included in init, so no need to include it afterwards.
Keep the params to init class like you did, but create the resources in postfix::files instead of in init this should fix the cyclic dependency.

@raphink
Copy link
Member

raphink commented Oct 20, 2014

@baurmatt Any news on this PR?

@raphink
Copy link
Member

raphink commented Mar 18, 2015

Will close this issue as no news have been provided in over 9 months.

@raphink raphink closed this Mar 18, 2015
@ubellavance
Copy link

@raphink What's the state of this PR. Does it need code or just testing? It would be very nice to have a postfix module that is entirely hiera-compatible.

@ubellavance ubellavance mentioned this pull request Oct 18, 2016
@lingfish
Copy link

lingfish commented Nov 9, 2016

I agree... it was 90% there, not sure why the authors didn't just finish it off?

@ploeghvander
Copy link

Is there any development going on in this module? It looks quite dead.

@baurmatt
Copy link
Author

baurmatt commented Oct 4, 2017

I switched to https://github.com/thias/puppet-postfix

@ploeghvander
Copy link

ok. hmm last update 2 years ago

@baurmatt
Copy link
Author

baurmatt commented Oct 4, 2017

Better than 4 years, right? ;) I'm still using it for my server and it works so far. Hope thias might consider moving the module to Voxpupuli (thias/puppet-postfix#116)

@lingfish
Copy link

lingfish commented Oct 4, 2017

I've moved to Ansible :)

@mcanevet
Copy link
Member

mcanevet commented Oct 5, 2017

The latest release of this module was done a month ago so it's obviously not dead.

@finalhow
Copy link

finalhow commented Jul 19, 2019

I realize this issue is closed, but is there an example on how one can configure main.cf through postfix::files using Hiera?

@ubellavance
Copy link

@raphink could you re-open this issue? What does this PR needs?

Would you agree on moving this module to voxpupuli if you don't have much time for it anymore?

@finalhow I'm no expert, but here's what I did to enable hiera for some configs for the posgresql module'

  $configs=hiera('postgresql::server::config_entry', {})
  create_resources('postgresql::server::config_entry', $configs)

Then, I set the values I wanted this way:

postgresql::server::config_entry:
  max_wal_senders:
    value: '2'

  wal_level:
    value: 'hot_standby'

  archive_mode:
    value: 'on'

If I underestand correctly how it works, if you can set variables values in manifests, you can set variables values in hiera, once you've added the 2 lines above where you call your class (you'll obviously won't use the same names as me because it's not for the same context).

@finalhow
Copy link

@ubellavance Thanks, I will give that a try.

@ubellavance
Copy link

@finalhow if you need help, just post your config and I'll try to help.

@raphink raphink reopened this Aug 15, 2019
@raphink
Copy link
Member

raphink commented Aug 15, 2019

@ubellavance I reopened the issue, but you have commit rights on the reporter's branch I guess, so it might still require to open a new one.

@raphink
Copy link
Member

raphink commented Oct 2, 2020

@ubellavance any news?

@stale
Copy link

stale bot commented Apr 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 19, 2021
@stale stale bot closed this Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants