Compare commits
2 Commits
5602648f15
...
07902c3067
Author | SHA1 | Date |
---|---|---|
|
07902c3067 | 10 months ago |
|
1d6e9fa06f | 10 months ago |
@ -0,0 +1,48 @@
|
||||
---
|
||||
- name: Set up mattermost
|
||||
hosts: localhost
|
||||
vars:
|
||||
uid: "{{ lookup('env','USER') }}"
|
||||
mattermost_url: "{{ lookup('ansible.builtin.pipe','../scripts/get_mattermost_url.sh') }}"
|
||||
connection: local
|
||||
become: false
|
||||
tasks:
|
||||
- name: Have mattermost allready installed
|
||||
stat:
|
||||
path: /usr/local/bin/mattermost
|
||||
register: have_mattermost
|
||||
- name: Download mattermost package
|
||||
ansible.builtin.command:
|
||||
chdir: /tmp
|
||||
cmd: wget "{{ mattermost_url }}" -O mattermost.tar.gz
|
||||
when: not have_mattermost.stat.exists
|
||||
- name: Unpack mattermost package
|
||||
ansible.builtin.command:
|
||||
chdir: /tmp
|
||||
cmd: tar -xzf mattermost.tar.gz
|
||||
when: not have_mattermost.stat.exists
|
||||
- name: Install mattermost package to /opt/mattermost
|
||||
ansible.builtin.command:
|
||||
chdir: /tmp
|
||||
cmd: bash -c "mv mattermost-desktop-* /opt/mattermost-desktop"
|
||||
become: true
|
||||
when: not have_mattermost.stat.exists
|
||||
- name: install mattermost desktop link
|
||||
ansible.builtin.file:
|
||||
src: /opt/mattermost-desktop/mattermost-desktop
|
||||
dest: /usr/local/bin/mattermost-desktop
|
||||
state: link
|
||||
become: true
|
||||
when: not have_mattermost.stat.exists
|
||||
- name: install mattermost desktop file
|
||||
ansible.builtin.template:
|
||||
src: ../templates/mattermost-desktop.desktop.j2
|
||||
dest: /home/{{ uid }}/.local/share/applications/mattermost-desktop.desktop
|
||||
owner: '{{ uid }}'
|
||||
group: '{{ uid }}'
|
||||
mode: '0644'
|
||||
when: not have_mattermost.stat.exists
|
||||
- name: cleanup
|
||||
ansible.builtin.command:
|
||||
cmd: rm /tmp/mattermost.tar.gz
|
||||
when: not have_mattermost.stat.exists
|
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Set up network stuff
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: false
|
||||
vars:
|
||||
uid: "{{ lookup('env','USER') }}"
|
||||
tasks:
|
||||
- name: Allow nm-applet to set wifi
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: ../templates/org.freedesktop.NetworkManager.policy.j2
|
||||
dest: /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
|
||||
- name: Manage ifupdown in NM
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/NetworkManager/NetworkManager.conf
|
||||
regex: managed=false
|
||||
line: managed=true
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Setup pipewire
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: false
|
||||
vars:
|
||||
uid: "{{ lookup('env','USER') }}"
|
||||
tasks:
|
||||
- name: Enable pipewire-audio
|
||||
ansible.builtin.command:
|
||||
cmd: systemctl --user enable --now pipewire-pulse
|
||||
creates: /home/{{ uid }}/.config/systemd/user/default.target.wants/pipewire-pulse.service
|
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
curl -s https://api.github.com/repos/mattermost/desktop/releases/latest \
|
||||
| grep "browser_download_url.*tar.gz" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d \" \
|
||||
| tr -d " " \
|
||||
| grep x64
|
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=mattermost
|
||||
StartupWMClass=Mattermost
|
||||
Comment=Mattermost Desktop
|
||||
GenericName=Mattermost Client for Linux
|
||||
Exec=/usr/local/bin/mattermost-desktop -ozone-platform=wayland --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer %U
|
||||
Icon=/opt/mattermost-desktop/app_icon.png
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Network;InstantMessaging;
|
||||
MimeType=x-scheme-handler/mattermost;
|
Loading…
Reference in new issue