Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get puppet::server from hiera #43

Open
claflico opened this issue Dec 30, 2015 · 3 comments
Open

Get puppet::server from hiera #43

claflico opened this issue Dec 30, 2015 · 3 comments

Comments

@claflico
Copy link
Contributor

I use the role/profile method and add the following to my base profile manifest so that puppet gets managed on all nodes:

class { 'puppet': }

I try to keep my manifests as generic as possible so I put as much as I can in hiera. It would be preferred to be able to read in "puppet::server: true" from my roles/puppetmaster.yaml file rather than having to either leave my base profile manifest out of my puppetmaster role manifest...or come up with an if/else of some sort so that I'm not declaring it twice.

@jlambert121
Copy link
Owner

I'm not following why you can't add this parameter in hiera (that's how I do it). The default is false, so you only need to specify puppet::server: true at the hiera level that your puppet masters are in.

@Wicaeed
Copy link

Wicaeed commented Feb 2, 2016

I'm having a someone similar issue, but with trying to manage the Puppet Agent instead of the server, however my problem looks very similar to the one @claflico is having.

My test system has a role assigned via hiera, and that role loads a class profile::puppet::puppet_agent amongst others

class profile::puppet::puppet_agent {
  include ::puppet

  firewall { '121 Open Firewall ports for Puppet Server connections':
    dport   => 8140,
    proto   => tcp,
    action  => accept,
  }
}

The actual per-system configuration is handled via hiera by the servers clientcert name. I know the role/profile apply properly because I can see the firewall rule being created, and the first puppet run shows that the puppet service scheduling is being handled by cron instead of running as a service, as well as other default settings being set.

If I go to the machines servername.fqdn.yaml file and insert an override to manage the Puppet Agent service as a service instead of a cron, eg:

---
puppet::agent::runmode: 'service'

Nothing ever shows up on a new run of the Puppet agent, or even when I run it manually and specify my testing environment:

./puppet agent -t --environment puppet_agent
Info: Using configured environment 'puppet_agent'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for devbox.local.home
Info: Applying configuration version '1454381880'
Notice: Applied catalog in 0.59 seconds

Any chance this is related, or should I open up a new issue?

@jlambert121
Copy link
Owner

@Wicaeed: You should be setting parameters in the main class, not the subclass.

---
puppet::runmode: service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants