mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-11-22 07:20:05 +00:00
removed giteaUninstall var
This commit is contained in:
parent
feaea47028
commit
06548bf135
@ -1,3 +1,2 @@
|
||||
---
|
||||
giteaPort: 3000
|
||||
giteaUninstall: false
|
||||
giteaPort: 3000
|
@ -22,4 +22,5 @@
|
||||
- name: Fetch backup
|
||||
fetch:
|
||||
src: /etc/gitea/gitea-dump.zip
|
||||
dest: backups
|
||||
dest: backups/gitea-dump.zip
|
||||
flat: true
|
@ -42,30 +42,4 @@
|
||||
- name: Backup db
|
||||
include_tasks: backup.yml
|
||||
tags: ['never', 'backup']
|
||||
when: giteaUninstall == false
|
||||
|
||||
- name: Uninstall Gitea
|
||||
block:
|
||||
- name: Stop Gitea
|
||||
systemd:
|
||||
name: gitea
|
||||
enabled: no
|
||||
state: stopped
|
||||
|
||||
- name: Remove Gitea package
|
||||
package:
|
||||
name: gitea
|
||||
state: absent
|
||||
|
||||
- name: Remove Gitea repository
|
||||
apt_repository:
|
||||
filename: morph027-gitea
|
||||
repo: deb https://packaging.gitlab.io/gitea gitea main
|
||||
state: absent
|
||||
|
||||
- name: Remove Gitea key
|
||||
file:
|
||||
path: /etc/apt/trusted.gpg.d/morph027-gitea.gpg
|
||||
state: absent
|
||||
when: gitea_key.stat.exists == false or gitea_key.stat.mode != "0644"
|
||||
when: giteaUninstall == true and ('gitea' in ansible_facts.packages)
|
||||
tags: ['gitea', 'backup']
|
||||
|
0
roles/gitea/tasks/restore.yml
Normal file
0
roles/gitea/tasks/restore.yml
Normal file
@ -1,3 +1,2 @@
|
||||
---
|
||||
giteaPort: 3000
|
||||
giteaUninstall: false
|
||||
giteaPort: 3000
|
@ -22,14 +22,12 @@
|
||||
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||
force: no
|
||||
notify: setup nginx
|
||||
when: giteaPort is defined and giteaUninstall == false
|
||||
|
||||
- name: Uninstall nginx config for git.{{ domain }}
|
||||
file:
|
||||
path: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||
state: absent
|
||||
notify: setup nginx
|
||||
when: giteaPort is not defined or (giteaUninstall is defined and giteaUninstall)
|
||||
|
||||
- name: Install nginx config for our Hidden Service
|
||||
template:
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
- name: Setup certbot for git.{{ domain }}
|
||||
shell: "certbot --nginx --non-interactive --agree-tos -m {{ contact_email }} -d git.{{ domain }}"
|
||||
when: giteaPort is defined and giteaUninstall == false
|
||||
|
||||
- name: Reload Nginx
|
||||
systemd:
|
||||
|
Loading…
Reference in New Issue
Block a user