From f39b76249c675004d10170e4bd9cdce0404dbc5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 25 Jul 2025 12:19:13 +0300 Subject: [PATCH] Add SSH tasks in Deployer tasks --- tasks/deployer.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tasks/deployer.yml b/tasks/deployer.yml index f11f8b9..1a18377 100644 --- a/tasks/deployer.yml +++ b/tasks/deployer.yml @@ -1,4 +1,27 @@ --- +- name: "Deployer - SSH - Add Authorized Keys" + ansible.builtin.file: + src: './files/ssh/authorized_keys' + dest: '~/.ssh/authorized_keys' + tags: + - ssh + +- name: "Deployer - SSH - Config" + ansible.builtin.template: + src: './files/ssh/sshd_config' + dest: '/etc/ssh/sshd_config' + register: deployerTaskS1 + tags: + - ssh + +- name: "Installer : SSH : Restart" + ansible.builtin.systemd_service: + name: ssh + state: restarted + enabled: true + when: + - (deployerTaskS1 is defined and deployerTaskS1.changed) or deployerTaskS1 is undefined + - name: "Deployer - Yggdrasil - Configure - Create Folder" ansible.builtin.file: path: "~/data/yggdrasil/"