I created a module to copy one file from the master and install to agents and it works fine with code below: but now I am trying to copy 3 different files in different directory and install each one on different set of nodes. ( it is like a range of ips or dns names called A systems ...) For example: file A need to be installed on all agents in A systems nodes. File B need to be installed on all agents in B systems nodes File C need to be installed on all agents in C Systems nodes
[or you can think of it as: file1 needs to be installed on all silver systems.] and so on, for file2 and file3
class profile::ma {
file { '/tmp/filename.sh':
ensure => 'present',
replace => 'no',
source => 'puppet:///module/files/filename.sh',
mode => '0755',
notify => Exec['install'],
}
exec { 'install':
command => '/tmp/filename.sh -i',
onlyif => '/usr/bin/test ! -e /etc/filetocheck',
}
}