I need to write multiple site.pp file for the same hosts. It gives me the following error
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Node 'default' is already defined at line 2; cannot redefine at line 2 on node node-002.example.com
For example :
My first site.pp
vi hosts-site.pp
default{
}
node "node-002.example.com" {
## Rules here to update /etc/hosts
}
Next Site.pp
with the same node but different operations .
vi fstab-site.pp
default{
}
node "node-002.example.com" {
## Rules here to update /etc/fstab
}
How to achieve the same. We need to write multiple operations for the same nodes for which we need to maintain different site.pp