Jira (PUP-9301) Reduce noise from notify resource

4 views
Skip to first unread message

Daniel Parks (JIRA)

unread,
Nov 2, 2018, 12:35:02 AM11/2/18
to puppe...@googlegroups.com
Daniel Parks created an issue
 
Puppet / Improvement PUP-9301
Reduce noise from notify resource
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2018/11/01 9:34 PM
Labels: customer0
Priority: Normal Normal
Reporter: Daniel Parks

Currently the notify resource produces a lot of extra output in --test:

Notice: User['kfj'] not created because they don't have a password.
Notice: /Stage[main]/Virtual::Users/Account::User[kfj]/Account::User::Windows[kfj]/Notify[User['kfj'] not created because they don't have a password.]/message: defined 'message' as 'User[\'kfj\'] not created because they don\'t have a password.'

That outputs the message three times. I can reduce that slightly by setting the title to something else, but then I have to be careful to use a unique title.

It would be awesome if it just outputted the message once. Or, if it outputted the message once and the title once — that would be worth it for certain messages.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Nov 2, 2018, 1:23:02 PM11/2/18
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-9301
 
Re: Reduce noise from notify resource

I think those messages are coming from the accounts module you're using. Puppet itself doesn't emit those messages.

Daniel Parks (JIRA)

unread,
Jan 17, 2019, 3:35:04 AM1/17/19
to puppe...@googlegroups.com
Daniel Parks commented on Improvement PUP-9301

The issue is with notify in general:

❯ puppet apply -e 'notify { "boo": }'
Notice: Compiled catalog for marla.local in environment production in 0.01 seconds
Notice: boo
Notice: /Stage[main]/Main/Notify[boo]/message: defined 'message' as 'boo'
Notice: Finished catalog run in 0.01 seconds

Note that it outputs “boo” three times.

I think a decent solution would be a function that does this. It would output in --test mode, but it wouldn't create a resource, so it would have the extra noise, and it wouldn't register as a change in the report.

I'll be tracking this from my community account Daniel Parks after 1/31.

Josh Cooper (JIRA)

unread,
Jun 19, 2019, 2:22:04 PM6/19/19
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-9301

There is a notice server function which does what you want when running puppet apply. But I think you're wanting a client side function, which is best handled using Deferred. See https://puppet.com/docs/puppet/6.5/write_a_puppet_function_to_store_secrets.html. That said we can't change how notify so I'm going to close this.

Reply all
Reply to author
Forward
0 new messages