Skip to content

Make role::mail::smtprelay inherit ::role::mail - #95

Merged
Aman1994 merged 1 commit into
masterfrom
add-inherits-role-mail-smtprelay
Aug 28, 2026
Merged

Make role::mail::smtprelay inherit ::role::mail#95
Aman1994 merged 1 commit into
masterfrom
add-inherits-role-mail-smtprelay

Conversation

@deepak7340

Copy link
Copy Markdown
Contributor

No description provided.

@deepak7340
deepak7340 force-pushed the add-inherits-role-mail-smtprelay branch 2 times, most recently from cda13a3 to 1b93324 Compare August 27, 2026 11:49
Bring role::mail::smtprelay in line with every other role subclass, which
inherit their category class (e.g. role::db::redis inherits ::role::db).

Inheriting ::role::mail pulls in the base profile chain (::role -> ::profile
-> ::common -> common::system) and evaluates it before the role body.
common::system declared common::system::mail two ways: via the
common::system::classes list and via a direct contain. role::mail::smtprelay
then declares the same class resource-style with computed params, producing:

  Duplicate declaration: Class[Common::System::Mail] is already declared

Fix: drop common::system::mail from common::system::classes (it is now only
contained), and gate that contain on grep('role::mail::') instead of
grep('::mailcow'). The role::mail::* subroles own mail themselves - postfix
and smtprelay declare common::system::mail with their own params, mailcow
uses profile::mail::mailcow - so the base system must not also declare it.
@deepak7340
deepak7340 force-pushed the add-inherits-role-mail-smtprelay branch from 1b93324 to 64f53d3 Compare August 27, 2026 12:56
@Aman1994
Aman1994 merged commit ecb14b3 into master Aug 28, 2026
1 check passed
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