Ask Your Question

Puppet: Unable to find role from puppet console

asked 2017-10-21 12:48:20 -0600

raja gravatar image

Puppetfile of Control repo

forge ""

# Modules from the Puppet Forge
# Versions should be updated to be the latest at the time you start
mod "puppetlabs/inifile",    '1.5.0'
mod "puppetlabs/stdlib",     '4.11.0'
mod "puppetlabs/concat",     '2.1.0'
mod "puppetlabs/java",       '1.6.0'
mod "puppet-selinux",        '0.8.0'
mod "garethr-docker",        '5.3.0'

# Modules from Git
# Examples:
#mod 'apache',
#  :git    => '',
#  :commit => '83401079053dca11d61945bd9beef9ecf7576cbf'

#mod 'apache',
#  :git    => '',
#  :branch => 'docs_experiment'

mod 'ssh',
  :git => '',
  :ref => 'master'

mod 'ntp',
  :git => '',
  :ref => 'master'

mod 'role',
  :git => '',
  :ref => 'development'

mod 'profile',
  :git => '',
  :ref => 'development'

Profile is here

and docker profile code is as below

class profile::docker {
include ::docker

and role is here

and docker role code is as below

class role::docker {
  include profile::docker 

After everything been committed , I ran

puppet-code deploy --all --wait

In the Puppet console I have created development environment and added Production as parent environment but I am unable to find role::docker or profile::docker in the class list. I have tried refresh as well but its not helping.

Please find below screenshot as reference

enter image description here

And in Puppet server -> Development environment I can see docker.pp in role and profiles, for reference

[root@rgenupula1 puppetserver]# cd /etc/puppetlabs/code/environments/development/
[root@rgenupula1 development]# ls
environment.conf  hieradata  LICENSE  manifests  modules  Puppetfile  scripts  site
[root@rgenupula1 development]# cd modules/
[root@rgenupula1 modules]# ls
concat  docker  inifile  java  ntp  profile  role  selinux  ssh  stdlib
[root@rgenupula1 modules]# cat profile/manifests/docker.pp
class profile::docker {
    include ::docker
[root@rgenupula1 modules]# cat role/manifests/docker.pp
class role::docker {
  include profile::docker
[root@rgenupula1 modules]#

I am not sure what is my mistake here ? Requesting your help. And how can I troubleshoot situations like these ?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-10-23 12:38:09 -0600

raja gravatar image

modify environment.conf in your development environment and update modulepath as below

modulepath   = /etc/puppetlabs/code/environments/development/modules:$basemodulepath

and then restart puppetserver.

And my issue got resolved.

edit flag offensive delete link more


thanks, this did the trick for me too!

eivindlia gravatar imageeivindlia ( 2018-08-08 08:36:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-10-21 12:48:20 -0600

Seen: 65 times

Last updated: Oct 23 '17