Dev to main #1

Merged
max merged 37 commits from dev into main 2026-08-17 16:15:03 +04:00
2 changed files with 28 additions and 13 deletions
Showing only changes of commit 26c6bc610f - Show all commits
+13
View File
@@ -0,0 +1,13 @@
---
- name: Restart ssh-server Debian
ansible.builtin.service:
name: sshd
state: restarted
changed_when: false # It's just a handler, no need to increase 'changed' counter
- name: Restart ssh-server Ubuntu
ansible.builtin.service:
name: ssh
state: restarted
changed_when: false
+15 -13
View File
@@ -6,6 +6,7 @@
dest: /etc/ssh/sshd_config.d/hardened_sshd.conf
mode: u=rw,g=r,o=r
when: ansible_facts['distribution'] == 'Ubuntu'
notify: Restart ssh-server Ubuntu
- name: Configure ssh-server daemon
ansible.builtin.copy:
@@ -13,6 +14,7 @@
dest: /etc/ssh/sshd_config.d/hardened_sshd.conf
mode: u=rw,g=r,o=r
when: ansible_facts['distribution'] == 'Debian'
notify: Restart ssh-server Debian
- name: Configure ssh client
remote_user: ansible
@@ -21,16 +23,16 @@
dest: /etc/ssh/ssh_config.d/hardened_ssh.conf
mode: u=rw,g=r,o=r
- name: Restart ssh-server Debian
remote_user: ansible
ansible.builtin.service:
name: sshd
state: restarted
when: ansible_facts['distribution'] == 'Debian'
- name: Restart ssh-server Ubuntu
remote_user: ansible
ansible.builtin.service:
name: ssh
state: restarted
when: ansible_facts['distribution'] == 'Ubuntu'
#- name: Restart ssh-server Debian
# remote_user: ansible
# ansible.builtin.service:
# name: sshd
# state: restarted
# when: ansible_facts['distribution'] == 'Debian'
#
#- name: Restart ssh-server Ubuntu
# remote_user: ansible
# ansible.builtin.service:
# name: ssh
# state: restarted
# when: ansible_facts['distribution'] == 'Ubuntu'