diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-February/002726.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2011-February/002726.html | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-February/002726.html b/zarb-ml/mageia-sysadm/2011-February/002726.html new file mode 100644 index 000000000..e7a6149c2 --- /dev/null +++ b/zarb-ml/mageia-sysadm/2011-February/002726.html @@ -0,0 +1,156 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-sysadm] [1005] add the user creation by puppet + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B1005%5D%20add%20the%20user%20creation%20by%20puppet&In-Reply-To=%3C1297437657.21676.130.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="002725.html"> + <LINK REL="Next" HREF="002727.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-sysadm] [1005] add the user creation by puppet</H1> + <B>Michael Scherer</B> + <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B1005%5D%20add%20the%20user%20creation%20by%20puppet&In-Reply-To=%3C1297437657.21676.130.camel%40akroma.ephaone.org%3E" + TITLE="[Mageia-sysadm] [1005] add the user creation by puppet">misc at zarb.org + </A><BR> + <I>Fri Feb 11 16:20:57 CET 2011</I> + <P><UL> + <LI>Previous message: <A HREF="002725.html">[Mageia-sysadm] [520] left background update (alexn83) +</A></li> + <LI>Next message: <A HREF="002727.html">[Mageia-sysadm] [1004] add a replyto for mail from bot and the user creation by puppet +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#2726">[ date ]</a> + <a href="thread.html#2726">[ thread ]</a> + <a href="subject.html#2726">[ subject ]</a> + <a href="author.html#2726">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Le vendredi 11 février 2011 à 16:11 +0100, <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">root at mageia.org</A> a écrit : +><i> Revision: 1005 +</I>><i> Author: dams +</I>><i> Date: 2011-02-11 16:11:00 +0100 (Fri, 11 Feb 2011) +</I>><i> Log Message: +</I>><i> ----------- +</I>><i> add the user creation by puppet +</I> +The commit message do not correspond much to what happened +( ie, there was also others changes ). I do use a specific hook in vim +to have a diff when redacting the commit message to precisely avoid +this, see <A HREF="http://www.vim.org/scripts/script.php?script_id=978">http://www.vim.org/scripts/script.php?script_id=978</A> ( yup, +self promotion ) + + +><i> Modified: puppet/modules/blog/manifests/init.pp +</I>><i> =================================================================== +</I>><i> --- puppet/modules/blog/manifests/init.pp 2011-02-11 15:10:39 UTC (rev 1004) +</I>><i> +++ puppet/modules/blog/manifests/init.pp 2011-02-11 15:11:00 UTC (rev 1005) +</I>><i> @@ -1,14 +1,28 @@ +</I>><i> -#TODO: +</I>><i> -# - add the creation of the user 'blog' in puppet +</I>><i> -# - add the user 'blog' to the 'apache' group (usermod -a -G apache blog) +</I>><i> class blog { +</I>><i> + user { "blog": +</I>><i> + groups => apache, +</I>><i> + comment => "This user is used for blog.mageia.org", +</I> +This comment is not very helpful to explain the use of the user. +And as I said numerous time, I think we should try to avoid hardcoding +domain name in puppet. WHile a comment has no incidence, it just add +noise when someone want to check that nothing is hardcoded ( using +grep ). + +><i> + ensure => present, +</I>><i> + managehome => true, +</I>><i> + } +</I>><i> + +</I>><i> include apache::mod_php +</I>><i> include mysql +</I>><i> + apache::vhost_other_app { "blog-test.$domain": +</I>><i> + vhost_file => "blog/01_blogs_vhosts.conf", +</I>><i> + } +</I> +The name of templates could be IMHO be better. + + +><i> package { ['wget','php-mysql']: +</I>><i> ensure => installed +</I>><i> } +</I>><i> +</I>><i> + file { "/var/lib/blog": +</I>><i> + ensure => directory, +</I>><i> + owner => blog, +</I>><i> + group => blog, +</I>><i> + mode => 644, +</I>><i> + } +</I>><i> + +</I>><i> file { "check_new-blog-post": +</I>><i> path => "/usr/local/bin/check_new-blog-post.sh", +</I>><i> ensure => present, +</I>><i> @@ -18,20 +32,9 @@ +</I>><i> content => template("blog/check_new-blog-post.sh") +</I>><i> } +</I>><i> +</I>><i> - apache::vhost_other_app { "blog-test.$domain": +</I>><i> - vhost_file => "blog/01_blogs_vhosts.conf", +</I>><i> - } +</I>><i> - +</I>><i> - file { "/var/lib/blog": +</I>><i> - ensure => directory, +</I>><i> - owner => blog, +</I>><i> - group => blog, +</I>><i> - mode => 644, +</I>><i> - } +</I>><i> - +</I>><i> file { "/var/www/html/blog.mageia.org": +</I>the naming of the directory is also hardcoded for no good reason. + +><i> ensure => directory, +</I>><i> - owner => apache, +</I>><i> + owner => blog, +</I>><i> group => blog, +</I>><i> mode => 644, +</I>><i> } +</I> + +-- +Michael Scherer + +</PRE> + + + + + + + + + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="002725.html">[Mageia-sysadm] [520] left background update (alexn83) +</A></li> + <LI>Next message: <A HREF="002727.html">[Mageia-sysadm] [1004] add a replyto for mail from bot and the user creation by puppet +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#2726">[ date ]</a> + <a href="thread.html#2726">[ thread ]</a> + <a href="subject.html#2726">[ subject ]</a> + <a href="author.html#2726">[ 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> |