Ansible role to install wkhtmltopdf.
This repo was a fork of AerisCloud/ansible-wkhtmltopdf but, currently, it has diverged significantly from the original work.
Family | Distribution | Version | Test Status |
---|---|---|---|
Debian | Debian | Jessie | |
Debian | Debian | Wheezy | |
Debian | Ubuntu | Yakkety | |
Debian | Ubuntu | Xenial | |
Debian | Ubuntu | Wily | |
Debian | Ubuntu | Trusty | |
Debian | Ubuntu | Precise |
- ansible >= 2.0
- debug: flag to run debug tasks.
- wkhtmltopdf_dir_install: directory where the wkhtmltox commands will be installed.
- wkhtmltopdf_installation: installation process (
package
orsource
). - wkhtmltopdf_version: version to be installed.
- wkhtmltopdf_mm_version: major and minor version to be installed (no need to define).
- wkhtmltopdf_user: account used to build the software.
Variables used in the build
installation process.
- wkhtmltopdf_architecture: architecture (
i386
oramd64
). - wkhtmltopdf_build: method to download software (
tarball
,git
). - wkhtmltopdf_build_args: argument to be passed to
build.py
in order to build the software. - wkhtmltopdf_chroot_args: argument to be passed to
build.py
in order to setup the chroot environment. - wkhtmltopdf_default_version: flag to indicate if this version is the default one.
- wkhtmltopdf_dir_chroot: directory to setup chroot environment.
- wkhtmltopdf_dir_source: directory where to store the source tarball.
- wkhtmltopdf_dir_source_version: directory where to extract the tarball or clone the git repository.
- wkhtmltopdf_force_build: compile software.
- wkhtmltopdf_runtime_dependencies: list of packages needed to run the software.
- wkhtmltopdf_tarball_download_url: URL to download tarball.
- wkhtmltopdf_slug: git repository slug to be cloned.
- wkhtmltopdf_tarball: tarball basename.
- wkhtmltopdf_package_download_url: URL to download debian package.
- ansiblebit/git if you want to install using
wkhtmltopdf_installation=source
andwkhtmltopdf_build=git
This option is only available for versions 0.12.1 and 0.12.2 on:
- ubuntu/trusty
- ubuntu/precise
- debian/wheezy
- hosts: servers
vars:
wkhtmltopdf_installation: package
wkhtmltopdf_version: 0.12.1
roles:
- role: ansiblebit.wkhtmltopdf
You can build from source using a tarball
or git
.
For tarball
:
- hosts: servers
vars:
wkhtmltopdf_build: tarball
wkhtmltopdf_installation: source
roles:
- role: ansiblebit.wkhtmltopdf
For git
:
- hosts: servers
vars:
git_version: 2.11.0
wkhtmltopdf_build: git
wkhtmltopdf_installation: source
roles:
- role: ansiblebit.git
- role: ansiblebit.wkhtmltopdf
- configuration: configuration tasks.
- build: build tasks.
- debug: task to debug role variables.
- validation: task to validate role variables.
To run the tests you will need to install:
To run all tests against all pre-defined OS/distributions * ansible versions:
$ tox
To run tests for trusty64
:
$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# log file will be stores under tests/log
To perform debugging on a specific environment:
$ cd tests
$ vagrant up trusty64.vagrant.dev
# to provision using the test.yml playbook (as many time as you need)
$ vagrant provision trusty64.vagrant.dev
# to access the Vagrant box
$ vagrant ssh trusty64.vagrant.dev