aboutsummaryrefslogtreecommitdiffstats
path: root/roles/sshd/tasks/main.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-12-12 22:51:55 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-12-17 17:02:24 +0100
commit970a107492c31a43bb77f6f5e0096b41adc2c2f4 (patch)
tree614ee1b08379eb5838aaf004e58f31880127bc9d /roles/sshd/tasks/main.yml
parentdb698b595e7ff088c96d00ef5285a0d634aff1be (diff)
downloadrules-970a107492c31a43bb77f6f5e0096b41adc2c2f4.tar.gz
refactor: split sshd and ssh key synchronization
Diffstat (limited to 'roles/sshd/tasks/main.yml')
-rw-r--r--roles/sshd/tasks/main.yml13
1 files changed, 8 insertions, 5 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml
index df5d845..b895958 100644
--- a/roles/sshd/tasks/main.yml
+++ b/roles/sshd/tasks/main.yml
@@ -1,15 +1,18 @@
---
+- name: install openssh
+ ansible.builtin.package:
+ name: openssh
+ state: present
+ when: ansible_distribution in ["Archlinux"]
+
- name: generate sshd configuration
ansible.builtin.template:
src: sshd_config.j2
dest: /etc/ssh/sshd_config
owner: 0
group: 0
- mode: 0644
-
-- name: include key synchronization tasks
- ansible.builtin.include_tasks: synchronize_keys.yml
+ mode: "0644"
- name: enable and restart sshd
ansible.builtin.service:
@@ -19,6 +22,6 @@
- name: check ssh connection
ansible.builtin.wait_for:
- port: "{{ ansible_port }}"
+ port: "{{ sshd_listen_port }}"
delay: 1
state: started
remember that computers suck.