feat: Ajout des profiles
This commit is contained in:
1 parent
9be5866a4d
commit
0a62df7352
12 files changed
+354
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
export BASEDIR=$( cd $(dirname $0) && pwd )
|
||||
|
||||
echo "BASEDIR=$BASEDIR"
|
||||
|
||||
(
|
||||
cd $BASEDIR
|
||||
for file in profiles/*/*profile.yaml
|
||||
do
|
||||
name=$(basename $file .profile.yaml)
|
||||
echo "--- Profile ${name} ---"
|
||||
if ( lxc profile show "${name}" &> /dev/null )
|
||||
then
|
||||
echo "Profile ${name} already exists. Skipping..."
|
||||
else
|
||||
echo "Profile ${name} does not exists. Creating..."
|
||||
lxc profile create "${name}"
|
||||
fi
|
||||
echo "Updating..."
|
||||
echo lxc profile edit "${name}" < "${file}"
|
||||
done
|
||||
)
|
||||
Reference in new issue
Block a user