xoxys.certbot/tasks/install.yml

29 lines
640 B
YAML

---
- name: Create certbot user '{{ certbot_user }}'
user:
name: "{{ certbot_user }}"
become: True
become_user: root
when: not certbot_user == 'root'
- name: Deploy certbot
block:
- name: Install certbot
package:
name: certbot
state: present
- name: Create certbot environment
file:
path: "{{ item.name }}"
state: directory
mode: "{{ item.mode }}"
with_items: "{{ certbot_environment }}"
- name: Deploy config file
template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config
become: True
become_user: "{{ certbot_user }}"