puppet: Silence puppet warnings about missing hiera.yaml.

This commit is contained in:
Tim Abbott
2016-07-30 18:01:37 -07:00
parent 35edd8c9dd
commit 3239197fdb

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
import subprocess
import six.moves.configparser as configparser
@@ -16,6 +17,10 @@ if len(extra_args) and extra_args[0] in ('-f', '--force'):
config = configparser.RawConfigParser()
config.read("/etc/zulip/zulip.conf")
if not os.path.exists("/etc/puppet/hiera.yaml"):
# Suppress warnings about hiera.yaml not existing.
subprocess.check_call(["touch", "/etc/puppet/hiera.yaml"])
puppet_config = """
Exec { path => "/usr/sbin:/usr/bin:/sbin:/bin" }
include apt