Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (29 sloc) 0.993 kb
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
1 from __future__ import with_statement
7a47b55 @derf Add fabfile
derf authored
2 from fabric.api import *
3
4 env.hosts = [
215ec65 @derf add extern.chaosdorf.de
derf authored
5 'root@chaosdorf.dyndns.org',
7a47b55 @derf Add fabfile
derf authored
6 'root@backend.chaosdorf.de',
215ec65 @derf add extern.chaosdorf.de
derf authored
7 'root@extern.chaosdorf.de',
7a47b55 @derf Add fabfile
derf authored
8 'root@frontend.chaosdorf.de',
9 'root@shells.chaosdorf.de',
10 'root@vm.chaosdorf.de',
11 ]
12
9c67ea3 @derf fabfile: Various improvements
derf authored
13 env.shell = '/bin/sh -c'
14
1eb09cd @derf Remove overdone stuff
derf authored
15 def etckeeper_check():
16 run('etckeeper pre-install')
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
17
1eb09cd @derf Remove overdone stuff
derf authored
18 def etckeeper_commit(message):
19 run('if etckeeper unclean; then etckeeper commit "%s"; fi' % message)
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
20
1eb09cd @derf Remove overdone stuff
derf authored
21 def etckeeper_done():
22 run('etckeeper post-install')
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
23
24 def configs():
25 etckeeper_check()
26 put('dotfiles/zshrc', '/root/.zshrc')
27 put('etckeeper/etckeeper.conf', '/etc/etckeeper/')
c97940e @derf fabfile: deploy checkrestart hook
derf authored
28 put('apt/99checkrestart', '/etc/apt/apt.conf.d/')
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
29 etckeeper_commit('chaosdorf-admin-toolkit configfile updates')
9c67ea3 @derf fabfile: Various improvements
derf authored
30
508826e @derf Simplify fabfile (-> "fab deploy:2011.04.06" or similar)
derf authored
31 def deploy(version):
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
32 etckeeper_check()
8568ca7 @derf fab deploy: Put .deb into /root/ instead of /tmp/
derf authored
33 put("../chaosdorf-admin-toolkit_%s_all.deb" % version, '/root/')
34 run("dpkg --install /root/chaosdorf-admin-toolkit_%s_all.deb" % version)
35 run("rm /root/chaosdorf-admin-toolkit_%s_all.deb" % version)
b82d4df @derf fabfile: Add task to update my icinga checks/configs
derf authored
36 etckeeper_done()
Something went wrong with that request. Please try again.