Esempio n. 1
0
def prune_galaxy_roles(parsed_args):
    """Prune galaxy roles that are no longer necessary.

    :param parsed_args: Parsed command line arguments.
    """
    LOG.info("Removing unnecessary galaxy roles from kayobe")
    roles_to_remove = [
        'stackhpc.os-shade',
    ]
    LOG.debug("Removing roles: %s", ",".join(roles_to_remove))
    utils.galaxy_remove(roles_to_remove, "ansible/roles")
Esempio n. 2
0
 def test_galaxy_remove(self, mock_run):
     utils.galaxy_remove(["role1", "role2"], "/path/to/roles")
     mock_run.assert_called_once_with([
         "ansible-galaxy", "remove", "--roles-path", "/path/to/roles",
         "role1", "role2"
     ])