Skip to content
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

Merged
merged 5 commits into from
Feb 6, 2019

Conversation

danypr92
Copy link
Member

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 installed 0.12.2.

I am working on tasks to cover this process and to sure that the correct version was installed.

@enricostano
Copy link
Contributor

enricostano commented Aug 21, 2018

I am working on tasks to cover this process and to sure that the correct version was installed.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

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
Copy link
Member Author

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

mode: 0777
when: "install_wkhtmltopdf is defined or '0.12.4' not in result_b.stdout"

- name: Untar wkhtmltopdf package
Copy link
Member Author

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.

@enricostano enricostano changed the title WIP: Added tasks to install correct wkhtmltopdf version and nedded packages Added tasks to install correct wkhtmltopdf version and nedded packages Feb 6, 2019
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.
@enricostano enricostano merged commit 1096c17 into master Feb 6, 2019
@enricostano enricostano deleted the fix/print-invoices-wkthtmltopdf-error branch February 6, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants