156 lines
2.7 KiB
YAML
156 lines
2.7 KiB
YAML
image:
|
|
distribution: openSUSE
|
|
release: tumbleweed
|
|
variant: default
|
|
|
|
source:
|
|
downloader: opensuse-http
|
|
keys:
|
|
- 0x55A0B34D49501BB7CA474F5AA193FBB572174FC2
|
|
|
|
targets:
|
|
lxc:
|
|
create-message: |
|
|
You just created an {{ image.description }} container.
|
|
config:
|
|
- type: all
|
|
before: 5
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/opensuse.common.conf
|
|
|
|
- type: user
|
|
before: 5
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/opensuse.userns.conf
|
|
|
|
- type: all
|
|
after: 4
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/common.conf
|
|
|
|
- type: user
|
|
after: 4
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
|
|
|
|
- type: all
|
|
content: |-
|
|
lxc.arch = {{ image.architecture_kernel }}
|
|
|
|
files:
|
|
- path: /etc/hostname
|
|
generator: hostname
|
|
|
|
- path: /etc/hosts
|
|
generator: hosts
|
|
|
|
- path: /etc/machine-id
|
|
generator: dump
|
|
|
|
- path: /var/lib/dbus/machine-id
|
|
generator: remove
|
|
|
|
- name: ifcfg-eth0
|
|
path: /etc/sysconfig/network/ifcfg-eth0
|
|
generator: dump
|
|
content: |-
|
|
STARTMODE='auto'
|
|
BOOTPROTO='dhcp'
|
|
types:
|
|
- container
|
|
|
|
- name: meta-data
|
|
generator: cloud-init
|
|
variants:
|
|
- cloud
|
|
|
|
- name: network-config
|
|
generator: cloud-init
|
|
variants:
|
|
- cloud
|
|
|
|
- name: user-data
|
|
generator: cloud-init
|
|
variants:
|
|
- cloud
|
|
|
|
- name: vendor-data
|
|
generator: cloud-init
|
|
variants:
|
|
- cloud
|
|
|
|
- path: /etc/fstab
|
|
generator: dump
|
|
content: "# empty fstab to silence cloud-init warnings"
|
|
types:
|
|
- container
|
|
variants:
|
|
- cloud
|
|
|
|
packages:
|
|
manager: zypper
|
|
update: true
|
|
cleanup: true
|
|
sets:
|
|
- packages:
|
|
- apparmor-abstractions
|
|
- apparmor-parser
|
|
- dbus-1
|
|
- elfutils
|
|
- file
|
|
- glib2-tools
|
|
- gzip
|
|
- hardlink
|
|
- hostname
|
|
- iproute2
|
|
- iputils
|
|
- pigz
|
|
- systemd-sysvinit
|
|
- tar
|
|
- which
|
|
- xz
|
|
- nano
|
|
action: install
|
|
|
|
- packages:
|
|
- net-tools
|
|
releases:
|
|
- tumbleweed
|
|
action: install
|
|
|
|
- packages:
|
|
- cloud-init
|
|
- cloud-init-config-suse
|
|
action: install
|
|
variants:
|
|
- cloud
|
|
|
|
actions:
|
|
- trigger: post-packages
|
|
action: |-
|
|
#!/bin/sh
|
|
set -eux
|
|
|
|
# Have the sysconfig network renderer support openSUSE Tumbleweed
|
|
sed -i "s|'opensuse'|'opensuse-tumbleweed'|" $(find /usr -wholename '*/cloudinit/net/sysconfig.py')
|
|
releases:
|
|
- tumbleweed
|
|
variants:
|
|
- cloud
|
|
|
|
- trigger: post-packages
|
|
action: |-
|
|
#!/bin/sh
|
|
set -eux
|
|
|
|
# Enable the cloud-init systemd service
|
|
systemctl enable cloud-init.service cloud-config.service cloud-final.service
|
|
variants:
|
|
- cloud
|
|
|
|
- trigger: post-packages
|
|
action: |-
|
|
#!/bin/sh
|
|
umount -l /etc/resolv.conf || true
|
|
rm /etc/resolv.conf
|
|
ln -sf /var/run/netconfig/resolv.conf /etc/resolv.conf |