tlshd: First version of role

This commit is contained in:
Timo Makinen 2024-12-17 18:14:42 +00:00
parent 9d6418ca71
commit 121687ad7c
3 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,30 @@
---
- name: Install packages
ansible.builtin.package:
name: ktls-utils
- name: Configure tlshd
ansible.builtin.template:
dest: /etc/tlshd.conf
src: tlshd.conf.j2
mode: "0644"
owner: root
group: "{{ ansible_wheel }}"
notify: Restart tlshd
- name: Configure tlshd private key
ansible.builtin.copy:
dest: "{{ tls_private }}/tlshd.key"
src: "{{ tls_private }}/{{ inventory_hostname }}.key"
mode: "0600"
owner: root
group: "{{ ansible_wheel }}"
remote_src: true
tags: certificates
notify: Restart tlshd
- name: Enable tlshd services
ansible.builtin.service:
name: tlshd
state: started
enabled: true