diff options
author | heqnx <root@heqnx.com> | 2025-05-29 19:34:32 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-05-29 19:34:32 +0300 |
commit | b8f1d76bd38d03e68fbc51f8e7340a9963a4104d (patch) | |
tree | 1cf7347b862e4c6059463ea6b811f44a0d37c41c /roles/ssh-port-fwd-user | |
parent | 0e9c8dc71a87b86a9d99c82b5f9aaa37dffeb9bd (diff) | |
download | ansible-playbooks-b8f1d76bd38d03e68fbc51f8e7340a9963a4104d.tar.gz ansible-playbooks-b8f1d76bd38d03e68fbc51f8e7340a9963a4104d.zip |
removed handlers, need to run all the time
Diffstat (limited to 'roles/ssh-port-fwd-user')
-rw-r--r-- | roles/ssh-port-fwd-user/handlers/main.yaml | 6 | ||||
-rw-r--r-- | roles/ssh-port-fwd-user/tasks/main.yaml | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/roles/ssh-port-fwd-user/handlers/main.yaml b/roles/ssh-port-fwd-user/handlers/main.yaml deleted file mode 100644 index 8c5ef88..0000000 --- a/roles/ssh-port-fwd-user/handlers/main.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- name: restart ssh - systemd: - name: ssh - state: restarted - enabled: true - when: ansible_facts['service_mgr'] == 'systemd' diff --git a/roles/ssh-port-fwd-user/tasks/main.yaml b/roles/ssh-port-fwd-user/tasks/main.yaml index 85d7a97..de6b9b8 100644 --- a/roles/ssh-port-fwd-user/tasks/main.yaml +++ b/roles/ssh-port-fwd-user/tasks/main.yaml @@ -64,7 +64,6 @@ owner: root group: root mode: '0644' - notify: restart ssh - name: ensure /etc/ssh/sshd_config includes .d directory lineinfile: @@ -72,7 +71,13 @@ regexp: '^Include /etc/ssh/sshd_config\.d/\*\.conf' line: 'Include /etc/ssh/sshd_config.d/*.conf' insertafter: EOF - notify: restart ssh + +- name: restart ssh + systemd: + name: ssh + state: restarted + enabled: true + when: ansible_service_mgr == 'systemd' - name: fetch private key to control node fetch: |