roles = teuthology.all_roles(ctx.cluster)
config = dict((id_, a) for id_ in roles)
- for role, ls in config.items():
+ for role, cmd in config.items():
(remote,) = ctx.cluster.only(role).remotes.keys()
log.info('Running commands on role %s host %s', role, remote.name)
- for c in ls:
+ if isinstance(cmd, list):
+ for c in cmd:
+ _shell(ctx, cluster_name, remote,
+ ['bash', '-c', c],
+ extra_cephadm_args=env)
+ else:
+ assert isinstance(cmd, str)
_shell(ctx, cluster_name, remote,
- ['bash', '-c', c],
+ ['bash', '-ex', '-c', cmd],
extra_cephadm_args=env)
+
def apply(ctx, config):
"""
Apply spec