(self, force=True)
Provisions the container.
Provisions the container.
Provisions the container .
def provision(self, force=True):
        """ Provisions the container. """
        # We run this in case our lxdock.yml config was modified since our last `lxdock up`.
        self._setup_env()

        try:
            provisioning_steps = self.options['provisioning']
        except KeyError:
            return

        if not force and self.is_provisioned:
            return

        for provisioning_item in provisioning_steps:
            provisioning_type = provisioning_item['type'].lower()
            provisioner_class = Provisioner.provisioners.get(provisioning_type)
            if provisioner_class is not None:
                provisioner = provisioner_class(
                    self.homedir, self._host, [self._guest], provisioning_item)
                logger.info('Provisioning with {0}'.format(provisioner.name))
                provisioner.provision()
def provision ( self , force = True ) : # We run this in case our lxdock.yml config was modified since our last `lxdock up`. self . _setup_env ( ) try : provisioning_steps = self . options [ 'provisioning' ] except KeyError : return if not force and self . is_provisioned : return for provisioning_item in provisioning_steps : provisioning_type = provisioning_item [ 'type' ] . lower ( ) provisioner_class = Provisioner . provisioners . get ( provisioning_type ) if provisioner_class is not None : provisioner = provisioner_class ( self . homedir , self . _host , [ self . _guest ] , provisioning_item ) logger . info ( 'Provisioning with {0}' . format ( provisioner . name ) ) provisioner . provision ( )