MicroOS with single disk #5
@@ -2,6 +2,10 @@ variant: fcos
|
|||||||
version: 1.5.0
|
version: 1.5.0
|
||||||
passwd:
|
passwd:
|
||||||
users:
|
users:
|
||||||
|
- name: root
|
||||||
|
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- "{{ lookup('file', vm_ssh_public_key) | trim }}"
|
||||||
- name: {{ vm_user }}
|
- name: {{ vm_user }}
|
||||||
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ variant: fcos
|
|||||||
version: 1.4.0
|
version: 1.4.0
|
||||||
passwd:
|
passwd:
|
||||||
users:
|
users:
|
||||||
|
- name: root
|
||||||
|
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- "{{ lookup('file', vm_ssh_public_key) | trim }}"
|
||||||
- name: {{ vm_user }}
|
- name: {{ vm_user }}
|
||||||
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
password_hash: "{{ vm_password | password_hash('sha512') }}"
|
||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
|
|||||||
@@ -7,17 +7,6 @@ passwd:
|
|||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
- "{{ lookup('file', vm_ssh_public_key) | trim }}"
|
- "{{ lookup('file', vm_ssh_public_key) | trim }}"
|
||||||
storage:
|
storage:
|
||||||
disks:
|
|
||||||
- device: /dev/vdb
|
|
||||||
wipe_table: true
|
|
||||||
partitions:
|
|
||||||
- label: ext-data
|
|
||||||
number: 1
|
|
||||||
filesystems:
|
|
||||||
- device: /dev/vdb1
|
|
||||||
format: btrfs
|
|
||||||
label: ext-pool
|
|
||||||
wipe_filesystem: true
|
|
||||||
files:
|
files:
|
||||||
- path: /etc/ssh/sshd_config.d/permit_root_login.conf
|
- path: /etc/ssh/sshd_config.d/permit_root_login.conf
|
||||||
mode: 0644
|
mode: 0644
|
||||||
@@ -36,12 +25,12 @@ systemd:
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStartPre=/usr/bin/mkdir -p /run/mnt-ext-init
|
ExecStartPre=/usr/bin/mkdir -p /run/mnt-root-init
|
||||||
ExecStartPre=/usr/bin/mount LABEL=ext-pool /run/mnt-ext-init
|
ExecStartPre=/usr/bin/mount -o subvolid=5 /dev/disk/by-label/ROOT /run/mnt-root-init
|
||||||
# Hier werden die Subvolumes @home angelegt, falls sie nicht existieren
|
# Hier werden die Subvolumes @home angelegt, falls sie nicht existieren
|
||||||
ExecStart=/usr/bin/bash -c "for sub in @home; do [ -d /run/mnt-ext-init/\$$sub ] || /usr/sbin/btrfs subvolume create /run/mnt-ext-init/$$sub; done"
|
ExecStart=/usr/bin/bash -c "for sub in @home; do [ -d /run/mnt-root-init/\$$sub ] || /usr/sbin/btrfs subvolume create /run/mnt-root-init/$$sub; done"
|
||||||
ExecStartPost=/usr/bin/umount /run/mnt-ext-init
|
ExecStartPost=/usr/bin/umount /run/mnt-root-init
|
||||||
ExecStartPost=/usr/bin/rmdir /run/mnt-ext-init
|
ExecStartPost=/usr/bin/rmdir /run/mnt-root-init
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
@@ -55,7 +44,7 @@ systemd:
|
|||||||
Before=local-fs.target
|
Before=local-fs.target
|
||||||
|
|
||||||
[Mount]
|
[Mount]
|
||||||
What=LABEL=ext-pool
|
What=/dev/disk/by-label/ROOT
|
||||||
Where=/home
|
Where=/home
|
||||||
Type=btrfs
|
Type=btrfs
|
||||||
Options=defaults,subvol=@home
|
Options=defaults,subvol=@home
|
||||||
|
|||||||
Reference in New Issue
Block a user