Search code examples
puppetselinux

Puppet semodule: how to add a .te file?


I'm using https://forge.puppetlabs.com/spiette/selinux

In site.pp for a node where I want the module installed I have:

selinux::module { "varnishlnkfile":
  ensure => "present",
  source => "puppet:///modules/selinux/modules",
}

and I'm getting:

err: /File[/varnishlnkfile.te]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/selinux/varnishlnkfile.te at /etc/puppet/modules/selinux/manifests/module.pp:52

I found this GitHub issue https://github.com/spiette/puppet-selinux/issues/5 but following it does not change anything.

The .te file is in:

/etc/puppet/modules/selinux/varnishlnkfile.te

Earlier it was in:

/etc/puppet/modules/selinux/modules/varnishlnkfile.te

and the error message was the same.


Solution

  • The correct URL for the agent to retrieve /etc/puppet/modules/selinux/varnishlnkfile.te is

    puppet:///modules/selinux/varnishlnkfile.te
    

    For /etc/puppet/modules/selinux/modules/varnishlnkfile.te it's

    puppet:///modules/selinux/modules/varnishlnkfile.te
    

    The error does not seem to relate to the manifest you pasted. If this doesn't help, please clean up your question with one consistent set of information.