Merge "elements: Add new openssh-server element"
This commit is contained in:
commit
7644681815
@ -1 +1,2 @@
|
|||||||
debian-minimal
|
debian-minimal
|
||||||
|
openssh-server
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
openssh-server:
|
|
||||||
file:
|
file:
|
||||||
less:
|
less:
|
||||||
kbd:
|
kbd:
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
dib-init-system
|
dib-init-system
|
||||||
install-static
|
install-static
|
||||||
package-installs
|
openssh-server
|
||||||
|
@ -1 +1 @@
|
|||||||
package-installs
|
openssh-server
|
||||||
|
@ -1 +0,0 @@
|
|||||||
openssh-server:
|
|
14
elements/openssh-server/README.rst
Normal file
14
elements/openssh-server/README.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
==============
|
||||||
|
openssh-server
|
||||||
|
==============
|
||||||
|
This element ensures that openssh server is installed and enabled during boot.
|
||||||
|
|
||||||
|
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
Most cloud images come with the openssh server service installed and enabled
|
||||||
|
during boot. However, certain cloud images, especially those created by the
|
||||||
|
\*-minimal elements may not have it installed or enabled. In these cases,
|
||||||
|
using this element may be helpful to ensure your image will accessible via SSH.
|
||||||
|
It's usually helpful to combine this element with others such as the
|
||||||
|
`runtime-ssh-host-keys`.
|
3
elements/openssh-server/element-deps
Normal file
3
elements/openssh-server/element-deps
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dib-init-system
|
||||||
|
package-installs
|
||||||
|
runtime-ssh-host-keys
|
10
elements/openssh-server/pkg-map
Normal file
10
elements/openssh-server/pkg-map
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"family": {
|
||||||
|
"suse": {
|
||||||
|
"openssh-server": "openssh"
|
||||||
|
},
|
||||||
|
"gentoo": {
|
||||||
|
"openssh-server": "openssh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
elements/openssh-server/post-install.d/80-enable-sshd-service
Executable file
29
elements/openssh-server/post-install.d/80-enable-sshd-service
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
case "$DIB_INIT_SYSTEM" in
|
||||||
|
upstart)
|
||||||
|
# nothing to do
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
systemd)
|
||||||
|
if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then
|
||||||
|
systemctl enable ssh.service
|
||||||
|
else
|
||||||
|
systemctl enable sshd.service
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
openrc)
|
||||||
|
# let dib-init-system's postinstall handle enabling init scripts
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported init system"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
4
releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml
Normal file
4
releasenotes/notes/openssh-server-0f6d065748a2fc18.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- New openssh-server element to ensure that the openssh
|
||||||
|
server is installed and enabled during boot.
|
Loading…
Reference in New Issue
Block a user