Files
cgrates/data/ansible/rpm_packages/nginx.yaml
2021-09-07 07:44:10 +02:00

26 lines
644 B
YAML

---
- name: Rename the default nginx.conf to nginx.conf.original
become: true
shell: "sudo mv -v /etc/nginx/nginx.conf /etc/nginx/nginx.conf.original"
- name: Add nginx.conf in nginx
become: true
template:
src: nginx.conf.j2
dest: "/etc/nginx/nginx.conf"
mode: '0666'
owner: "{{ rootUser }}"
- name: Allow nginx in firewall
become: true
shell: "sudo firewall-cmd --permanent --zone=public --add-service=https --add-service=http"
- name: Restart the firewall
become: true
shell: "sudo firewall-cmd --reload"
- name: Restart the nginx so the change take effects
systemd:
state: restarted
name: nginx