ssh-client module: the mesh owns ~/.ssh (to-be 29) — HOLD until to-be 29 deploy #114

Open
jschoubben wants to merge 1 commits from feat/ssh-client-module into main
+26
View File
@@ -0,0 +1,26 @@
{
"module": "ssh-client",
"version": "1",
"resources": [
{
"id": "openssh",
"type": "package",
"package": "openssh"
},
{
"id": "ssh-dir",
"type": "directory",
"path": "${machine:account-home}/.ssh",
"owner": "${machine:account}",
"mode": "0700"
}
],
"facts": {
"ssh-config": {
"path": ".ssh/config",
"home": true,
"shared": true,
"template": "# The mesh's Host blocks — every other node, so `ssh <node>` reaches it as the\n# right account. This region is replaced whenever a node joins, leaves or is\n# renamed; the rest of this file is yours and is kept untouched.\n{{range .Machines}}{{if ne .Name $.Node}}\nHost {{.Name}} {{.FQDN}}\n HostName {{.FQDN}}\n{{if .Account}} User {{.Account}}\n{{end}}{{end}}{{end}}"
}
}
}