avoid duplicate ssh keygen for snapshot
authorPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 19:18:12 +0000 (21:18 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 19:18:12 +0000 (21:18 +0200)
modules/roles/manifests/snapshot_master.pp
modules/roles/manifests/snapshot_secondary.pp
modules/roles/manifests/snapshot_ssh_keygen.pp [new file with mode: 0644]

index eeb74f7..e976cdc 100644 (file)
@@ -1,8 +1,8 @@
 # snapshot master
 class roles::snapshot_master {
   include roles::snapshot_base
+  include roles::snapshot_ssh_keygen
 
-  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'),
index f4ef77d..e53c267 100644 (file)
@@ -4,6 +4,7 @@
 # like sync targets or web mirrors.
 class roles::snapshot_secondary {
   include roles::snapshot_base
+  include roles::snapshot_ssh_keygen
 
   ssh::keygen {'snapshot': }
 
diff --git a/modules/roles/manifests/snapshot_ssh_keygen.pp b/modules/roles/manifests/snapshot_ssh_keygen.pp
new file mode 100644 (file)
index 0000000..d9b80cc
--- /dev/null
@@ -0,0 +1,4 @@
+# create the ssh key for snapshot
+class roles::snapshot_ssh_keygen {
+  ssh::keygen {'snapshot': }
+}