mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-07-01 15:38:33 +02:00
klal
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user