Skip to content

Commit

Permalink
Merge pull request #2 from ansiblebit/develop
Browse files Browse the repository at this point in the history
new variables
  • Loading branch information
steenzout authored Dec 9, 2016
2 parents cc3b767 + ec90626 commit e6e75da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ Variables used in the `build` installation process.

- **wkhtmltopdf_architecture**: architecture (`i386` or `amd64`).
- **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_build_dependencies**: list of packages needed to build the software.
- **wkhtmltopdf_chroot_args**: argument to be passed to `build.py` in order to setup the chroot environment.
- **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.
Expand All @@ -69,19 +71,19 @@ Variables used in the `build` installation process.
### package

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
- hosts: servers
vars:
wkhtmltopdf_installation: package
wkhtmltopdf_version: 0.12.1

roles:
- role: ansiblebit.wkhtmltopdf
roles:
- role: ansiblebit.wkhtmltopdf
```


### source
Expand Down
6 changes: 4 additions & 2 deletions tasks/source/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
with_items:
- wkhtmltopdf_architecture
- wkhtmltopdf_build
- wkhtmltopdf_build_args
- wkhtmltopdf_build_dependencies
- wkhtmltopdf_chroot_args
- wkhtmltopdf_dir_chroot
- wkhtmltopdf_dir_install
- wkhtmltopdf_dir_source
Expand All @@ -30,7 +32,7 @@
- include: "{{ wkhtmltopdf_build }}.yml"

- name: build | setup chroot environment
shell: scripts/build.py setup-schroot-generic
shell: "scripts/build.py {{ wkhtmltopdf_chroot_args }}"
register: task_setup_chroot
changed_when: not task_setup_chroot.stdout.find('skipped')
args:
Expand All @@ -40,7 +42,7 @@
become: yes

- name: build | build binaries
shell: "scripts/build.py linux-generic-{{ wkhtmltopdf_architecture }}"
shell: "scripts/build.py { wkhtmltopdf_build_args }}"
register: task_build
changed_when: not task_build.stdout.find('Nothing to be done')
args:
Expand Down
3 changes: 3 additions & 0 deletions vars/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

wkhtmltopdf_architecture: amd64

wkhtmltopdf_build_args: "linux-generic-{{ wkhtmltopdf_architecture }}"
wkhtmltopdf_build_dependencies:
- build-essential
- libssl-dev
- openssl
- xorg

wkhtmltopdf_chroot_args: setup-schroot-generic

wkhtmltopdf_dir_chroot: /var/chroot
wkhtmltopdf_dir_source: "{{ ansible_env.HOME }}"
wkhtmltopdf_dir_source_version: "{{ wkhtmltopdf_dir_source }}/wkhtmltox-{{ wkhtmltopdf_version }}"
Expand Down

0 comments on commit e6e75da

Please sign in to comment.