This commit is contained in:
2025-05-06 18:15:06 +02:00
parent 9e3ce2e113
commit d2c7c49d68

View File

@ -47,6 +47,15 @@
mode: '0755'
owner: root
group: root
- name: Create dir
ansible.builtin.file:
path: /myapps/mqtt_srv/
state: directory
mode: '0755'
owner: root
group: root
- name: Upload service script config
ansible.builtin.copy:
src: "{{ dest_folder }}/mqtt_srv.cfg"
@ -91,21 +100,21 @@
- name: Upload service script2
ansible.builtin.copy:
src: "{{ dest_folder }}/mqtt_srv.py"
dest: /usr/bin/mqtt_srv.py
dest: /myapps/mqtt_srv/mqtt_srv.py
mode: '755'
owner: admin
remote_src: true
when: inventory_hostname == 'nas.home.lan'
- name: Install bottle python package
- name: Install venv
ansible.builtin.apt:
name:
- python3-virtualenv
- name: Install specified python requirements in indicated (virtualenv)
ansible.builtin.pip:
name: "{{ item }}"
loop:
- paho-mqtt
- getmac
- ping3
- psutil
- autorandr
requirements: /myapps/mqtt_srv/requirements.txt
virtualenv: /myapps/mqtt_srv/venv
when: inventory_hostname != 'nas.home.lan'
- name: Just force systemd to reread configs (2.4 and above)