From 4b00c061e52c9dd4afe531ccf2256edbb4b8571b Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Wed, 22 May 2013 23:31:33 -0400 Subject: [PATCH] Make add run_list a separate function Change-Id: Ib4c2b58e8966c1988c0ff59053ced836a75fd363 --- inception/orchestrator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inception/orchestrator.py b/inception/orchestrator.py index c3ae300..cac5f98 100644 --- a/inception/orchestrator.py +++ b/inception/orchestrator.py @@ -323,9 +323,12 @@ class Orchestrator(object): hostnames = ([self._chefserver_name, self._gateway_name, self._controller_name] + self._worker_names) for hostname in hostnames: + self._add_run_list(hostname, recipe) + + def _add_run_list(self, hostname, item): cmd.ssh(self.user + '@' + self._chefserver_ip, "/usr/bin/knife node run_list add %s %s" % ( - hostname, recipe), + hostname, item), screen_output=True, agent_forwarding=True)