diff options
Diffstat (limited to 'roles/ssh/tasks/main.yml')
| -rw-r--r-- | roles/ssh/tasks/main.yml | 10 |
1 files changed, 0 insertions, 10 deletions
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] |
