Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What are the possible ways to implement the following: if a config file is changed on Agent its new version should be pulled by Master from that Agent?

share|improve this question
1  
Welcome, Andriy! I've visited Lviv several times - it is a delightful city. –  EEAA Jan 30 '13 at 14:21
    
What exactly are you trying to do? Are you trying to use puppet to push configs from a particular system to many, or something else? –  Zoredache Jan 30 '13 at 17:26
    
@Zodecache I'm trying to keep the master aware of any changes that can occur in configuration on the agent. –  Andriy Yurchuk Jan 31 '13 at 4:09
    
But why must the master be aware of those changes? –  turingmachine Feb 1 '13 at 17:57
    
And the master then does what with that information, exactly? –  jgoldschrafe Feb 3 '13 at 6:19

2 Answers 2

This is the exact opposite of how Puppet is designed to work, so I think you're out of luck.

The closest you can get is likely to run a $ puppet agent -t --noop, which would show discrepancies between local config and the puppet manifests. At that point, though, it would be up to you to implement those changes within puppet.

share|improve this answer
    
Yeah, I wouldn't do it. I have a puppet module that manages the puppet config for all nodes, including the master. It is under version control, so the change can be done anywhere, then committed to the repo and pulled into the module tree on the master. –  lsd Feb 1 '13 at 19:02

If the file in question is already under puppet control (that is via file type), then you can just deploy that file also on the master.

If the the file is not under puppet control, one way to achive your goal would be to use the audit feature of puppet.

file{'/watch':
  replace => false, # don't change the content
  audit => content, # monitor for changes
  notify => Exec['sync_files'],
}
exec{'sync_files:
  command => 'rsync -a /watch puppetmaster:/destination/', 
  refreshonly => true,
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.