switch from http url to git
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jens Timmerman 2021-08-31 12:22:23 +02:00
parent 62ddc9bb2a
commit 4e4cc01659
2 changed files with 11 additions and 7 deletions

View File

@ -43,7 +43,8 @@ Example Playbook
- django_domain: "im.example.com"
- django_http_listen: "{{inventory_hostname}}"
- django_admin_password: "test"
- django_app_releaseurl: "https://gitea.caret.be/jens/im/archive/main.tar.gz"
- django_app_gitrepo: "https://gitea.caret.be/jens/im.git"
- django_app_gitversion: "main"
```
```yaml
@ -60,7 +61,8 @@ Example Playbook
- django_http_port: 8000
# needs to be a tar.gz for now
# needs to have a settings_template.py.j2 file in the django_appname folder
- django_app_releaseurl: "https://gitea.caret.be/jens/im/archive/main.tar.gz"
- django_app_gitrepo: "https://gitea.caret.be/jens/im.git"
- django_app_gitversion: "v2.0"
- django_admin_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
33366337663233346138373232353438613362636634393334613935303466343238646361613037

View File

@ -6,6 +6,7 @@
- 'python3-django'
- 'curl'
- 'tar'
- 'git'
- 'python3-psycopg2'
- 'python3-gunicorn'
- 'python3-whitenoise'
@ -23,14 +24,15 @@
home: "{{ django_home }}"
shell: "/bin/false"
- name: 'download latest stable version of the app'
get_url:
dest: "{{ django_home }}/latest.tar.gz"
url: "{{ django_app_releaseurl }}"
- name: Clone git repositories
git:
repo: "{{ django_app_gitrepo }}"
dest: "{{ django_home }}/{{ django_appname }}"
owner: "{{ django_user }}"
group: "{{ django_group }}"
mode: '0400'
force: true
version: "{{ django_app_gitversion }}"
- name: 'remove previous install stable'
file: