Ask Your Question
0

Installing puppet server and agent on same machine

asked 2017-05-19 09:35:30 -0600

klaypez gravatar image

updated 2017-05-22 04:49:51 -0600

Hello,

I'm new on Puppet and quite lost, I would like (as a test) install puppet master and puppet agent on the same machine.

I'm stuck at the step of configuring puppet.conf and I have no ideas how to write the config sections.

Is that possible to install bot puppet on same machine ? If yes could you give me some example to make it clearer for me

EDIT

Here is my puppet.conf:

[main]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
ssldir = /opt/puppetlabs/puppet/ssl/
factpath = /opt/puppetlabs/bin/facter

[master]
dns-alt-names = puppetmaster,puppet,server.example.com
certname = server.example.com
server = puppetserver
report = true
reports = log,store
modulepath = /opt/puppetlabs/puppet/modules

[agent]
server = server.example.com

After the conf of this file, the agent needs to ask a certificate, so I run this command :

 puppet agent --server server.example.com --waitforcert 60 --test

It returns me this error and I can't understand it :

Error: Could not parse /etc/puppetlabs/puppet/puppet.conf: Could not match line dns-alt-names = puppetmaster,puppet,minos.grenet.fr
 at /etc/puppetlabs/puppet/puppet.conf:20

EDIT

I found what was wrong... I writed dns-alt-names instead of dns_alt_names.. 3 days I try to solve it

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-05-19 21:23:50 -0600

DarylW gravatar image

updated 2017-05-19 21:24:16 -0600

There should be no problem installing them together.

There are different sections in the puppet.conf file, [agent], [master], [main] IIRC. I believe that they all read from the same file., but just use the information from their specific section. There are extra configuration files for puppetserver specific configuration in addition to what is in the puppet.conf file

edit flag offensive delete link more

Comments

Okay thanks for your answer. That's what I did but when i run "puppet agent server server.example.com --waitforcert 60 --test" I get an error could you look at my edit please Thanks

klaypez gravatar imageklaypez ( 2017-05-22 01:54:30 -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

Stats

Asked: 2017-05-19 09:35:30 -0600

Seen: 145 times

Last updated: May 22