mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 18:18:45 +00:00
Add doc/examples with an example
Signed-off-by: Ana Guerrero Lopez <ana.guerrero@collabora.com>
This commit is contained in:
committed by
Sjoerd Simons
parent
b19980c41a
commit
cd486ecb6d
34
doc/examples/example.yaml
Normal file
34
doc/examples/example.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
{{- $architecture := or .architecture "arm64" -}}
|
||||
{{- $suite := or .suite "stretch" -}}
|
||||
{{ $image := or .image (printf "debian-%s-%s.tgz" $suite $architecture) }}
|
||||
|
||||
architecture: {{ $architecture }}
|
||||
|
||||
actions:
|
||||
- action: debootstrap
|
||||
suite: "buster"
|
||||
components:
|
||||
- main
|
||||
- contrib
|
||||
- non-free
|
||||
mirror: https://deb.debian.org/debian
|
||||
variant: minbase
|
||||
|
||||
- action: apt
|
||||
description: Install some packages
|
||||
packages: [ sudo, openssh-server, adduser, systemd-sysv, firmware-linux ]
|
||||
|
||||
- action: run
|
||||
chroot: true
|
||||
script: setup-user.sh
|
||||
|
||||
- action: overlay
|
||||
source: overlays/sudo
|
||||
|
||||
- action: run
|
||||
chroot: true
|
||||
command: echo debian > /etc/hostname
|
||||
|
||||
- action: pack
|
||||
file: {{ $image }}
|
||||
compression: gz
|
||||
1
doc/examples/overlays/sudo/etc/sudoers.d/user
Normal file
1
doc/examples/overlays/sudo/etc/sudoers.d/user
Normal file
@@ -0,0 +1 @@
|
||||
%sudo ALL=(ALL) NOPASSWD: /usr/bin/su
|
||||
10
doc/examples/setup-user.sh
Executable file
10
doc/examples/setup-user.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "I: create user"
|
||||
adduser --gecos User user
|
||||
|
||||
echo "I: set user password"
|
||||
echo "user:user" | chpasswd
|
||||
adduser user sudo
|
||||
Reference in New Issue
Block a user