def __init__(self, *args, **kwds): super().__init__(*args, **kwds) # *Not* dependent on `run()`-time information, so this can be setup now self.tasks = Tasks(self) self._task_vars = None self._result = None self._var_values = None self.log = logging.getLogger( # f"nrser.nansi.{self.__class__.__module__.split('.')[-1]}" # The name of the module that is extending ComposeAction. # # For an action plugin in a collection, this will take the form: # # ansible_collections.${NAMESPACE}.${NAME}.plugins.action.${ACTION} # # like: # # ansible_collections.experf.ue_build_driver.plugins.action.setup # self.__class__.__module__, ) # Setup logging output, using the `verbosity` attribute of # `ansible.utils.display.Display` to set the level (verbosity is # set by the `-vv` switches provided to the `ansible-playbook` command) setup_for_display(self.log.name)
from clavier import arg_par import splatlog as logging from almond_cloud.config import CONFIG from .image.build import build_image from .k8s.flip import flip LOG = logging.getLogger(__name__) DESC = f"""\ Rebuild the container and flip the pods that use it. """ def add_parser(subparsers: arg_par.Subparsers): parser = subparsers.add_parser( "deploy", target=deploy, help=DESC.splitlines()[0], description=DESC, ) def deploy(): build_image() flip(["image"])