Hello all,
I've download the selinux module from Puppet forge:
puppet module list
/etc/puppetlabs/code/environments/production/modules
└── fixnetix-base (v0.1.0)
/etc/puppetlabs/code/modules
├── puppetlabs-selinux_core (v1.0.2)
└── puppetlabs-stdlib (v6.1.0)
/opt/puppetlabs/puppet/modules (no modules installed)
# ll /etc/puppetlabs/code/modules
total 16
drwxr-xr-x. 4 root root 4096 Oct 3 15:38 ./
drwxr-xr-x. 4 root root 4096 Oct 4 12:29 ../
drwxr-xr-x. 6 root root 4096 Aug 14 07:55 selinux/
drwxr-xr-x. 10 root root 4096 Sep 26 16:17 stdlib/
I created a manifest like so:
# cat /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
class base::selinux {
class { selinux:
mode => 'permissive',
type => 'targeted',
}
}
Perms etc. all look good:
# ll /etc/puppetlabs/code/environments/production/modules
total 16
drwxr-xr-x. 4 root root 4096 Oct 4 11:48 ./
drwxr-xr-x. 5 root root 4096 Sep 27 10:40 ../
drwxr-xr-x. 10 root root 4096 Oct 4 11:48 base/
# ll /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
-rw-r--r--. 1 root root 242 Oct 7 13:47 /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
However, the agent is failing:
# puppet agent --no-daemonize --verbose --onetime
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class selinux (file: /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp, line: 9, column: 5) on node
lhcadvdeveye05.comInfo: Using cached catalog from environment 'production'
Info: Applying configuration version '1570455621'
Notice: Applied catalog in 1.22 seconds
Any help here would be appreciated.
Thanks,
Dan.