Rework puppetmaster logic

Change-Id: Ib892fc6b16e4422f7d3071136bfd7269da897bce
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>