wait_for_command
This commit is contained in:
@@ -54,6 +54,9 @@ function create() {
|
||||
|
||||
echo -n "creating new container <$CONTAINER> based on image <$CONTAINER_RELEASE>... "
|
||||
bridge_gw=$(lxc network get lxdbr0 ipv4.address | cut -d'/' -f1)
|
||||
packages=(git file bc bash-completion)
|
||||
[[ "$OPTION_SSH" == true ]] && packages+=(openssh-server)
|
||||
packages_string=$(join ', ' "${packages[@]}")
|
||||
user_data="$(
|
||||
cat <<EOF
|
||||
#cloud-config
|
||||
@@ -77,11 +80,7 @@ apt:
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
package_reboot_if_required: true
|
||||
packages:
|
||||
- git
|
||||
- file
|
||||
- bc
|
||||
- bash-completion
|
||||
packages: $packages_string
|
||||
write_files:
|
||||
- path: /etc/sudoers.d/10-add_TOOLBOX_to_secure_path
|
||||
content: >
|
||||
@@ -159,10 +158,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$OPTION_SSH" == true ]]; then
|
||||
lxc exec "$CONTAINER" -- /opt/miaou-bash/tools/idem_apt_install openssh-server
|
||||
fi
|
||||
|
||||
if [[ "$OPTION_SSH" == true && "$OPTION_SAMEUSER" == true ]]; then
|
||||
lxc-miaou-enable-ssh "$CONTAINER"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user