Install slack

main
Micke Nordin 1 year ago
parent 2e30be2ff4
commit 466d3bec35

@ -0,0 +1,29 @@
---
- name: Set up slack
hosts: localhost
vars:
uid: "{{ lookup('env','USER') }}"
slack_version: "{{ lookup('ansible.builtin.pipe','../scripts/get_slack_version.sh') }}"
connection: local
become: false
tasks:
- name: Have slack allready installed
stat:
path: /usr/bin/slack
register: have_slack
- name: Install slack package
become: true
ansible.builtin.apt:
deb: https://downloads.slack-edge.com/releases/linux/{{ slack_version }}/prod/x64/slack-desktop-{{ slack_version }}-amd64.deb
when: not have_slack.stat.exists
- name: set up local desktop dir
ansible.builtin.file:
dest: /home/{{ uid }}/.local/share/applications
state: directory
- name: set up better desktop file
ansible.builtin.template:
src: ../templates/slack.desktop.j2
dest: /home/{{ uid }}/.local/share/applications/slack.desktop
owner: '{{ uid }}'
group: '{{ uid }}'
mode: '0644'

@ -0,0 +1,6 @@
#!/bin/bash
curl -s https://slack.com/release-notes/linux \
| grep -E '<h2 class="u-flex u-align--center">Slack ' \
| sed -e 's/.*<h2 class="u-flex u-align--center">Slack //g' -e 's#</h2>.*##g' \
| head -1

@ -5,6 +5,7 @@
- import_playbook: playbooks/fonts.yaml
- import_playbook: playbooks/pass.yaml
- import_playbook: playbooks/ssh.yaml
- import_playbook: playbooks/slack.yaml
- import_playbook: playbooks/sway.yaml
- import_playbook: playbooks/zsh.yaml
# needs pass

Loading…
Cancel
Save