Commit f711f9919567d89ec0b83ed0ac840cdbb490fdd2

Authored by Sergio Oliveira
1 parent 7de25ba3

Using hiera.yaml from puppet folder

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
puppet/bootstrap.py
@@ -17,6 +17,7 @@ except ImportError: @@ -17,6 +17,7 @@ except ImportError:
17 17
18 PUPPET_TARGET_VERSION = "3.6.2" 18 PUPPET_TARGET_VERSION = "3.6.2"
19 PUPPET_DIR = os.path.join(os.path.dirname(__file__)) 19 PUPPET_DIR = os.path.join(os.path.dirname(__file__))
  20 +HIERA_FILE = os.path.join(PUPPET_DIR, 'hiera.yaml')
20 MODULES_FILE_PATH = os.path.join(PUPPET_DIR, 'modules.txt') 21 MODULES_FILE_PATH = os.path.join(PUPPET_DIR, 'modules.txt')
21 22
22 DIST_CMD = { 23 DIST_CMD = {
@@ -188,8 +189,8 @@ def main(): @@ -188,8 +189,8 @@ def main():
188 print('Failed installing puppet') 189 print('Failed installing puppet')
189 exit(result) 190 exit(result)
190 191
191 - if os.path.isfile('/vagrant/puppet/hiera.yaml'):  
192 - copyfile('/vagrant/puppet/hiera.yaml', '/etc/puppet/hiera.yaml') 192 + if os.path.isfile(HIERA_FILE):
  193 + copyfile(HIERA_FILE, '/etc/puppet/hiera.yaml')
193 194
194 install_puppet_modules() 195 install_puppet_modules()
195 196