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_packages_extra: []
certbot_user: root certbot_user: root

View File

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