brokencode
05/25/2023, 10:05 AM$_certificates = $certificates.keys()
$_watch_files = $_certificates.map |$x| { "/etc/letsencrypt/${x}/cert.pem" }
Yury Bushmelev
05/25/2023, 10:19 AM$_watch_files = $certificates.keys().map |$x| { ... }
helindbe
05/25/2023, 3:04 PM$_watch_files = $certificates.keys.map |$x| { ... }
natemccurdy
05/25/2023, 4:04 PMkeys()
function.
Here it is with 1 function call:
$certificates = { 'cert1' => {}, 'cert2' => {} }
$_watch_files = $certificates.map |$k, $_v| { "/etc/letsencrypt/${k}/cert.pem" }
Though the clarity of keys()
is nice.