ansible-infra/playbooks/roles/foobazdmx/tasks/main.yaml
yuri 33d1cfca1f
Move become: true into esphome role
Move become: true into zigbee2mqtt role

Remove become: true from deploy_public_reverse_proxy playbook

Remove become: true from deploy_dokuwiki playbook

Move become: true from deploy_audio_pi and deploy_light playbooks into roles

Remove become: true from deploy_keycloak playbook

Move become: true from deploy_automation playbook to mosquitto role
2023-05-10 18:02:10 +02:00

49 lines
1.3 KiB
YAML

- name: Ensure apt dependencies are installed
become: true
ansible.builtin.apt:
name:
- acl
- git
- python3
- python3-pip
- python3-setuptools
- name: Ensure python peotry is installed
become: true
ansible.builtin.pip:
name: poetry
- name: Ensure foobazdmx user exists
become: true
ansible.builtin.user:
name: foobazdmx
- name: Install foobazdmx
notify: Restart foobazdmx
block:
- name: Clone foobazdmx repository
become: true
ansible.builtin.git:
repo: https://thinkcccentre-ansible:glpat-VegCzyjuDjB19SggAqm1@gitlab.hamburg.ccc.de/yuri/foobazdmx.git
dest: /opt/foobazdmx
version: bf6170aa12fa5de9b9667be9b744ad7ee6157dde
- name: Install python dependencies
become: true
become_user: foobazdmx
ansible.builtin.command:
cmd: poetry install
chdir: /opt/foobazdmx
changed_when: false
- name: Generate foobazdmx service file
become: true
ansible.builtin.template:
src: foobazdmx.service.j2
dest: /etc/systemd/system/foobazdmx.service
mode: "0755"
- name: Enable and start foobazdmx service
become: true
ansible.builtin.systemd:
service: foobazdmx.service
state: started
enabled: true