Runs through the phases defined by :attr:`action`.

        :param str action:  Either ``deploy`` or ``inventory``.

def run(self, action):
        """
        Runs through the phases defined by :attr:`action`.

        :param str action:  Either ``deploy`` or ``inventory``.

        """
        deployer = self.__class__.__name__
        log.info('Running %s...' % deployer)
        try:
            if action == 'deploy':
                self.deploy()
            elif action == 'inventory':
                self.inventory()
        except BangError as e:
            log.error(e)
            raise
        log.info('%s complete.' % deployer)