---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
- - roles::snapshot_base
+ - roles::snapshot_farmsync_target
---
classes:
+ - roles::snapshot_master
- roles::snapshot_web
+# just a base class for snapshot things
class roles::snapshot_base {
ensure_packages ( [
'build-essential',
--- /dev/null
+# snapshot farm sync target
+class roles::snapshot_farmsync_target {
+ include roles::snapshot_secondary
+
+ ssh::authorized_key_collect { 'snapshot':
+ target_user => 'snapshot',
+ collect_tag => 'roles::snapshot_master::to::farmsync_target',
+ }
+}
--- /dev/null
+# snapshot master
+class roles::snapshot_master {
+ include roles::snapshot_base
+
+ ssh::keygen {'snapshot': }
+ ssh::authorized_key_add { 'roles::snapshot_master::to::farmsync_target':
+ target_user => 'snapshot',
+ key => dig($facts, 'ssh_keys_users', 'snapshot', 'id_rsa.pub', 'line'),
+ command => '~/bin/run-sync',
+ collect_tag => 'roles::snapshot::to::farmsync_target',
+ }
+
+ ssh::authorized_key_collect { 'snapshot':
+ target_user => 'snapshot',
+ collect_tag => 'roles::snapshot::to::master',
+ }
+}
--- /dev/null
+# snapshot secondary
+#
+# That is any node that requires ssh access to the master,
+# like sync targets or web mirrors.
+class roles::snapshot_secondary {
+ include roles::snapshot_base
+
+ ssh::keygen {'snapshot': }
+
+ ssh::authorized_key_add { "roles::snapshot_master::from::farmsync_target::${::fqdn}":
+ target_user => 'snapshot',
+ key => dig($facts, 'ssh_keys_users', 'snapshot', 'id_rsa.pub', 'line'),
+ command => '~/code/mirror/ssh-wrap master',
+ collect_tag => 'roles::snapshot::to::master',
+ }
+}
+# the shell host for users/roles to access the snapshot service
class roles::snapshot_shell {
include roles::snapshot_base
+# web service for snapshot.debian.org
+#
class roles::snapshot_web {
- include roles::snapshot_base
+ include roles::snapshot_secondary
include apache2
include apache2::rewrite