Skip to content
Snippets Groups Projects
Commit 1f6ee155 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

acmebot: install package in venv

parent a444637d
No related branches found
No related tags found
1 merge request!53Acmebot install package
Pipeline #6737 passed
/var/log/acmebot/*.log {
weekly
missingok
rotate 12
compress
delaycompress
notifempty
}
......@@ -3,29 +3,30 @@
- name: ensure requirements for acmebot are installed
apt:
name:
- python3-appdirs
- python3-pyparsing
- python3-packaging
- python3-openssl
- python3-dns
- python3-cryptography
- python3-asn1crypto
- python3-acme
- python3-yaml
- python3-virtualenv
- virtualenv
state: present
- name: get the acmebot repository
git:
repo: https://github.com/plinss/acmebot.git
dest: /opt/acmebot
- name: check whether acmebot is still installed via git
stat:
path: /opt/acmebot/.git
register: file_status
- name: remove the git repository if still exists
file:
path: /opt/acmebot
state: absent
when: file_status.stat.exists
- name: setup a venv
pip:
name: acmebot
version: "{{acmebot_version}}"
force: true
environment:
TMPDIR: /root/.ansible/tmp
virtualenv: /opt/acmebot/venv
- name: add acmebot to path
file:
src: /opt/acmebot/src/acmebot/acmebot.py
src: /opt/acmebot/venv/bin/acmebot
dest: /usr/local/sbin/acmebot
state: link
......@@ -84,7 +85,9 @@
state: absent
- name: rotate acmebot logs
file:
src: /opt/acmebot/logrotate.d/acmebot
copy:
src: logrotate
dest: /etc/logrotate.d/acmebot
state: link
mode: '0644'
owner: root
group: root
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment