From 6a5000a557ac6ab4fbb2af3ac66190895f530996 Mon Sep 17 00:00:00 2001 From: Magnus Andersson Date: Thu, 29 Aug 2024 11:02:30 +0200 Subject: [PATCH] multinode-db1 test: Add rclone and statistics remote --- manifests/multinode_db.pp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/manifests/multinode_db.pp b/manifests/multinode_db.pp index dc5aec8..8e6563e 100644 --- a/manifests/multinode_db.pp +++ b/manifests/multinode_db.pp @@ -14,4 +14,28 @@ class sunetdrive::multinode_db(){ mode => '0744', } } + if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ { + notify { 'hostmessage': + message => "We are on multinode-db1. Set up statistics environment.", + } + $rclone_url = 'https://downloads.rclone.org/rclone-current-linux-amd64.deb' + $local_path = '/tmp/rclone-current-linux-amd64.deb' + exec { 'rclone_deb': + command => "/usr/bin/wget -q ${rclone_url} -O ${local_path}", + creates => $local_path, + } + package { 'rclone': + ensure => installed, + provider => dpkg, + source => $local_path, + require => Exec['rclone_deb'], + } + file { '/root/.rclone.conf': + ensure => file, + content => template('sunetdrive/mariadb_backup/rclone.conf.erb'), + owner => 'root', + group => 'root', + mode => '0600', + } + } }