Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent Production environment Environment test1 env group

1 node is pinned to this node group: Certname

vm3.local

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

environment Parent Production environment Environment test1 env group

group 1 node is pinned to this node group: Certname

vm3.local

vm3.local

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

Images:

Classification test1<em>env vm3</em>classes vm3_groups

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

Images:

Classification test1<em>env vm3</em>classes vm3_groups

@Greg - keep asking; I'm sure we'll get there eventually :)

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

Images:

Classification test1<em>env vm3</em>classes vm3_groups

@Greg - keep asking; I'm sure we'll get there eventually :)

Env Print

Master:
puppet agent --configprint manifest --environment test1
/etc/puppetlabs/code/environments/test1/manifests

VM2:
puppet agent --configprint manifest --environment test1
(blank)

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

Images:

Classification test1<em>env vm3</em>classes vm3_groups

@Greg - keep asking; I'm sure we'll get there eventually :)

Env Print

Master:
puppet agent --configprint manifest --environment test1
/etc/puppetlabs/code/environments/test1/manifests

VM2:
puppet agent --configprint manifest --environment test1
(blank)

@Greg: don't give up now :)
anyway, this is self education (@home), so paid support is not an option. :(

Can you show the (minimum) dir/file setup that's supposed to provide dir based envs? Maybe I can work it out from there.
Thx
Chris
PS: can you explain why test1 should be a child of production (according to the docs). As per prev note above,, when trying this with PE 3.8 I had to make it a child of All Nodes instead (ie same as prod) to make it work.

pe 201502 - new env ignored

Guys,

I've added a new env test1 by adding the appropriate dirs on the Master and target node.
I've pinned the node to the test1 env group (and its not listed in the pinned nodes for production), but whenever I run

puppet agent -t

it says

production.

Can anybody help?

NB: I want the node's env to be controlled by the Master.

Chris

@Greg:

On the node:

 puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1442966700'
Notice: Applied catalog in 1.01 seconds

 puppet config print environment
production

Can you be a bit more specific about the console info please. Is this what you want?

Test1 environment

Parent
    Production environment
Environment
    test1 env group


1 node is pinned to this node group:
Certname         

vm3.local

@Greg (2):

Classification

Create, edit, and remove node groups here.
Node group name     Parent name     Environment      

Agent-specified environment Production environment  agent-specified env group    
All Nodes   All Nodes   production   
NTP All Nodes   production   
PE ActiveMQ Broker  PE Infrastructure   production   
PE Agent    PE Infrastructure   production   
PE Certificate Authority    PE Infrastructure   production   
PE Console  PE Infrastructure   production   
PE Infrastructure   All Nodes   production   
PE Master   PE Infrastructure   production   
PE MCollective  PE Infrastructure   production   
PE PuppetDB PE Infrastructure   production   
Production environment  All Nodes   production env group     
Test1 environment   Production environment  test1 env group     


vm3.local

    Facts Classes Variables Reports Groups 

Class   Source group
puppet_enterprise::profile::agent   PE Agent
puppet_enterprise   PE Agent
ntp     NTP
puppet_enterprise::profile::mcollective::agent  PE MCollective
puppet_enterprise   PE MCollective


# cat puppet.conf 
# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
# - https://docs.puppetlabs.com/puppet/latest/reference/config_important_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_about_settings.html
# - https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html
# - https://docs.puppetlabs.com/references/latest/configuration.html
[main]
server = puppet.local
[agent]
certname = vm3.local

HTH
PS how do you post the exact image like that?

@Greg:

Interesting; created user to install on vm3 by basically copying user2 on vm2 (you solved my qn about that) and got

# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for vm3.local
Info: Applying configuration version '1443059500'
Notice: Applied catalog in 0.86 seconds

However, it didn't create the user or home dir or group ie nada...


Definitely sure :)

Actually, I just realised that wasn't entirely clear (above); what I actually did was copy the user2 manifests then edited to user3 to match the hostname (for consistency). Also I checked the passwd, group files and /home dir.


Re classes:

In the file /etc/puppetlabs/code/environments/test1/manifests/site.pp

node 'vm3.local' {
    include vm3
}


/etc/puppetlabs/code/environments/test1/modules/vm3/manifests
# ls
groups.pp  init.pp  users.pp
# cat *
class vm3::groups {
    group { "pupusers":
        ensure => present,
        gid    => 3000,
    }
}

# vm3.local defn
class vm3 {
        include vm3::groups
        include vm3::users
}

class vm3::users {
    user { 'user3':
        ensure     => present,
        managehome => true,
        home       => '/home/user3',
        password => '$6$saltsaltsomemore$n/pv9PuSHwY4rl0lWajN6OceI7CqC9Uysy80WKW/44S45Rayu5AKBUom6LUheypqSGieOO47GUkf5SbrNVPDx.',
        uid        => '3000',
        gid        => '3000',
        shell      => '/bin/bash',
    }
    file { '/home/user3':
      ensure => directory,
      owner  => 'user3',
      group  => 'pupusers',
      mode   => '0700',
    }
}

@sahumphries: still says production. I've always found it odd that the docs say you should make other envs (eg test1) a child of the production env. When I was playing with PE 3.8 I made test1 a child of All Nodes (iirc) instead, which seemed to help. For this PE 201502/4.2 I tried that but it didn't help, so I reverted to by-the-book.

If anyone has a working multiple Dir Envs setup where the nodes envs are dictated by the Master, I'd be interested to see it.

Images:

Classification test1<em>env vm3</em>classes vm3_groups

@Greg - keep asking; I'm sure we'll get there eventually :)

Env Print

Master:
puppet agent --configprint manifest --environment test1
/etc/puppetlabs/code/environments/test1/manifests

VM2:
puppet agent --configprint manifest --environment test1
(blank)

@Greg: don't give up now :)
anyway, this is self education (@home), so paid support is not an option. :(

Can you show the (minimum) dir/file setup that's supposed to provide dir based envs? Maybe I can work it out from there.
Thx
Chris
PS: can you explain why test1 should be a child of production (according to the docs). As per prev note above,, when trying this with PE 3.8 I had to make it a child of All Nodes instead (ie same as prod) to make it work.

@Greg: can you contact me on linked in and we'll talk