linux-config/roles/ncspot_user/tasks/main.yml

54 lines
1.3 KiB
YAML

- name: Install ncspot dependencies (RHEL)
become: true
package:
name: &ncspot_deps_rhel
- pulseaudio-libs-devel
- libxcb-devel
- openssl-devel
- ncurses-devel
- dbus-devel
state: present
when: ansible_facts['os_family'] == "RedHat"
- name: Install ncspot dependencies (Debian)
become: true
package:
name: &ncspot_deps_debian
- libncursesw5-dev
- libdbus-1-dev
- libpulse-dev
- libssl-dev
- libxcb1-dev
- libxcb-render0-dev
- libxcb-shape0-dev
- libxcb-xfixes0-dev
state: present
when: ansible_facts['os_family'] == "Debian"
- name: Installing nscpot
vars:
rustup_user: "{{ running_user }}"
rustup_cargo_crates: [ncspot]
ansible.builtin.include_role:
name: hurricanehrndz.rustup
- name: Setting up ncspot alias (spot)
ansible.builtin.lineinfile:
line: alias spot=ncspot
state: present
path: ~/.shellconfig/aliases.sh
insertafter: EOF
- name: Remove ncspot dependencies (RHEL)
become: true
package:
name: *ncspot_deps_rhel
state: absent
when: ansible_facts['os_family'] == "RedHat"
- name: Remove ncspot dependencies (Debian)
become: true
package:
name: *ncspot_deps_debian
state: absent
when: ansible_facts['os_family'] == "Debian"