xoxys.certbot/tasks/install.yml

31 lines
701 B
YAML
Raw Normal View History

---
- name: Create certbot user '{{ certbot_user }}'
user:
name: "{{ certbot_user }}"
become: True
become_user: root
2018-06-22 21:43:16 +02:00
when: not certbot_user == 'root'
- name: Deploy certbot
block:
- name: Install certbot
package:
name: certbot
state: present
- name: Create certbot environment
2018-06-22 21:39:52 +02:00
file:
path: "{{ item.name }}"
state: directory
2018-06-22 21:39:52 +02:00
mode: "{{ item.mode }}"
with_items: "{{ certbot_environment }}"
2018-06-22 21:45:25 +02:00
loop_control:
label: "{{ item.name }}"
- name: Deploy config file
template:
2018-06-22 21:59:02 +02:00
src: config/cli.ini.j2
2018-06-22 22:03:31 +02:00
dest: "{{ certbot_config_dir }}cli.ini"
become: True
become_user: "{{ certbot_user }}"