Init.pp not imported

Does anyone know why only the classes referenced in init.pp were imported ny foreman? The init.pp base class is missing.

Just to ensure you are not searching something like modulename::init, init.pp should provide a class modulename which should also be imported.

Typically if a class gets not imported it is because of syntax errors as Foreman is checking it before providing import for the class.

Thanks for this. i already checked that. The other classes are showing up on foreman but the init.pp or main manifest isn’t.

the modules works file locally i.e. test machine. which i think rules out any syntax error.

my module is called: arc_berry_retention_service. my init file is constructed like this:-

class arc_berry_retention_service

    $root_dir = 'E:\berry_retention_service'
    $client_id = 'berry'

    $service_user = 'dstoutput\arc_berry'
    $service_password = '125263ert'
    # SQL Database
    $foo = 'xxx'
    $bar= 'xxx'
include arc_berry_retention_service::directories
include arc_berry_retention_service::services
include arc_berry_retention_service::config

thanks in advance.

Are you sure it’s in the right module layout? Foreman calls the Puppet server REST API to see which classes are available. If the Puppet server can’t find them, it’s likely something in your code or where it’s placed.

Thanks for getting back. The structure is like below. It all works locally. In regards to where there are placed, r10k syncs the project from gitlab to the linux box. The code on the Linux box looks exactly the same as my local test machine.

│ └───classes

Perhaps if I wasn’t clear from the beginning, other classes in the module are showing on Foreman, only the main class isn’t showing. And because other classes reference variables in the main class - they are not working. So on foreman, I am only seeing the following classes but not the main (arc_berry_retention_service):


can you run a puppet validate against your class as it is seen on the puppet master itself? also - bounce the puppetmaster to be 100% sure it’s not a caching issue…

I’ve seen foreman not load a class from time to time - but it’s always because someone ignored the jenkins job failure, and merged with a syntax error (yes, i should block this as even being possible…). if there is a syntax error - puppet doesn’t list it in its REST interface as a valid class - and so foreman cannot see/import it…