dotfiles/roles/ssh_server/tasks/install.yml
Matej Focko 0135bcd48f
chore: rename ‹ssh› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:10:22 +01:00

19 lines
596 B
YAML

---
- name: Set default family of packages for SSH
ansible.builtin.set_fact:
ssh_packages: [openssh, openssh-clients, openssh-server]
- name: Set family of packages for SSH on Debian-based OSs
ansible.builtin.set_fact:
ssh_packages: [openssh-client, openssh-server]
when: ansible_distribution in [ "Debian", "Ubuntu" ]
- name: Set family of packages for SSH on archLinux
ansible.builtin.set_fact:
ssh_packages: [openssh]
when: ansible_distribution == "Archlinux"
- name: Install the SSH family
ansible.builtin.package:
name: "{{ ssh_packages }}"
state: present