use pip to install certbot into user environemnt
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-04-20 23:21:54 +02:00
parent f35134612d
commit 4741a72109
2 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,5 @@
---
# @var certbot_packages_extra: Extra packages to install with pip (e.g. DNS plugins)
certbot_packages_extra: []
certbot_user: root

View File

@ -1,21 +1,19 @@
---
- block:
- name: Install certbot
package:
name: "{{ item }}"
state: present
loop: "{{ certbot_packages_extra + __certbot_packages }}"
- name: Create certbot user '{{ certbot_user }}'
user:
name: "{{ certbot_user }}"
become: True
become_user: root
when: not certbot_user == 'root'
- name: Create certbot user '{{ certbot_user }}'
user:
name: "{{ certbot_user }}"
become: True
become_user: root
when: not certbot_user == 'root'
- block:
- name: Install certbot with pip
pip:
name: "{{ item }}"
executable: pip3
extra_args: --user
loop: "{{ certbot_packages_extra + __certbot_packages }}"
- name: Create certbot environment
file:
path: "{{ item.name }}"