nginx не работает

This commit is contained in:
2024-05-11 23:22:04 +03:00
parent a9c534f3b5
commit 21c1fac9c6
3 changed files with 47 additions and 20 deletions
+17 -19
View File
@@ -11,14 +11,6 @@
name: "*"
state: latest
- name: Install nginx 'Ubuntu'
when: ansible_os_family == 'Debian'
ansible.builtin.apt:
package:
- nginx
state: present
update_cache: true
- name: Install EPEL repo
when: ansible_os_family == 'RedHat'
ansible.builtin.yum:
@@ -26,23 +18,13 @@
- epel-release
state: present
- name: Install nginx & git 'RedHat'
- name: Install git 'RedHat'
when: ansible_os_family == 'RedHat'
ansible.builtin.yum:
name:
- nginx
- git
state: present
- name: Copy config nginx
ansible.builtin.template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
owner: root
group: root
mode: "0644"
notify: Reload nginx service
- name: Install NodeJS-18 FRONTEND
when: "'node1' in inventory_hostname"
become: true
@@ -97,4 +79,20 @@
command: npm start
args:
chdir: /src/sample-project/notes-backend/
- name: Install nginx 'Ubuntu'
when: ansible_os_family == 'Debian'
ansible.builtin.apt:
package:
- nginx
state: present
update_cache: true
- name: Copy config nginx
when: "'node1' in inventory_hostname"
ansible.builtin.template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
owner: root
group: root
mode: "0644"
notify: Reload nginx service