refactor ansible code in to ansible-2.0 folder, and created space for ansible-2.10
This commit is contained in:
31
ansible-2.0/roles/certbot/tasks/uninstall.yml
Normal file
31
ansible-2.0/roles/certbot/tasks/uninstall.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
# uninstall certbot
|
||||
|
||||
- name: stop nginx before removing it
|
||||
service:
|
||||
name: nginx
|
||||
state: stopped
|
||||
|
||||
- name: uninstall certbot on ubuntu 16.04
|
||||
apt:
|
||||
state: absent
|
||||
package: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
with_items:
|
||||
- "letsencrypt"
|
||||
- "nginx"
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: remove webroot /var/www/xai-corp.net
|
||||
file:
|
||||
state: absent
|
||||
path: /var/www/xai-corp.net
|
||||
|
||||
- name: remove cron job for renewing certs
|
||||
cron:
|
||||
name: renew let's encrypt certificates
|
||||
state: absent
|
||||
user: root
|
||||
day: "*/2"
|
||||
job: "letsencrypt renew "
|
||||
Reference in New Issue
Block a user