acertmgr: switch vom git clone to deb package
This commit is contained in:
parent
ea9cef86c5
commit
0d5f9d3d1c
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
acertmgr_version: 0.8.2
|
|
@ -3,25 +3,27 @@
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
apt: name={{ item }}
|
apt: name={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- git
|
- python3-cryptography
|
||||||
- python-cryptography
|
- python3-dnspython
|
||||||
- python-dnspython
|
- python3-yaml
|
||||||
- python-yaml
|
- python3-pkg-resources
|
||||||
|
|
||||||
|
- name: Find current acertmgr version
|
||||||
|
get_url: url="https://raw.githubusercontent.com/moepman/acertmgr/master/version.txt" dest=/tmp/acertmgr.version
|
||||||
|
vars:
|
||||||
|
ansible_connection: local
|
||||||
|
|
||||||
- name: Install acertmgr
|
- name: Install acertmgr
|
||||||
git: repo=https://github.com/moepman/acertmgr.git dest=/opt/acertmgr depth=1 version={{ acertmgr_version }}
|
apt: deb="https://github.com/moepman/acertmgr/releases/download/{{ lookup('file', '/tmp/acertmgr.version') }}/python3-acertmgr_{{ lookup('file', '/tmp/acertmgr.version') }}-1_all.deb"
|
||||||
|
|
||||||
- name: Create config directories
|
- name: Create config directories
|
||||||
file: path={{ item }} state=directory mode=0755
|
file: path=/etc/acertmgr state=directory mode=0755
|
||||||
with_items:
|
|
||||||
- /etc/acme
|
|
||||||
- /etc/acme/domains.d
|
|
||||||
|
|
||||||
- name: Configure acertmgr
|
- name: Configure acertmgr
|
||||||
template: src=acme.conf.j2 dest=/etc/acme/acme.conf
|
template: src=acertmgr.conf.j2 dest=/etc/acertmgr/acertmgr.conf
|
||||||
|
|
||||||
- name: Create challenge directory
|
- name: Create challenge directory
|
||||||
file: path=/var/www/acme-challenge/ owner=root mode=0755 state=directory
|
file: path=/var/www/acme-challenge/ owner=root mode=0755 state=directory
|
||||||
|
|
||||||
- name: Enable acertmgr cronjob
|
- name: Enable acertmgr cronjob
|
||||||
cron: name=certmgr special_time=daily job=/opt/acertmgr/acertmgr.py
|
cron: name=certmgr special_time=daily job=/usr/bin/acertmgr
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
mode: {{ acertmgr_mode }}
|
mode: {{ acertmgr_mode }}
|
||||||
webdir: /var/www/acme-challenge/
|
webdir: /var/www/acme-challenge/
|
||||||
ttl_days: 30
|
authority_tos_agreement: true
|
||||||
authority: "https://acme-v01.api.letsencrypt.org"
|
|
@ -4,4 +4,4 @@
|
|||||||
service: name=nginx state=restarted
|
service: name=nginx state=restarted
|
||||||
|
|
||||||
- name: Run acertmgr
|
- name: Run acertmgr
|
||||||
command: /opt/acertmgr/acertmgr.py
|
command: /usr/bin/acertmgr
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
file: path=/var/www/html state=directory mode=0755
|
file: path=/var/www/html state=directory mode=0755
|
||||||
|
|
||||||
- name: Configure certificate manager
|
- name: Configure certificate manager
|
||||||
template: src=certs.j2 dest=/etc/acme/domains.d/{{ ansible_fqdn }}.conf
|
template: src=certs.j2 dest=/etc/acertmgr/{{ ansible_fqdn }}.conf
|
||||||
notify: Run acertmgr
|
notify: Run acertmgr
|
||||||
|
|
||||||
- name: Configure vhosts
|
- name: Configure vhosts
|
||||||
|
Loading…
Reference in New Issue
Block a user