Install ansible dependencies at the dependency hook

This commit is contained in:
Luke Murphy 2020-04-13 10:25:44 +02:00
parent 552597f3f1
commit 83152487f1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 17 additions and 0 deletions

6
deps/requirements.yml vendored Normal file
View File

@ -0,0 +1,6 @@
---
- src: dokku_bot.ansible_dokku
version: v2020.3.24
- src: https://git.coop/decentral1se/autonomic.gandi/-/archive/0.0.5/autonomic.gandi-0.0.5.tar.gz
name: autonomic.gandi

View File

@ -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() {