Ask Your Question

Is there a way to run the "puppet" command without creating confdir, ssldir, etc. directories?

asked 2015-04-15 18:42:19 -0500

JohnsonEarls gravatar image

As part of setting up my puppet server, I use puppet itself to generate the puppet user and group, install some preliminary modules, etc.

The problem is, the puppet command automatically creates the default confdir, ssldir, etc. directories, because I don't yet have a puppet config file installed at this point.

For now, my work around is to do all my initial setup, then go back and remove /etc/puppet and /var/lib/puppet so that they can be created properly once I have my puppet config installed and running the real puppet setup.

Is there any command line option that will let me tell puppet to not create the default directories?

Thanks in advance,

-- Johnson

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-02-03 22:56:45 -0500

Async gravatar image

updated 2016-02-05 10:57:38 -0500

Not an answer, but a corroboration ... The following is the output after running the same puppet apply -e command twice. Notice how /etc/puppet/ssl owner and group are getting set to puppet, even though there is no where in my inline manifest that specifies that:

# puppet apply -e "file { '/etc/puppet/ssl': ensure   => 'directory', owner => 'root', group => 'root', mode => '777', selinux_ignore_defaults => true, } notify {'HOW are /etc/puppet/ssl owner, group, and mode getting changed??? ':}" --environment "development"
Fact file /etc/puppet/r10k/cloudpassage/facts.d/cp_facts_win.bat was parsed but returned an empty data set
Notice: Compiled catalog for bb8-roan-dch-05.sbox.local in environment development in 0.15 seconds
Notice: /Stage[main]/Main/File[/etc/puppet/ssl]/owner: owner changed 'puppet' to 'root'
Notice: /Stage[main]/Main/File[/etc/puppet/ssl]/group: group changed 'puppet' to 'root'
Notice: /Stage[main]/Main/File[/etc/puppet/ssl]/mode: mode changed '0771' to '0777'
Notice: HOW are /etc/puppet/ssl owner, group, and mode getting changed??? 
Notice: /Stage[main]/Main/Notify[HOW are /etc/puppet/ssl owner, group, and mode getting changed??? ]/message: defined 'message' as 'HOW are /etc/puppet/ssl owner, group, and mode getting changed??? '
Notice: Finished catalog run in 0.18 seconds
edit flag offensive delete link more

answered 2015-04-16 08:48:51 -0500

akshay gravatar image

We cannot create that directories. When we install the puppet then in puppet.conf file the whatever directories are used for working purposes that are already present. And entry of this is present in that puppet.conf file under main section.\

edit flag offensive delete link more


This is patently untrue. When installing puppet via gems, no configuration files or directories get created. The configuration directories get automatically created when you run the puppet command the first time. I am looking for a way to disable that automatic-creation when you run puppet.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-04-16 12:01:01 -0500 )edit

Okk Johnson. I will see that part then I will tell you.

akshay gravatar imageakshay ( 2015-04-17 00:53:41 -0500 )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: 2015-04-15 18:42:19 -0500

Seen: 565 times

Last updated: Feb 05 '16