FreeBSD 14
Sponsored Link

Puppet : How to use [node Section]2024/09/12

 

It's possible to set resources for every clients by using [node] section like follows.

[1] Set resources to [node01.srv.world] and others. ('default' section is applied on other clients.)
root@dlp:~ #
vi /usr/local/etc/puppet/code/environments/production/manifests/nodes.pp
node 'node01.srv.world' {
  file { '/home/testfile5.txt':
    ensure  => file,
    owner   => 'root',
    group   => 'wheel',
    mode    => '0644',
    content => 'This is the puppet test file for node01.',
  }
}
node default {
file { '/home/testfile6.txt':
    ensure  => file,
    owner   => 'root',
    group   => 'wheel',
    mode    => '0644',
    content => 'This is the puppet default test file.',
  }
}
Matched Content