<div dir="ltr">Hi,<div><br></div><div>Suppose I have a set of profiles, each delivering a specific service to a node. For example:</div><div><br></div><div>profile_lms - installs Logitech Media Server</div><div>profile_plex - installed plex</div><div><br></div><div>Each service requires a different set of ports to be opened on the node firewall.</div><div><br></div><div>How can I make it so that adding a profile to a node results in any firewalld::services defined in that profile being added to the same zone on the node?</div><div><br></div><div>So, suppose profile_lms looks like this:</div><div><br></div><div>class profile_lms{</div><div><div>  firewalld::service{&#39;lms&#39;:</div><div>    description =&gt; &#39;Logitech Media Server&#39;,</div><div>    ports       =&gt; [</div><div>      # Logitech Media Server</div><div>      { port =&gt; &#39;9000&#39;, protocol =&gt; &#39;tcp&#39; },</div><div>      { port =&gt; &#39;3483&#39;, protocol =&gt; &#39;tcp&#39; },</div><div>      { port =&gt; &#39;3483&#39;, protocol =&gt; &#39;udp&#39; },</div><div>      # LMS Spotify plugin</div><div>      { port =&gt; &#39;9005&#39;, protocol =&gt; &#39;tcp&#39; },</div><div>    ],</div><div>  }</div></div><div>}</div><div><br></div><div>and profile_plex looks like this:</div><div><br></div><div>class profile_plex{</div><div><div>  firewalld::service{&#39;lms&#39;:</div><div>    description =&gt; &#39;PLEX&#39;,</div><div>    ports       =&gt; [</div><div>      { port =&gt; &#39;32400&#39;, protocol =&gt; &#39;tcp&#39; },<br></div><div>    ],<br></div><div>  }</div></div><div>}</div><div><br></div><div>And on the node in question, I include those nodes like this:</div><div><br></div><div>node &#39;media_server&#39; {</div><div>  include ::profile_lms</div><div>  include ::profile_plex</div><div>}</div><div><br></div><div>I need to define the public zone, using something like:</div><div><br></div><div><div>  firewalld::zone { &#39;public&#39;:</div><div>    services =&gt; [&#39;dhcpv6-client&#39;, &#39;ssh&#39;, &#39;lms&#39;, &#39;plex&#39;],</div><div>  }</div></div><div><br></div><div>Is there someway to &quot;collect&quot; all the services defined in the various profiles and add them to the public zone? Or do I need to do this somewhat differently and, say, define a new zone for each service?</div><div><br></div><div>R.</div></div>