Install ansible dependencies at the dependency hook
This commit is contained in:
11
functions
11
functions
@ -56,11 +56,22 @@ dokku-ansible-deploy-dependencies() {
|
||||
declare desc="install plugin dependencies"
|
||||
|
||||
declare DEPENDENCIES="ansible python3 python3-dev python3-ruamel.yaml"
|
||||
declare REQUIREMENTS="$PLUGIN_CORE_AVAILABLE_PATH/ansible-deploy/deps/requirements.yml"
|
||||
|
||||
dokku_col_log_info1_quiet "Ensuring the following packages are installed: $DEPENDENCIES"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt install -qq -y "$DEPENDENCIES"
|
||||
|
||||
dokku_col_log_info1_quiet "Installing Ansible requirements"
|
||||
ansible-galaxy install --role-file "$REQUIREMENTS" --force
|
||||
|
||||
dokku_col_log_info1_quiet "Copying Ansible library modules into place"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
mkdir -p $DOKKU_ROOT/.ansible/{roles,plugins/modules}
|
||||
# shellcheck disable=SC2086
|
||||
cp -R $DOKKU_ROOT/.ansible/roles/*/library/* $DOKKU_ROOT/.ansible/plugins/modules
|
||||
}
|
||||
|
||||
dokku-ansible-deploy-post-extract() {
|
||||
|
Reference in New Issue
Block a user