add nginx, sshd, ssl roles
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: install certbot
|
||||
ansible.builtin.apt:
|
||||
name: certbot
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: issue certificate if missing
|
||||
ansible.builtin.command:
|
||||
cmd: >
|
||||
certbot certonly --standalone
|
||||
--non-interactive --agree-tos
|
||||
--register-unsafely-without-email
|
||||
--pre-hook "{{ item.pre_hook }}"
|
||||
--post-hook "{{ item.post_hook }}"
|
||||
{{ item.domains | map('regex_replace', '^(.*)$', '-d \1') | join(' ') }}
|
||||
creates: "/etc/letsencrypt/live/{{ item.domains[0] }}/fullchain.pem"
|
||||
loop: "{{ certbot_certs }}"
|
||||
loop_control:
|
||||
label: "{{ item.domains | join(',') }}"
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: install certbot
|
||||
ansible.builtin.apt:
|
||||
name: certbot
|
||||
state: latest
|
||||
update_cache: true
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: include certbot install
|
||||
ansible.builtin.include_tasks: install.yml
|
||||
|
||||
- name: include certbot configure
|
||||
ansible.builtin.include_tasks: configure.yml
|
||||
Reference in New Issue
Block a user