blob: dd20b79c5801cb682b174eb796a16b1b38fd676c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
- hosts: ssh-dev
remote_user: debian
become: yes
roles:
- role: sane_debian_system
- role: unix_users
tasks:
- name: "Configure SSH server port"
when: sshd_port is defined
copy:
content: |
Port {{ sshd_port }}
dest: /etc/ssh/sshd_config.d/port.conf
notify: sshd_restart
handlers:
- name: sshd_restart
systemd:
name: ssh
state: restarted
vars:
ansible_python_interpreter: /usr/bin/python3
sane_debian_system_version: 2
sane_debian_system_hostname: "{{ inventory_hostname }}"
sane_debian_system_codename: bullseye
sane_debian_system_mirror: deb.debian.org
unix_users_version: 2
unix_users:
- username: liw
sshd_port: 22
|