summaryrefslogtreecommitdiffstats
path: root/roles/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ssh')
-rw-r--r--roles/ssh/tasks/install-archlinux.yml1
-rw-r--r--roles/ssh/tasks/install-debian.yml1
-rw-r--r--roles/ssh/tasks/main.yml10
3 files changed, 0 insertions, 12 deletions
diff --git a/roles/ssh/tasks/install-archlinux.yml b/roles/ssh/tasks/install-archlinux.yml
index 58b6fa9d..2086c6d1 100644
--- a/roles/ssh/tasks/install-archlinux.yml
+++ b/roles/ssh/tasks/install-archlinux.yml
@@ -5,4 +5,3 @@
name: "{{ ssh_package_name }}"
state: present
update_cache: true
- tags: [required_for_boot]
diff --git a/roles/ssh/tasks/install-debian.yml b/roles/ssh/tasks/install-debian.yml
index 452bf003..316a0096 100644
--- a/roles/ssh/tasks/install-debian.yml
+++ b/roles/ssh/tasks/install-debian.yml
@@ -5,4 +5,3 @@
name: "{{ ssh_package_name }}"
state: "present"
update_cache: true
- tags: [required_for_boot]
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
index f88b9be4..c09d00e1 100644
--- a/roles/ssh/tasks/main.yml
+++ b/roles/ssh/tasks/main.yml
@@ -1,11 +1,9 @@
---
- name: "Include OS-specific variables"
ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml"
- tags: [required_for_boot]
- name: "Install OS-specific packages"
ansible.builtin.include_tasks: "install-{{ ansible_os_family | lower }}.yml"
- tags: [required_for_boot]
- name: "Ensure ssh_service is enabled"
become: true
@@ -14,7 +12,6 @@
state: "started"
enabled: true
when: not ansible_is_chroot
- tags: [required_for_boot]
- name: "(chroot): Ensure ssh_service enabled"
# noqa: command-instead-of-module intentional isnide chroot
@@ -22,28 +19,24 @@
cmd: "systemctl enable {{ ssh_service_name }}"
when: ansible_is_chroot
changed_when: true
- tags: [required_for_boot]
- name: "Generate /etc/ssh/ RSA host key"
become: true
ansible.builtin.command:
cmd: "ssh-keygen -q -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -C '' -N ''"
creates: "/etc/ssh/ssh_host_rsa_key"
- tags: [required_for_boot]
- name: "Generate /etc/ssh/ ECDSA host key"
become: true
ansible.builtin.command:
cmd: "ssh-keygen -q -t ecdsa -b 521 -f /etc/ssh/ssh_host_ecdsa_key -C '' -N ''"
creates: "/etc/ssh/ssh_host_ecdsa_key"
- tags: [required_for_boot]
- name: "Generate /etc/ssh/ Ed25519 host key"
become: true
ansible.builtin.command:
cmd: "ssh-keygen -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -C '' -N ''"
creates: "/etc/ssh/ssh_host_ed25519_key"
- tags: [required_for_boot]
- name: "Configure sshd_config"
become: true
@@ -68,7 +61,6 @@
notify:
- "Reload systemd"
- "Restart ssh"
- tags: [required_for_boot]
- name: "Configure ssh authentication policy"
become: true
@@ -87,7 +79,6 @@
X11Forwarding no
notify:
- "Restart ssh"
- tags: [required_for_boot]
- name: "Add arg.username to allowed users"
become: true
@@ -99,4 +90,3 @@
AllowUsers {{ username }}
notify:
- "Restart ssh"
- tags: [required_for_boot]