theforeman / foreman_expire_hosts

Foreman plugin for limiting host lifetime
GNU General Public License v3.0
5 stars 12 forks source link

Notifications are sent separatelly per owner on hosts with multiple owners. #12

Closed vladimirsafronov1251 closed 7 years ago

vladimirsafronov1251 commented 7 years ago

Hello guys, We are working on configuration that mentioned in #9 , For hosts that used for team work, we use usergroups mapped from Active Directory as owners, so that hosts have multiple owners. Foreman returns them in node YAML as: owner_name: Usergroup_name owner_email:

timogoebel commented 7 years ago

@vladimirsafronov1251: Do I understand you correctly, that when a host has e.g. two owners (let's say username1@company.com and username2@company.com) that not two E-Mails are sent but just one that has both addresses in the To field? Or do you just want to send an E-Mail to only the first owner of the host?

Would a global E-Mail address help you as well? So only one notification is sent to the e-mail address of the Jira queue?

vladimirsafronov1251 commented 7 years ago

@timogoebel , thanks for quick reply. Yes, exactly: when we set host_expiry_email_recipients setting in UI, we currently have two emails: to username1@company.com, jira@company.com and to username2@company.com, jira@company.com, but would like one email instead: to username1@company.com, username2@company.com, jira@company.com.

As for global E-Mail, could you please clarify how do you see it? Because questions like: "how to track and group messages regarding stopping and deleting - they should have some unique message_group_id, or issue id but where to get it?" arose in my head. I think, just single email would be enough on first steps and will give more time to think on more complex questions.

timogoebel commented 7 years ago

@vladimirsafronov1251: I see. This should be fixed in https://github.com/theforeman/foreman_expire_hosts/pull/11.