23 lines
679 B
YAML
23 lines
679 B
YAML
- 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
|