dotfiles/roles/sshd/tasks/install.yml

21 lines
606 B
YAML
Raw Permalink Normal View History

---
- name: SSH family packages for co-Ubuntu
ansible.builtin.set_fact:
ssh_packages: [openssh, openssh-clients, openssh-server]
when: ansible_distribution not in ("Ubuntu", "Archlinux")
- name: SSH family packages for Ubuntu
ansible.builtin.set_fact:
ssh_packages: [openssh-client, openssh-server]
when: ansible_distribution == "Ubuntu"
- name: SSH family package for 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