1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-sysadm] [437] the previous trick didn't work as tags are dependent in the order of
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B437%5D%20the%20previous%20trick%20didn%27t%20work%20as%20tags%20are%0A%09dependent%20in%20the%20order%20of&In-Reply-To=%3C20101123231749.14C913FCD2%40valstar.mageia.org%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000865.html">
<LINK REL="Next" HREF="000867.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-sysadm] [437] the previous trick didn't work as tags are dependent in the order of</H1>
<B>root at mageia.org</B>
<A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B437%5D%20the%20previous%20trick%20didn%27t%20work%20as%20tags%20are%0A%09dependent%20in%20the%20order%20of&In-Reply-To=%3C20101123231749.14C913FCD2%40valstar.mageia.org%3E"
TITLE="[Mageia-sysadm] [437] the previous trick didn't work as tags are dependent in the order of">root at mageia.org
</A><BR>
<I>Wed Nov 24 00:17:49 CET 2010</I>
<P><UL>
<LI>Previous message: <A HREF="000865.html">[Mageia-sysadm] [436] move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file
</A></li>
<LI>Next message: <A HREF="000867.html">[Mageia-sysadm] [438] fix permissions on tagmail.conf
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#866">[ date ]</a>
<a href="thread.html#866">[ thread ]</a>
<a href="subject.html#866">[ subject ]</a>
<a href="author.html#866">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Revision: 437
Author: misc
Date: 2010-11-24 00:17:48 +0100 (Wed, 24 Nov 2010)
Log Message:
-----------
the previous trick didn't work as tags are dependent in the order of
declaration ( and that's bad (tm) ). This one is safer.
Modified Paths:
--------------
puppet/manifests/common.pp
puppet/modules/openssh/manifests/init.pp
puppet/modules/openssh/templates/sshd_config
Added Paths:
-----------
puppet/modules/openssh/templates/sshd_config_ldap
Modified: puppet/manifests/common.pp
===================================================================
--- puppet/manifests/common.pp 2010-11-23 23:17:47 UTC (rev 436)
+++ puppet/manifests/common.pp 2010-11-23 23:17:48 UTC (rev 437)
@@ -87,7 +87,7 @@
class default_mageia_server {
include timezone
- include openssh
+ include openssh::server
include default_ssh_root_key
include base_packages
include ntp
Modified: puppet/modules/openssh/manifests/init.pp
===================================================================
--- puppet/modules/openssh/manifests/init.pp 2010-11-23 23:17:47 UTC (rev 436)
+++ puppet/modules/openssh/manifests/init.pp 2010-11-23 23:17:48 UTC (rev 437)
@@ -1,31 +1,36 @@
class openssh {
+ class server {
+ # some trick to manage sftp server, who is arch dependent on mdv
+ $path_to_sftp = "$lib_dir/ssh/"
- # some trick to manage sftp server, who is arch dependent on mdv
- $path_to_sftp = "$lib_dir/ssh/"
+ package { "openssh-server":
+ ensure => installed
+ }
- package { "openssh-server":
- ensure => installed
- }
+ service { sshd:
+ ensure => running,
+ path => "/etc/init.d/sshd",
+ subscribe => [ Package["openssh-server"] ]
+ }
- service { sshd:
- ensure => running,
- path => "/etc/init.d/sshd",
- subscribe => [ Package["openssh-server"], File["sshd_config"] ]
- }
- file { "sshd_config":
- path => "/etc/ssh/sshd_config",
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- require => Package["openssh-server"],
- content => template("openssh/sshd_config")
+ file { "/etc/ssh/sshd_config":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 644,
+ require => Package["openssh-server"],
+ content => template("openssh/sshd_config"),
+ notify => Service["sshd"]
+ }
}
-
- class ssh_keys_from_ldap {
+ class ssh_keys_from_ldap inherits server {
+ File ["/etc/ssh/sshd_config"] {
+ content => template("openssh/sshd_config","openssh/sshd_config_ldap")
+ }
+
package { 'python-ldap':
ensure => installed,
}
Modified: puppet/modules/openssh/templates/sshd_config
===================================================================
--- puppet/modules/openssh/templates/sshd_config 2010-11-23 23:17:47 UTC (rev 436)
+++ puppet/modules/openssh/templates/sshd_config 2010-11-23 23:17:48 UTC (rev 437)
@@ -45,11 +45,7 @@
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
-<% if all_tags.include?('openssh::ssh_keys_from_ldap') %>
-AuthorizedKeysFile /var/lib/config/pubkeys/%u/authorized_keys
-<% end %>
-
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
Added: puppet/modules/openssh/templates/sshd_config_ldap
===================================================================
--- puppet/modules/openssh/templates/sshd_config_ldap (rev 0)
+++ puppet/modules/openssh/templates/sshd_config_ldap 2010-11-23 23:17:48 UTC (rev 437)
@@ -0,0 +1,3 @@
+
+AuthorizedKeysFile /var/lib/config/pubkeys/%u/authorized_keys
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101124/ed0d31e3/attachment.html>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000865.html">[Mageia-sysadm] [436] move the ldap key from ssh logic to openssh module ( more logical ), and add the hook in openssh config file
</A></li>
<LI>Next message: <A HREF="000867.html">[Mageia-sysadm] [438] fix permissions on tagmail.conf
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#866">[ date ]</a>
<a href="thread.html#866">[ thread ]</a>
<a href="subject.html#866">[ subject ]</a>
<a href="author.html#866">[ 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>
|