Add Ansible template

This commit is contained in:
Mike Jones 2025-05-09 23:45:18 +01:00
parent 1115e86296
commit fa1a1138d6
Signed by: mike
GPG key ID: 1C2C25F83140EF49
22 changed files with 699 additions and 3 deletions

View file

@ -0,0 +1,31 @@
- name: Install NGINX
ansible.builtin.package:
name: nginx
state: present
- name: Enable and start the NGINX service
ansible.builtin.service:
name: nginx
state: started
enabled: true
- name: Deploy NGINX site configuration
ansible.builtin.template:
src: default
dest: /etc/nginx/sites-available/default
mode: '0644'
notify: Reload NGINX
- name: Ensure phone XML directory exists
ansible.builtin.file:
path: /var/www/html/phones
state: directory
mode: '0755'
owner: root
group: root
- name: Upload directory.xml
ansible.builtin.template:
src: directory.xml.j2
dest: /var/www/html/phones/directory.xml
mode: '0644'