Add Ansible template
This commit is contained in:
parent
1115e86296
commit
fa1a1138d6
22 changed files with 699 additions and 3 deletions
31
roles/nginx/tasks/main.yml
Normal file
31
roles/nginx/tasks/main.yml
Normal 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'
|
Loading…
Add table
Add a link
Reference in a new issue