Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Replace deprecated create_resources() with native puppet#236

Open
bastelfreak wants to merge 1 commit into
voxpupuli:mainfrom
bastelfreak:create
Open

Replace deprecated create_resources() with native puppet#236
bastelfreak wants to merge 1 commit into
voxpupuli:mainfrom
bastelfreak:create

Conversation

@bastelfreak

Copy link
Copy Markdown
Member

create_resources() is a legacy pattern. It messes with the ordering in the catalog. We can replace it with native puppet code.

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@bastelfreak bastelfreak self-assigned this Nov 13, 2025
@bastelfreak bastelfreak force-pushed the create branch 2 times, most recently from d53cbd4 to 1e37334 Compare November 13, 2025 20:55
create_resources() is a legacy pattern. It messes with the ordering in
the catalog. We can replace it with native puppet code.
@kenyon kenyon changed the title Replace deprecated create_resources() with native puppet Replace deprecated create_resources() with native puppet Nov 13, 2025
Comment thread manifests/init.pp
create_resources(powerdns::config, $powerdns_auth_config, $powerdns_auth_defaults)
$powerdns_auth_config.each |$conf_title, $data| {
powerdns::config { $conf_title:
* => $data + { 'type' => 'authoritative' },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't $data override the defaults?

Suggested change
* => $data + { 'type' => 'authoritative' },
* => { 'type' => 'authoritative' } + $data,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good idea. I need to check how create_resources() merged it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The third argument to create_resources is the defaults hash: https://help.puppet.com/core/8/Content/PuppetCore/Markdown/function.htm#create_resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants