Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
steenzout committed May 26, 2017
2 parents 84f5725 + 9d1f717 commit c41958c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sudo: yes

matrix:
include:
- python: 2.7
env: TOXENV=py27-ansible23
- python: 2.7
env: TOXENV=py27-ansible22
- python: 2.7
env: TOXENV=py27-ansible21
- python: 2.7
Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ wkhtmltopdf_mm_version: "{{ '.'.join(wkhtmltopdf_version.split('.')[0:2]) }}"
## package

wkhtmltopdf_package: "wkhtmltox-{{ wkhtmltopdf_version }}_linux-{{ ansible_distribution_release }}-{{ (ansible_architecture == 'x86_64') | ternary('amd64', 'i386') }}.deb"
wkhtmltopdf_package_download_url: "http://download.gna.org/wkhtmltopdf/{{ wkhtmltopdf_mm_version }}/{{ wkhtmltopdf_version }}/{{ wkhtmltopdf_package }}"
wkhtmltopdf_package_download_url: "https://downloads.wkhtmltopdf.org/{{ wkhtmltopdf_mm_version }}/{{ wkhtmltopdf_version }}/{{ wkhtmltopdf_package }}"


## source
Expand Down Expand Up @@ -48,4 +48,4 @@ wkhtmltopdf_runtime_dependencies:
wkhtmltopdf_slug: wkhtmltopdf/wkhtmltopdf

wkhtmltopdf_tarball: "wkhtmltox-{{ wkhtmltopdf_version }}.tar.bz2"
wkhtmltopdf_tarball_download_url: "http://download.gna.org/wkhtmltopdf/{{ wkhtmltopdf_mm_version }}/{{ wkhtmltopdf_version }}/{{ wkhtmltopdf_tarball }}"
wkhtmltopdf_tarball_download_url: "https://downloads.wkhtmltopdf.org/{{ wkhtmltopdf_mm_version }}/{{ wkhtmltopdf_version }}/{{ wkhtmltopdf_tarball }}"
2 changes: 1 addition & 1 deletion tasks/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: debug
debug:
var="{{ item }}"
when: "{{ item }} is defined"
when: item is defined
with_items:
- wkhtmltopdf_installation
- wkhtmltopdf_mm_version
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

- name: desired version is installed? => task_already_installed
shell: "wkhtmltopdf --version | grep 'wkhtmltopdf {{ wkhtmltopdf_version }} (with patched qt)'"
when: (task_installed is defined and task_installed.rc == 0)
when: task_installed is defined and task_installed|failed
register: task_already_installed
changed_when: no
failed_when: no

- include: "{{ wkhtmltopdf_installation }}/main.yml"
when: (task_installed is defined and task_installed.rc != 0) or
(task_already_installed is defined and task_already_installed.rc != 0)
when: (task_installed is defined and task_installed|failed) or
(task_already_installed is defined and task_already_installed|failed)
tags: installation
2 changes: 1 addition & 1 deletion tasks/package/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: debug package variables
debug:
var="{{ item }}"
when: "{{ item }} is defined"
when: item is defined
with_items:
- wkhtmltopdf_package
- wkhtmltopdf_package_download_url
2 changes: 1 addition & 1 deletion tasks/source/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: debug build variables
debug:
var="{{ item }}"
when: "{{ item }} is defined"
when: item is defined
with_items:
- wkhtmltopdf_architecture
- wkhtmltopdf_build
Expand Down
13 changes: 6 additions & 7 deletions tasks/source/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@
- include: validation.yml
tags: validation

- name: build | install runtime dependencies
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
become: yes
when: (task_version_installed is defined and task_version_installed.rc != 0)
with_items: "{{ wkhtmltopdf_runtime_dependencies }}"

- name: build | is this desired version installed? => task_version_installed
shell: "test -e {{ wkhtmltopdf_dir_install }}/wkhtmltopdf-{{ wkhtmltopdf_version }}"
register: task_version_installed
changed_when: no
failed_when: no

- name: build | install build dependencies
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
become: yes
when: (task_version_installed is defined and task_version_installed.rc != 0)
with_items:
- "{{ wkhtmltopdf_runtime_dependencies }}"

- name: build | download and install source (using tarball or git)
include: "{{ wkhtmltopdf_build }}.yml"
when: (task_version_installed is defined and task_version_installed.rc != 0)
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
{py27}-ansible{21,20}
{py27}-ansible{23,22,21,20}

skipsdist = True

Expand All @@ -9,6 +9,8 @@ skipsdist = True
changedir = tests

deps =
ansible23: ansible>=2.3,<2.4
ansible22: ansible>=2.2,<2.3
ansible21: ansible>=2.1,<2.2
ansible20: ansible>=2.0,<2.1

Expand Down

0 comments on commit c41958c

Please sign in to comment.