Puppetforge Selinux Module Not Working

14 views
Skip to first unread message

Dan Crisp

unread,
Oct 7, 2019, 1:58:41 PM10/7/19
to Puppet Users
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.com
Info: 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.


Becca Robinson

unread,
Oct 7, 2019, 7:43:33 PM10/7/19
to puppet...@googlegroups.com
I do not see examples of that use case in the docs.
Please review https://forge.puppet.com/puppetlabs/selinux_core to validate your code against examples.

-- 
Becca Robinson


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/cb7dd9d8-d0ac-41ba-bfa8-d3316259bc2d%40googlegroups.com.

Dan Crisp

unread,
Oct 7, 2019, 7:54:24 PM10/7/19
to Puppet Users
Hello Becca,

Thanks for the reply.

Refer here to what I'm attempting to achieve:


At this point, I simply want to put Selinux into the permissive state.  I'm not yet in the position to start managing Selinux content etc. via the link you provided.

Thanks,
Dan.


To unsubscribe from this group and stop receiving emails from it, send an email to puppet...@googlegroups.com.

Dan White

unread,
Oct 7, 2019, 9:57:55 PM10/7/19
to puppet...@googlegroups.com
That  example is found here:

I think you need puppet-selinux 

—————————————————————————————————-

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."

Bill Waterson (Calvin & Hobbes)


On Oct 7, 2019, at 3:43 PM, Becca Robinson <rebecca....@puppet.com> wrote:



Rebecca Robinson

unread,
Oct 7, 2019, 11:48:00 PM10/7/19
to puppet...@googlegroups.com
Yeah you are referring to the instructions of one module while trying to use another.  

puppetlabs/selinux_core != puppet/selinux




Dan Crisp

unread,
Oct 10, 2019, 10:51:21 AM10/10/19
to Puppet Users
Much appreciated Becca for pointing my mistake out.
Reply all
Reply to author
Forward
0 new messages