11 lines
289 B
Python
Executable file
11 lines
289 B
Python
Executable file
#!/usr/bin/python
|
|
import db
|
|
|
|
db = db.db()
|
|
|
|
for line in open('machines', 'r').readlines():
|
|
(machine, group) = line.rstrip().split()
|
|
print 'X %s Y %s' % (machine, group)
|
|
set = { 'machine_group' : group }
|
|
where = { 'hostname' : machine }
|
|
db.update('machines', set, where)
|