COnfigure SSH bastion

This commit is contained in:
Jake Howard
2019-12-08 15:55:19 +00:00
committed by Jake Howard
parent 0d3daba374
commit b0277c2f46
8 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,20 @@
- name: Define context
set_fact:
user: jake
enable_root: true
- name: SSH config
template:
src: files/ssh/sshd_config_bastion
dest: /etc/ssh/sshd_config
validate: /usr/sbin/sshd -t -f %s
backup: yes
become: true
become_user: root
register: sshd_config
- name: Restart SSH config
service:
name: sshd
state: reloaded
when: sshd_config.changed