feat: Enhance setup-profiles.bash for selective updates

The `setup-profiles.bash` script has been enhanced to allow for selective updates of LXD profiles.
Users can now specify one or more profile names as arguments to update only those specific profiles.
If no arguments are provided, the script will default to updating all profiles found in the `profiles/` directory,
maintaining the previous behavior.

This change improves flexibility and control when managing LXD profiles.

Co-authored-by: Gemini CLI <gemini-cli@google.com>
This commit is contained in:
xavierandGemini CLI committed 2025-07-04 19:07:27 +02:00
1 parent e42dd60d83
commit 6eee6eafee
3 files changed
+80 -28

No files matched your search

+29 -12
View File
@@ -1,17 +1,34 @@
# lxc-profiles
# LXD Profiles
## Create traefik instance
This repository contains a collection of LXD profiles and network configurations designed to streamline the deployment and management of LXD containers.
### Create container
lxc init ubuntu:lts -p default -p zfs -p front -p traefik -p letsencrypt traefik
## Directory Structure
### Fix ip address
lxc network attach front traefik eth0 eth0
lxc config device set traefik eth0 ipv4.address 10.112.16.10
- `profiles/`: Contains various LXD profile definitions categorized by their purpose (e.g., applications, networking, storage).
- `network/`: Defines LXD network configurations.
- `docs/`: Additional documentation and helper scripts.
- `setup-profiles.bash`: A utility script to manage LXD profiles.
### Start it
lxc start traefik
## Usage
### Check it
lxc exec traefik -- cloud-init status --wait
lxc shell traefik
### `setup-profiles.bash`
This script allows you to create and update LXD profiles based on the YAML files in the `profiles/` directory.
#### Update all profiles
To update all profiles defined in this repository, run the script without any arguments:
```bash
./setup-profiles.bash
```
#### Update specific profiles
To update one or more specific profiles, provide their names as arguments to the script:
```bash
./setup-profiles.bash docker traefik
```
This will update only the `docker` and `traefik` profiles.