From 956d7a23ffd4ea546f9ca69a53b208f986de2fe0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 29 Dec 2017 18:59:04 -0400 Subject: ssh key for homepower upload --- joeyconfig.hs | 1 + src/Propellor/Property/SiteSpecific/JoeySites.hs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index fb26ce6c..96be56c5 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -200,6 +200,7 @@ honeybee = host "honeybee.kitenet.net" $ props & JoeySites.homePowerMonitor (User "joey") + hosts (Context "homepower.joeyh.name") (SshEd25519, "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAmVYddg/RgCbIj+cLcEiddeFXaYFnbEJ3uGj9G/EyV joey@honeybee") & JoeySites.homeRouter diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 019d2209..a77f5041 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -906,8 +906,8 @@ alarmClock oncalendar (User user) command = combineProperties "goodmorning timer ("Login", "LidSwitchIgnoreInhibited", "no") -- My home power monitor. -homePowerMonitor :: IsContext c => User -> c -> (SshKeyType, Ssh.PubKeyText) -> Property (HasInfo + DebianLike) -homePowerMonitor user ctx sshkey = propertyList "home power monitor" $ props +homePowerMonitor :: IsContext c => User -> [Host] -> c -> (SshKeyType, Ssh.PubKeyText) -> Property (HasInfo + DebianLike) +homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ props & Apache.installed & Apt.installed ["python", "python-pymodbus", "rrdtool", "rsync"] & File.ownerGroup "/var/www/html" user (userGroup user) @@ -923,6 +923,7 @@ homePowerMonitor user ctx sshkey = propertyList "home power monitor" $ props `requires` File.ownerGroup (takeDirectory sshkeyfile) user (userGroup user) `requires` File.dirExists (takeDirectory sshkeyfile) + `requires` Ssh.knownHost hosts "kitenet.net" user where d = "/var/www/html/homepower" sshkeyfile = d ".ssh/key" -- cgit v1.3-2-g0d8e