33 lines
916 B
YAML
33 lines
916 B
YAML
---
|
|
|
|
- name: Install dependencies
|
|
ansible.builtin.package:
|
|
name: "python3-venv"
|
|
state: present
|
|
|
|
- name: Clone Yealink XML-Browser
|
|
ansible.builtin.git: # noqa: latest
|
|
repo: "{{ repo_xml_browser }}"
|
|
dest: "{{ path_yealink_xml_browser }}"
|
|
force: true
|
|
accept_hostkey: true
|
|
key_file: "{{ deploy_key_file }}"
|
|
|
|
- name: Install specified python requirements in indicated (virtualenv)
|
|
ansible.builtin.pip:
|
|
requirements: "{{ path_yealink_xml_browser }}/requirements.txt"
|
|
virtualenv: "{{ path_yealink_xml_browser }}/.venv"
|
|
virtualenv_command: 'python3 -m venv'
|
|
|
|
- name: Install systemd unit
|
|
template: src=yealink-xml-browser.service.j2 dest=/lib/systemd/system/yealink-xml-browser.service
|
|
notify:
|
|
- Reload systemd
|
|
- Restart yealink-xml-browser
|
|
|
|
- name: Enable yealink-xml-browser
|
|
ansible.builtin.service:
|
|
name: yealink-xml-browser
|
|
state: started
|
|
enabled: yes
|