use pip to install certbot into user environemnt
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f35134612d
commit
4741a72109
@ -1,4 +1,5 @@
|
||||
---
|
||||
# @var certbot_packages_extra: Extra packages to install with pip (e.g. DNS plugins)
|
||||
certbot_packages_extra: []
|
||||
|
||||
certbot_user: root
|
||||
|
@ -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'
|
||||
become: True
|
||||
become_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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user