Advertisement
include

Untitled

Dec 17th, 2013
2,843
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.35 KB | None | 0 0
  1. @roles('debian')
  2. @task
  3. def setup_ntp():
  4.     ''' Setup ntp servers
  5.     '''
  6.  
  7.     env.ntp_server = 'foo.bar'
  8.  
  9.     template_dir = os.path.join(os.path.dirname(__file__)) + '/OS/debian/etc/'
  10.  
  11.     source = template_dir + 'ntp.conf.j2'
  12.     dest = '/etc/ntp.conf'
  13.  
  14.     files.upload_template(source, dest, context=env, use_jinja=True, template_dir=template_dir)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement