from .xlate import XLATOR
-__version__ = '3.2.1'
+__version__ = '3.2.2'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
# ## Configuring and starting puppet
if vm.has_puppet:
commands.append("chmod +x /tmp/init-puppet")
- commands.append((
- "/tmp/init-puppet --environment '{e}' --customer '{c}' --project '{pr}' "
- "--role '{r}' --owner '{o}' --tier '{t}' --purpose '{p} ({t})' "
- "--email '{m}'").format(
- p=purpose, t=vm.puppet_tier, o=vm.customer, c=vm.puppet_customer,
- pr=vm.puppet_project, m=vm.puppet_contact, e=vm.puppet_env, r=vm.puppet_role))
+ cmd = "/tmp/init-puppet --environment '{e}' --customer '{c}' "
+ if vm.puppet_project:
+ cmd += "--project '{pr}' "
+ cmd += "--role '{r}' --owner '{o}' --tier '{t}' --purpose '{p} ({t})' --email '{m}'"
+ cmd = cmd.format(
+ p=purpose, t=vm.puppet_tier, o=vm.customer, c=vm.puppet_customer,
+ pr=vm.puppet_project, m=vm.puppet_contact, e=vm.puppet_env, r=vm.puppet_role)
+ commands.append(cmd)
commands.append("rm -f /tmp/init-puppet")
content += ' provisioner "remote-exec" {\n'
from .interface import TerraformInterface
-__version__ = '1.4.4'
+__version__ = '1.4.5'
LOG = logging.getLogger(__name__)
self._purpose = self.default_purpose
self._puppet_contact = self.default_puppet_contact
self._puppet_customer = self.default_puppet_customer
- self._puppet_project = self.default_puppet_customer
+ self._puppet_project = None
self._puppet_tier = self.default_puppet_tier
self._puppet_env = None
self._puppet_role = self.default_puppet_role
@puppet_project.setter
def puppet_project(self, value):
if value is None:
- LOG.warn(_("A puppet hiera project name may not be None."))
+ LOG.warn(_("A puppet hiera project name should not be None."))
+ self._puppet_project = None
return
val = str(value).strip().lower()