code: def run(self, action):
          
          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)
docs: Runs through the phases defined by :attr:`action`.
  
          :param str action:  Either ``deploy`` or ``inventory``.