linux-config/roles/lsd_user/tasks/main.yml
2021-10-28 18:19:25 +03:00

26 lines
797 B
YAML

- name: Install LSDeluxe (RHEL family)
become: true
package:
name: lsd
state: present
when: ansible_distribution in ["Fedora", "CentOS", "RedHat"]
- name: Check if lsd is installed (Debian Family)
command: dpkg-query -W lsd
register: lsd_package_check
failed_when: lsd_package_check.rc > 1
changed_when: lsd_package_check.rc == 1
when: ansible_distribution in ["Debian", "Ubuntu"]
#===== Debian Only - No need for ansible_disrebution
- name: Download LSDeluxe deb file (Debian Family)
get_url:
url: https://github.com/Peltoche/lsd/releases/download/0.20.1/lsd-musl_0.20.1_amd64.deb
dest: ./lsd.deb
when: lsd_package_check.changed
- name: Install LSDeluxe Deb file (Debian Family)
become: true
apt:
deb: ./lsd.deb
when: lsd_package_check.changed