ansiblebit.wkhtmltopdf
wkhtmltopdf
这是一个用于安装 wkhtmltopdf 的 Ansible 角色。
这个代码库是 AerisCloud/ansible-wkhtmltopdf 的一个分支,但现在与原始工作有了显著的分歧。
测试
系列 | 发行版 | 版本 | 测试状态 |
---|---|---|---|
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: 用于运行调试任务的标志。
- wkhtmltopdf_dir_install: wkhtmltox 命令安装的目录。
- wkhtmltopdf_installation: 安装方式(
package
或source
)。 - wkhtmltopdf_version: 要安装的版本。
- wkhtmltopdf_mm_version: 要安装的主版本和次版本(无需定义)。
- wkhtmltopdf_user: 用于构建软件的帐户。
build
在 build
安装过程中使用的变量。
- wkhtmltopdf_architecture: 架构(
i386
或amd64
)。 - wkhtmltopdf_build: 下载软件的方法(
tarball
或git
)。 - wkhtmltopdf_build_args: 要传递给
build.py
的构建软件的参数。 - wkhtmltopdf_chroot_args: 要传递给
build.py
的设置 chroot 环境的参数。 - wkhtmltopdf_default_version: 标志,指示此版本是否为默认版本。
- wkhtmltopdf_dir_chroot: 设置 chroot 环境的目录。
- wkhtmltopdf_dir_source: 存储源 tarball 的目录。
- wkhtmltopdf_dir_source_version: 解压 tarball 或克隆 git 仓库的目录。
- wkhtmltopdf_force_build: 编译软件。
- wkhtmltopdf_runtime_dependencies: 运行软件所需的包列表。
- wkhtmltopdf_tarball_download_url: 下载 tarball 的 URL。
- wkhtmltopdf_slug: 要克隆的 git 仓库标识符。
- wkhtmltopdf_tarball: tarball 基本名称。
package
- wkhtmltopdf_package_download_url: 下载 debian 包的 URL。
依赖
- ansiblebit/git 如果你想使用
wkhtmltopdf_installation=source
和wkhtmltopdf_build=git
安装。
Playbooks
package
此选项仅对版本 0.12.1 和 0.12.2 有效:
- ubuntu/trusty
- ubuntu/precise
- debian/wheezy
- hosts: servers
vars:
wkhtmltopdf_installation: package
wkhtmltopdf_version: 0.12.1
roles:
- role: ansiblebit.wkhtmltopdf
source
你可以使用 tarball
或 git
从源代码构建。
对于 tarball
:
- hosts: servers
vars:
wkhtmltopdf_build: tarball
wkhtmltopdf_installation: source
roles:
- role: ansiblebit.wkhtmltopdf
对于 git
:
- hosts: servers
vars:
git_version: 2.11.0
wkhtmltopdf_build: git
wkhtmltopdf_installation: source
roles:
- role: ansiblebit.git
- role: ansiblebit.wkhtmltopdf
标签
- configuration: 配置任务。
- build: 构建任务。
- debug: 调试角色变量的任务。
- validation: 验证角色变量的任务。
测试
要运行测试,您需要安装:
要对所有预定义的操作系统/发行版和 ansible 版本运行所有测试:
$ tox
要对 trusty64
运行测试:
$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# 日志文件将保存在 tests/log 下
要在特定环境中进行调试:
$ cd tests
$ vagrant up trusty64.vagrant.dev
# 使用 test.yml playbook 进行配置(根据需要多次进行)
$ vagrant provision trusty64.vagrant.dev
# 访问 Vagrant box
$ vagrant ssh trusty64.vagrant.dev
链接
安装
ansible-galaxy install ansiblebit.wkhtmltopdf
许可证
bsd-3-clause
下载
750
拥有者