Files
ansible/tasks/general/sshd-config.yml

14 lines
447 B
YAML

---
- name: Ensure the TCPKeepAlive option is uncommented and set to yes
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: "^#?TCPKeepAlive"
line: "TCPKeepAlive yes"
state: present
- name: Ensure the ClientAliveInterval option is uncommented and set to 10 seconds
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: "^#?ClientAliveInterval"
line: "ClientAliveInterval 10"
state: present