copy fastcgi_params from default installation
This commit is contained in:
parent
676eb4c7c5
commit
4e2149a266
|
@ -6,13 +6,10 @@
|
|||
- nginx
|
||||
register: nginx_installed
|
||||
|
||||
- name: Remove default nginx directory.
|
||||
tags: nginx
|
||||
ansible.builtin.file:
|
||||
path: /etc/nginx
|
||||
state: absent
|
||||
register: nginx_config_cleared
|
||||
- name: Backup default nginx config
|
||||
command: mv /etc/nginx /etc/nginx.orig
|
||||
when: nginx_installed.changed == true
|
||||
register: nginx_original_config_backup
|
||||
|
||||
- name: Clone h5bp nginx config.
|
||||
tags: nginx
|
||||
|
@ -21,4 +18,15 @@
|
|||
dest: /etc/nginx
|
||||
depth: 1
|
||||
notify: restart nginx
|
||||
when: nginx_config_cleared.changed == true
|
||||
when: nginx_original_config_backup.changed == true
|
||||
|
||||
- name: Copy default fastcgi_params back to h5bp nginx config.
|
||||
command: cp /etc/nginx.orig/fastcgi_params /etc/nginx
|
||||
when: nginx_original_config_backup.changed == true
|
||||
|
||||
- name: Remove default nginx directory.
|
||||
tags: nginx
|
||||
ansible.builtin.file:
|
||||
path: /etc/nginx.orig
|
||||
state: absent
|
||||
when: nginx_original_config_backup.changed == true
|
||||
|
|
Loading…
Reference in New Issue