Files
ansible-collection/roles/stunnel4/tasks/main.yml
T

32 lines
796 B
YAML
Raw Normal View History

2026-10-02 21:34:01 +04:00
---
- name: install stunnel4
ansible.builtin.apt:
name: stunnel4
state: latest
update_cache: true
- name: ensure stunnel4 run directory exists
ansible.builtin.file:
path: /var/run/stunnel4
owner: stunnel4
group: stunnel4
state: directory
mode: "0755"
- name: ensure stunnel4 log directory exists
ansible.builtin.file:
path: /var/log/stunnel4
state: directory
owner: stunnel4
group: stunnel4
mode: "0755"
- name: deploy stunnel4 config
ansible.builtin.template:
src: "{{ item }}"
dest: "/etc/stunnel/{{ item | basename | regex_replace('\\.j2$', '') }}"
owner: root
group: root
mode: '0644'
loop: "{{ query('fileglob', role_path + '/templates/' + inventory_hostname + '/*.conf.j2') }}"
notify: restart stunnel4