范例1
#cloud-config
# vim: ft=yaml:
autoinstall:
version: 1
early-commands:
- ['cat', '/autoinstall.yaml']
refresh-installer:
# update: yes
update: no
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://us.archive.ubuntu.com/ubuntu
- arches: [default]
uri: http://ports.ubuntu.com/ubuntu-ports
# sources:
# git-ppa:
# source: ppa:git-core/ppa
# Enabling this breaks the install at configuring grub
#conf: |
# APT::Install-Recommends 'false';
# Place any extra packages you know you want here. Keep in mind it will install
# recommended packages so maybe hold off until install is finished
# packages:
# - git
identity:
hostname: ubuntu2004
# this is the hashed password 'ubuntu'. Changing it is highly recommended
# password: 1
password: $6$jnQmaDU9IJN6k1h0$59E30A1iWt8wcdkDL0QBoEWpmWC5G5Vbvy.kLZwpOUyFF6dsfS.FznQY/cQZBMc4.0o2nYyOgx3QfrsT/S0VV/
realname: wang
username: wang
keyboard:
layout: us
toggle: ''
variant: ''
locale: en_US
# Default to use dhcp
#network:
# ethernets:
# enp0s3: {dhcp4: true}
# version: 2
# Enter your apt cache server (have used apt-cacher-ng from 18.04 successfully)
#proxy: http://example.com:3142/
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
config:
-
id: disk-sda
type: disk
grub_device: true
name: ""
#path: /dev/sda
match:
size: largest
preserve: false
ptable: gpt
wipe: superblock
-
id: partition-0
type: partition
device: disk-sda
flag: bios_grub
number: 1
preserve: false
size: 1048576
-
id: partition-1
type: partition
device: disk-sda
flag: ""
number: 2
preserve: false
size: 1073741824
wipe: superblock
-
id: format-0
type: format
fstype: ext4
preserve: false
volume: partition-1
-
id: partition-2
type: partition
device: disk-sda
number: 3
preserve: false
flag: ""
size: -1
wipe: superblock
-
id: lvm_volgroup-0
type: lvm_volgroup
devices:
- partition-2
name: Volgroup00
preserve: false
-
id: lvm_partition-0
type: lvm_partition
name: root
preserve: false
# size: 4294967296B
size: -1
volgroup: lvm_volgroup-0
-
id: format-1
type: format
fstype: ext4
preserve: false
volume: lvm_partition-0
-
id: mount-1
type: mount
device: format-1
path: /
-
id: mount-0
type: mount
device: format-0
path: /boot
late-commands:
- "echo 'APT::Install-Recommends "false";' >/target/etc/apt/apt.conf.d/02InstallRecommends"
# power_state:
# delay: now
# mode: poweroff
# message: Powering off
# timeout: 2
# condition: true
范例2
#cloud-config
# vim: ft=yaml:
autoinstall:
version: 1
early-commands:
- ['cat', '/autoinstall.yaml']
refresh-installer:
# update: yes
update: no
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://us.archive.ubuntu.com/ubuntu
- arches: [default]
uri: http://ports.ubuntu.com/ubuntu-ports
# sources:
# git-ppa:
# source: ppa:git-core/ppa
# Enabling this breaks the install at configuring grub
#conf: |
# APT::Install-Recommends 'false';
# Place any extra packages you know you want here. Keep in mind it will install
# recommended packages so maybe hold off until install is finished
# packages:
# - git
identity:
hostname: ubuntu2004
# this is the hashed password 'ubuntu'. Changing it is highly recommended
# password: 1
password: $6$jnQmaDU9IJN6k1h0$59E30A1iWt8wcdkDL0QBoEWpmWC5G5Vbvy.kLZwpOUyFF6dsfS.FznQY/cQZBMc4.0o2nYyOgx3QfrsT/S0VV/
realname: wang
username: wang
keyboard:
layout: us
toggle: ''
variant: ''
locale: en_US
# Default to use dhcp
#network:
# ethernets:
# enp0s3: {dhcp4: true}
# version: 2
# Enter your apt cache server (have used apt-cacher-ng from 18.04 successfully)
#proxy: http://example.com:3142/
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
config:
-
ptable: gpt
path: /dev/sda
wipe: superblock
preserve: false
name: ''
grub_device: true
type: disk
id: disk-sda
-
device: disk-sda
size: 1048576
flag: bios_grub
number: 1
preserve: false
grub_device: false
type: partition
id: partition-0
-
device: disk-sda
size: 1073741824
wipe: superblock
flag: ''
number: 2
preserve: false
grub_device: false
type: partition
id: partition-1
-
fstype: ext4
volume: partition-1
preserve: false
type: format
id: format-0
-
device: disk-sda
size: 213671477248
wipe: superblock
flag: ''
number: 3
preserve: false
grub_device: false
type: partition
id: partition-2
-
name: Volgroup00
devices: [partition-2]
preserve: false
type: lvm_volgroup
id: lvm_volgroup-0
-
name: LVhome
volgroup: lvm_volgroup-0
size: 2147483648B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-1
-
fstype: ext4
volume: lvm_partition-1
preserve: false
type: format
id: format-2
-
name: LVroot
volgroup: lvm_volgroup-0
size: 21474836480B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-2
-
fstype: ext4
volume: lvm_partition-2
preserve: false
type: format
id: format-3
-
path: /
device: format-3
type: mount
id: mount-3
-
name: LVvar
volgroup: lvm_volgroup-0
size: 21474836480B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-3
-
fstype: ext4
volume: lvm_partition-3
preserve: false
type: format
id: format-4
-
path: /var
device: format-4
type: mount
id: mount-4
-
name: LVtmp
volgroup: lvm_volgroup-0
size: 10737418240B
wipe: superblock
preserve: false
type: lvm_partition
id: lvm_partition-4
-
fstype: ext4
volume: lvm_partition-4
preserve: false
type: format
id: format-5
-
path: /tmp
device: format-5
type: mount
id: mount-5
-
path: /boot
device: format-0
type: mount
id: mount-0
-
path: /home
device: format-2
type: mount
id: mount-2
# power_state:
# delay: now
# mode: poweroff
# message: Powering off
# timeout: 2
# condition: true
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: Spring中Environment详解,一文搞透Spring运行环境Environment
文章目录 一、理解 Spring Environment 抽象 1、源码初识 二、Environment 占位符处理 1、Spring 3.1 前占位符处理 2、Spring 3.1 + 占位符处理 3、代码实例 三、条件配置 Spring Profiles …