2013-05-02 19:13:35 +02:00
|
|
|
from common import Task
|
|
|
|
|
|
|
|
|
|
|
|
class GetInfo(Task):
|
|
|
|
def run(self, info):
|
|
|
|
super(GetInfo, self).run(info)
|
2013-05-16 08:00:28 +02:00
|
|
|
# import urllib2
|
|
|
|
# import json
|
2013-05-02 19:13:35 +02:00
|
|
|
# response = urllib2.urlopen('http://169.254.169.254/latest/dynamic/instance-identity/document')
|
|
|
|
# info.host = json.load(response.read())
|
2013-05-16 08:00:28 +02:00
|
|
|
# return info
|
2013-05-02 19:13:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
class InstallPackages(Task):
|
|
|
|
def run(self, info):
|
2013-05-16 08:00:28 +02:00
|
|
|
# Check if packages are installed with
|
|
|
|
# /usr/bin/dpkg -s ${name} | grep -q 'Status: install'
|
2013-05-02 19:13:35 +02:00
|
|
|
pass
|