Host / Classes management

Hello everybody,

I'm new with Foreman and i already installed 1.3. I read documentation …

And I have a question about host / classes assignment :

=> how dynamically assign some classes / modules to hosts / hosts groups
based on regex or facts ?

I played a little with Hiera and it is possible to create a hierarchy based
on environment / fqdn / other facts etc …

I know there is site.pp (or nodes.pp) where we can create entries for a
single host or a group host based on regex.

But is it possible with ENC foreman, is it possible to have this mechanism
with Smart Variables (I understand not !?) ?

Thank's for your answer.

PS : I have approximately 3000 hosts (~ 1000 in production), so I would
like to automate hosts classification and classes / modules assignment …