Created
December 15, 2021 11:32
-
-
Save raek/251b82fa83dab5b3aedb1c00504f8f44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install Pladder | |
hosts: all | |
tasks: | |
- name: Install system dependencies | |
become: yes | |
apt: | |
pkg: | |
- build-essential | |
- pkg-config | |
- git | |
- python3 | |
- python3-venv | |
- python3-pip | |
- python3-wheel | |
- python3-gi | |
- libsystemd-dev | |
- name: Enable linger for user | |
become: yes | |
copy: | |
dest: "/var/lib/systemd/linger/{{ ansible_user }}" | |
force: no | |
content: "" | |
- name: Install Pladder in an virtual environment | |
pip: | |
name: "pladder[systemd] @ git+https://github.com/raek/pladder.git" | |
virtualenv: "{{ ansible_env.HOME }}/.cache/pladder-venv" | |
virtualenv_command: /usr/bin/python3 -m venv | |
virtualenv_site_packages: yes | |
- name: Install systemd unit files | |
command: | |
cmd: "{{ ansible_env.HOME }}/.cache/pladder-venv/bin/pladder-systemd update-unit-files" | |
creates: "{{ ansible_env.HOME }}/.config/systemd/user/pladder-*" | |
- name: Enable and start pladder bot service | |
systemd: | |
scope: user | |
daemon_reload: yes | |
unit: pladder-bot.service | |
enabled: yes | |
state: started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment