add destroy files
This commit is contained in:
parent
bb9ca607a0
commit
19ecb0bca1
@ -19,3 +19,39 @@
|
|||||||
ansible_become: yes
|
ansible_become: yes
|
||||||
ansible_become_method: sudo
|
ansible_become_method: sudo
|
||||||
ansible_become_password: "{{ sudo_password }}"
|
ansible_become_password: "{{ sudo_password }}"
|
||||||
|
|
||||||
|
- name: "Delete symlink"
|
||||||
|
file:
|
||||||
|
path: "/etc/nginx/sites-enabled/{{ item.conf_name }}"
|
||||||
|
state: absent
|
||||||
|
when: "item.conf_name is defined"
|
||||||
|
with_items:
|
||||||
|
- "{{ project }}"
|
||||||
|
vars:
|
||||||
|
ansible_become: yes
|
||||||
|
ansible_become_method: sudo
|
||||||
|
ansible_become_password: "{{ sudo_password }}"
|
||||||
|
|
||||||
|
- name: "remove configure nginx"
|
||||||
|
file:
|
||||||
|
path: "/etc/nginx/sites-available/{{ item.conf_name }}"
|
||||||
|
state: absent
|
||||||
|
when: "item.conf_name is defined"
|
||||||
|
with_items:
|
||||||
|
- "{{ project }}"
|
||||||
|
vars:
|
||||||
|
ansible_become: yes
|
||||||
|
ansible_become_method: sudo
|
||||||
|
ansible_become_password: "{{ sudo_password }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- name: restart nginx
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
||||||
|
vars:
|
||||||
|
ansible_become: yes
|
||||||
|
ansible_become_method: sudo
|
||||||
|
ansible_become_password: "{{ sudo_password }}"
|
Loading…
x
Reference in New Issue
Block a user