ansible/roles/asterisk/tasks/install_voicemail_api.yml

24 lines
679 B
YAML
Raw Normal View History

2024-11-27 05:08:07 +00:00
- name: Install FastAPI
ansible.builtin.apt:
name: python3-fastapi
update_cache: true
state: latest
- name: Create Voicemail API directory
ansible.builtin.file:
path: /var/lib/asterisk/voicemail_api
state: directory
- name: Install Voicemail API
ansible.builtin.copy:
src: voicemail_api.py
dest: /var/lib/asterisk/voicemail_api/voicemail_api.py
notify: restart voicemail api
- name: Create Voicemail API Service
ansible.builtin.copy:
src: voicemail_api.service
dest: /etc/systemd/system/voicemail_api.service
- name: Start Voicemail API Service
ansible.builtin.service:
name: voicemail_api
state: started
enabled: true