Install Certbot from system packages

This commit is contained in:
Alex Kotov 2020-01-14 17:59:51 +05:00
parent 3976546fa7
commit 33dd694352
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 4 additions and 1875 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'package_name',
[
'bash-completion',
'certbot',
'colordiff',
'curl',
'iptables-persistent',
@ -56,16 +57,6 @@ def test_nginx_default_removed(host):
assert not host.file('/etc/nginx/sites-enabled/default').exists
def test_certbot_exe(host):
f = host.file('/usr/local/bin/certbot-auto')
assert f.exists
assert f.is_file
assert f.user == 'root'
assert f.group == 'root'
assert f.mode == 0o755
def test_certbot_cli_config(host):
f = host.file('/etc/letsencrypt/cli.ini')

View File

@ -1,11 +1,7 @@
---
- name: Install Certbot
copy:
src: files/certbot/certbot-auto
dest: /usr/local/bin/certbot-auto
mode: 'u=rwx,g=rx,o=rx'
owner: root
group: root
apt:
name: certbot
- name: Create directory for Let's Encrypt configuration
file:
@ -32,7 +28,7 @@
group: root
- name: Obtain Let's Encrypt certificate
command: 'certbot-auto certonly'
command: 'certbot certonly'
register: common__certbot__result
when: common__certbot__run|bool
changed_when: >-