Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: hiera/install_precise.py

Issue 6330493855334400: Issue 2155 - Ensure /etc/puppet/hiera.yaml is linked properly (Closed)
Patch Set: Created March 17, 2015, 9:24 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: hiera/install_precise.py
===================================================================
--- a/hiera/install_precise.py
+++ b/hiera/install_precise.py
@@ -98,6 +98,8 @@
subprocess.check_call(['apt-get', '-y', 'install', 'hiera-puppet'])
if not os.path.exists('/etc/puppet/hiera.yaml'):
- config = os.path.join(os.path.dirname(__file__), 'hiera.yaml')
+ realpath = os.path.realpath(__file__)
Felix Dahlke 2015/03/17 09:33:50 Trailing slash, huh? :)
mathias 2015/03/17 09:41:01 Indeed :)
+ dirname = os.path.dirname(realpath)
+ config = os.path.join(dirname, 'hiera.yaml')
if os.path.exists(config):
os.symlink(config, '/etc/puppet/hiera.yaml')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld