summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2010-November/000534.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-November/000534.html')
-rw-r--r--zarb-ml/mageia-sysadm/2010-November/000534.html121
1 files changed, 121 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2010-November/000534.html b/zarb-ml/mageia-sysadm/2010-November/000534.html
new file mode 100644
index 000000000..86e759f03
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2010-November/000534.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] Keep puppet module generic without hardcoding domain name
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20Keep%20puppet%20module%20generic%20without%20hardcoding%0A%09domain%20name&In-Reply-To=%3C1289840626.722.145.camel%40akroma.ephaone.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000529.html">
+ <LINK REL="Next" HREF="000535.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] Keep puppet module generic without hardcoding domain name</H1>
+ <B>Michael Scherer</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20Keep%20puppet%20module%20generic%20without%20hardcoding%0A%09domain%20name&In-Reply-To=%3C1289840626.722.145.camel%40akroma.ephaone.org%3E"
+ TITLE="[Mageia-sysadm] Keep puppet module generic without hardcoding domain name">misc at zarb.org
+ </A><BR>
+ <I>Mon Nov 15 18:03:46 CET 2010</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000529.html">[Mageia-sysadm] [254] Add params file
+</A></li>
+ <LI>Next message: <A HREF="000535.html">[Mageia-sysadm] Backups
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#534">[ date ]</a>
+ <a href="thread.html#534">[ thread ]</a>
+ <a href="subject.html#534">[ subject ]</a>
+ <a href="author.html#534">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Hi,
+
+Looking after most commits, I see that we often hardcode the domain name
+in the puppet manifest and template.
+
+I think we should avoid for various reasons :
+
+- hard coding anything is never good
+
+- if one day we fork again, or if we are forced to change project name
+( both have occurred in the past for mandriva, so maybe we could be
+proactive this time ), this would be easier for us ( or them, depending
+on the side of the fork we are ).
+
+- this greatly enhance the module reusability ( IE, I cut and past some
+module that I use on my server )
+
+- this is not really complex to achieve, thanks to templating
+
+and the more important reason :
+
+- this allow us to set up test VMs/servers without fiddling with DNS too
+much, and prevent stupid errors ( like changing /etc/hosts and
+forgetting this was changed ).
+
+
+
+So, if you agree with me, and if you see mageia.org in some templates
+files ( except in bind for obvious reason ), just replace this with &lt;%=
+domain %&gt;. See for example commit 221.
+
+This is the ERB syntax ( erb being the template engine of ruby and
+puppet ) for expanding the variable, see
+<A HREF="http://en.wikipedia.org/wiki/ERuby">http://en.wikipedia.org/wiki/ERuby</A>
+
+The list of variable to use can be found with the facter command.
+
+And for the ldap dc=mageia,dc=org, we can either add a variable to
+facter ( this would be cleaner, but more complex
+<A HREF="http://projects.puppetlabs.com/projects/1/wiki/Adding_Facts">http://projects.puppetlabs.com/projects/1/wiki/Adding_Facts</A> ), or use
+this in the template :
+
+&lt;%
+dc_suffix = 'dc=' + domain.gsub('.',',dc=')
+%&gt;
+
+&lt;%= dc_suffix %&gt;
+
+See commit 211 for example on how do this.
+
+
+Of course, if there is something I missed, do not hesitate to tell.
+--
+Michael Scherer
+
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000529.html">[Mageia-sysadm] [254] Add params file
+</A></li>
+ <LI>Next message: <A HREF="000535.html">[Mageia-sysadm] Backups
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#534">[ date ]</a>
+ <a href="thread.html#534">[ thread ]</a>
+ <a href="subject.html#534">[ subject ]</a>
+ <a href="author.html#534">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>