I want to run a command for each container that is created using my profile. The profile looks like this:
config:
user.user-data: |
#cloud-config
package_upgrade: true
packages:
- python3
runcmd:
- "touch /tmp/test.txt"
description: Description
devices:
eth0:
name: eth0
nictype: macvlan
parent: enp4s0
type: nic
root:
path: /
pool: default
type: disk
name: my-profile
The /tmp/test.txt
file is just not there when I log into my running container. And that is an issue. The worst part is that there are no error messages or any other logs that could help.
According to their documentation, runcmd
does exist as an option in "cloud-init".