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
|
giteaPort: 3000
|
||||||
giteaUninstall: false
|
|
@ -22,4 +22,5 @@
|
|||||||
- name: Fetch backup
|
- name: Fetch backup
|
||||||
fetch:
|
fetch:
|
||||||
src: /etc/gitea/gitea-dump.zip
|
src: /etc/gitea/gitea-dump.zip
|
||||||
dest: backups
|
dest: backups/gitea-dump.zip
|
||||||
|
flat: true
|
@ -42,30 +42,4 @@
|
|||||||
- name: Backup db
|
- name: Backup db
|
||||||
include_tasks: backup.yml
|
include_tasks: backup.yml
|
||||||
tags: ['never', 'backup']
|
tags: ['never', 'backup']
|
||||||
when: giteaUninstall == false
|
tags: ['gitea', 'backup']
|
||||||
|
|
||||||
- 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)
|
|
||||||
|
0
roles/gitea/tasks/restore.yml
Normal file
0
roles/gitea/tasks/restore.yml
Normal file
@ -1,3 +1,2 @@
|
|||||||
---
|
---
|
||||||
giteaPort: 3000
|
giteaPort: 3000
|
||||||
giteaUninstall: false
|
|
@ -22,14 +22,12 @@
|
|||||||
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
|
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||||
force: no
|
force: no
|
||||||
notify: setup nginx
|
notify: setup nginx
|
||||||
when: giteaPort is defined and giteaUninstall == false
|
|
||||||
|
|
||||||
- name: Uninstall nginx config for git.{{ domain }}
|
- name: Uninstall nginx config for git.{{ domain }}
|
||||||
file:
|
file:
|
||||||
path: /etc/nginx/conf.d/git.{{ domain }}.conf
|
path: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||||
state: absent
|
state: absent
|
||||||
notify: setup nginx
|
notify: setup nginx
|
||||||
when: giteaPort is not defined or (giteaUninstall is defined and giteaUninstall)
|
|
||||||
|
|
||||||
- name: Install nginx config for our Hidden Service
|
- name: Install nginx config for our Hidden Service
|
||||||
template:
|
template:
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
- name: Setup certbot for git.{{ domain }}
|
- name: Setup certbot for git.{{ domain }}
|
||||||
shell: "certbot --nginx --non-interactive --agree-tos -m {{ contact_email }} -d 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
|
- name: Reload Nginx
|
||||||
systemd:
|
systemd:
|
||||||
|
Loading…
Reference in New Issue
Block a user