Node not getting node definition from site.pp [closed]

asked 2017-07-12 16:16:59 -0600

corywink gravatar image

Hello, I am using trying to use the site.pp file to assign nodes their node definitions but the nodes are not receiving them. I am running Puppet 4.10.4 along with Foreman 1.15.1. From my understanding, nodes receive their definitions from both the site.pp and any ENC you have (in my case Foreman). However, the nodes do not get anything assigned to them from the site.pp even though I have node definitions for them.

To give more information, I am using r10k to deploy my environments from a puppet-control repo in GitHub. Right now I only have 2 environments: 'production' and 'staging'. In my site.pp file for the staging environment I have the following:

node /^[a-zA-Z0-9._-]*integ[a-zA-Z0-9._-]*$/ {
include role::integration_agent
}

node "integration-agent.dev.fco" {
include role::integration_agent
}

node default {
}

As you can see, I am using the roles/profiles workflow. Here I was trying to assign the 'role::integration agent' to any node with 'integ' in the certname. However, this did not work. When the node connected to the server and received the catalog, there were not classes assigned to it. So I tried assigning the role directly to the node based on its certname 'integration-agent.dev.fco' but this did not work either. Here is the output from the puppet run on the agent:

Info: Using configured environment 'staging'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for integration-agent.dev.fco
Info: Applying configuration version '66f53d0a32bc35ac070bbee25e688d81da89214d'
Notice: Applied catalog in 0.10 seconds

I have made sure that the node is in the staging environment and that is confirmed through the output shown above as well as through the Foreman web UI. So I guess my question is how do I get the site.pp file to take effect on the nodes' definitions? From what I understand, every time a puppet run is triggered and a catalog is compiled, it checks the site.pp and any ENC that you have configured. Is that not true? Or does Puppet only take definitions from the ENC and skip the site.pp?

Thanks for the help. Let me know if any more information would be helpful.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by corywink
close date 2017-07-13 17:17:28.366798