~mbruzek/charms/precise/apache2/add-tests

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Marco Ceppi
  • Date: 2014-06-11 17:41:38 UTC
  • mfrom: (53.1.1 apache2)
  • Revision ID: marco@ceppi.net-20140611174138-j9wl4qgt4irfkgpz
[cjohnston] Run apt-get update prior to apt-get install

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    unit_get
22
22
)
23
23
from charmhelpers.contrib.charmsupport import nrpe
 
24
from charmhelpers.fetch import apt_update
24
25
 
25
26
###############################################################################
26
27
# Global variables
196
197
def install_hook():
197
198
    if not os.path.exists(default_apache2_service_config_dir):
198
199
        os.mkdir(default_apache2_service_config_dir, 0600)
 
200
    apt_update(fatal=True)
199
201
    apt_get_install("python-jinja2")
200
202
    install_status = apt_get_install("apache2")
201
203
    if install_status == 0: