-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tasks to install correct wkhtmltopdf version and nedded packages #27
Conversation
Isn't this Ansible work? You should just declare which version you need and Ansible will take care of that. If the problem is that in the Ubuntu repositories that specific version is still not available we should just add a PPA or tell Ansible to install the package compiling it or something like that. What do you think? |
tasks/main.yml
Outdated
- git | ||
|
||
- import_tasks: wkhtmltopdf.yml | ||
tags: pdf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
tasks/wkhtmltopdf.yml
Outdated
register: install_wkhtmltopdf | ||
when: "widgetizer_target_version is not defined or 0.12.4 not in wkhtmltopdf_version.stdout" | ||
|
||
- name: Download wkhtmltopdf version 0.12.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get the .deb
package from: https://wkhtmltopdf.org/downloads.html using the checksum
tasks/wkhtmltopdf.yml
Outdated
mode: 0777 | ||
when: "install_wkhtmltopdf is defined or '0.12.4' not in result_b.stdout" | ||
|
||
- name: Untar wkhtmltopdf package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use apt
module to install from deb
file.
With this update we allow install wkhtmltopdf in: * Ubuntu Trusty (14.04) * Ubuntu Xenial (16.04) * Ubuntu Bionic (18.04) https://wkhtmltopdf.org/downloads.html > This change is only tested with Ubuntu, it is not tested in other Linux distributions.
What
Fixing the problem raised when trying to print an invoice.
Propose
I found this gist with the solution to our problem.
The problem is the Wkhtmltopdf version. We need to install the version
0.12.4
and we have installed0.12.2
.I am working on tasks to cover this process and to sure that the correct version was installed.