Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: configure cloud-init from a file #13455

Merged
merged 2 commits into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doc/cloud-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ Then send the following request:
}
}'

### Configure `cloud-init` through the CLI

If you are using the CLI to configure your instance, write the configuration to a file and include that in your request.
For example, create `cloud-init.yml` with the following content:

#cloud-config
package_upgrade: true
packages:
- package1
- package2

Then run the following command:

lxc config set <instance_name> cloud-init.user-data - < cloud-init.yml

## How to check the `cloud-init` status

`cloud-init` runs automatically on the first start of an instance.
Expand Down
Loading