Commit 19255cbc authored by Chris Croome's avatar Chris Croome

initial commit

parents
Pipeline #4981 failed with stage
in 22 seconds
---
image: registry.git.coop/webarch/containers/images/ansible:0.1
ansible-lint:
script:
- molecule lint
# Ansible Debian role to install wkhtmltopdf
Due to errors for [ERPNext](https://www.erpnext.org/) with the Debian packaged version of wkhtmltopdf, this role will install from the [wkhtmltopdf site](https://wkhtmltopdf.org/).
The variables in the `defaults/main.yml` file for this role might need updateding using values from the [wkhtmltopdf downloads page](https://wkhtmltopdf.org/downloads.html):
```yml
wkhtmltopdf_deb: wkhtmltox_0.12.5-1.stretch_amd64.deb
wkhtmltopdf_checksums: https://downloads.wkhtmltopdf.org/0.12/0.12.5/SHA256SUMS
wkhtmltopdf_deb_url: https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
```
To use this role you need to use Ansible Galaxy to install it into another repository under `galaxy/roles/wpcli` by adding a `requirements.yml` file in that repo that contains:
```yml
- name: wkhtmltopdf
src: https://git.coop/webarch/wkhtmltopdf.git
version: master
scm: git
```
And a `ansible.cfg` that contains:
```
[defaults]
retry_files_enabled = False
pipelining = True
inventory = hosts.yml
roles_path = galaxy/roles
```
And a `.gitignore` containing:
```
roles/galaxy
```
To pull this repo in run:
```bash
ansible-galaxy install -r requirements.yml --force
```
---
wkhtmltopdf_deb: wkhtmltox_0.12.5-1.stretch_amd64.deb
wkhtmltopdf_checksums: https://downloads.wkhtmltopdf.org/0.12/0.12.5/SHA256SUMS
wkhtmltopdf_deb_url: https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFscptQBEAC7PJXFzF2+6kqZJs0ceZSoKGOdpecsiocW9Eu3mHQFzP81aCte
qMtyMDJlsDfmFiBK0peO98vuQ/LU3ngjYuDCISkC4gSG/X5erx9TLm3M2sMloqmO
VdDqFsCB9xgrKuZBv60hr8CItSHCSmv4acNek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yUAEQEAAYkCPAQYAQoAJhYhBIba
MJHiVVTxVvIU9qhu88uMZM8qBQJbHKbUAhsMBQkDwmcAAAoJEKhu88uMZM8qu3QP
/jZlVJm5QD/FO+/ChLqKQqinwYnUUeuvK4YVUsfeXeojAaVlM7jeEmri5LL0fdwC
HDMaGSABezJ06+h0VSvko4KscPegGahvbELb2DG3QebwkrCgBhTKPqMUCovUYWoi
bWfrjTScHOqvpwmMOR75KzpdtWZCmjCQ52bVo8KlMb4HODnBT06G3MxGYZ2MRJ7D
UOJC5A4n/88nCNswuXoW8nPHbkzVMPuE70Dli8l7TwOEYLMSwSEhckWcyf+Uee+2
YjqRMWD74vizzY09ka6iUO6CMwfEiAAegp9eng+E6UoWnjwn734I0EqTk58wCXRW
AlFYBXk8WS5WKnvvEqfWcRTGQTY45T1t6WwoCVeB/LU3tIfKQYRCfv8LKcA4DW5j
6jjuZIPxQ5J2YiY4Duwwgjq6ZxelPb1MPHuk/9QSZdE5Cj1ABbAqOMXqZ0oRgsNx
Ip9ruA3PY5+eOjbttPOm6kYMXm63CIfX2Wz2IRYfRLYTVp4X4Omk+6W1o4MVLtkD
DK5rbO8aYyGMKaiX24ZLEU4an/7g5G0CP1hZZsWCPuiK/PvhLyUna+Ee8yRQkRwE
961xyP5r5AUv1hmvzabNitzt7ZXdgwZ7sd+5EzyrW1jVOiN/6/rqC3OhK9ydXr5e
a0lpb6tbbN8/OiZTMNvvbP39M6POgUYg9Cu2PvbNwOqb
=XLqQ
-----END PGP PUBLIC KEY BLOCK-----
---
galaxy_info:
role_name: wkhtmltopdf
author: Chris Croome
description: Ansible role for installing wkhtmltopdf
company: Webarchitects Co-operative
license: license (GPLv3)
min_ansible_version: 2.2
platforms:
- name: debian
versions:
- buster
- stretch
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
---
dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
platforms:
- name: instance
image: registry.git.coop/webarch/containers/images/ansible:0.1
pre_build_image: true
provisioner:
name: ansible
lint:
name: ansible-lint
scenario:
name: default
test_sequence:
- lint
- idempotence
---
- name: GPG key present
copy:
src: files/kulkarni.ashish.asc
dest: /root/kulkarni.ashish.asc
- name: GPG key imported
command: gpg --import-key /root/kulkarni.ashish.asc
register: wkhtmltopdf_gpg_import
changed_when: '"not changed" not in wkhtmltopdf_gpg_import.stdout'
- name: Checksums present
get_url:
url: "{{ wkhtmltopdf_checksums }}"
dest: /root/wkhtmltopdf.SHA256SUMS
force: yes
- name: Checksums sig present
get_url:
url: "{{ wkhtmltopdf_checksums }}.asc"
dest: /root/wkhtmltopdf.SHA256SUMS.asc
force: yes
- name: Checksums checked
command: gpg --verify wkhtmltopdf.SHA256SUMS.asc
register: wkhtmltopdf_gpg_verify
args:
chdir: /root
failed_when: '"Good signature" not in wkhtmltopdf_gpg_verify.stdout'
- name: Checksum extracted from SHA256SUMS
shell: "grep {{ wkhtmltopdf_deb }} /root/wkhtmltopdf.SHA256SUMS | awk '{ print $1 }'"
register: wkhtmltopdf_checksum
- name: Set fact for checksum check
set_fact:
wkhtmltopdf_sha256: "sha256:{{ wkhtmltopdf_checksum.stdout }}"
- name: wkhtmltopdf downloaded
get_url:
url: "{{ wkhtmltopdf_deb_url }}"
dest: "/root/{{ wkhtmltopdf_deb }}"
checksum: "{{ wkhtmltopdf_sha256 }}"
force: yes
- name: wkhtmltopdf installed
apt:
deb: "/root/{{ wkhtmltopdf_deb }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment