mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
Update install.yml
This commit is contained in:
parent
e99a9414b8
commit
b57fcb92e0
1 changed files with 10 additions and 4 deletions
|
@ -12,12 +12,18 @@
|
|||
repo: "https://github.com/Websoft9/docker-{{app}}.git"
|
||||
dest: "{{installpath}}/{{app}}"
|
||||
|
||||
- name: Check APP_URL_REPLACE exists
|
||||
shell: |
|
||||
cat "{{installpath}}/{{app}}/.env" |grep APP_URL_REPLACE=true
|
||||
register: http_url_exists
|
||||
failed_when: false
|
||||
|
||||
- name: Change Public IP for http_url if APP_URL_REPLACE=true
|
||||
shell: |
|
||||
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/change_ip.sh
|
||||
bash change_ip.sh "{{appname}}"
|
||||
rm -f change_ip.sh
|
||||
|
||||
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
|
||||
sudo sed -i "s/APP_URL=.*/APP_URL=$public_ip/g" /data/apps/{{app}}/.env
|
||||
when: http_url_exists.stdout != ""
|
||||
|
||||
- name: Excute Preparation if have pre.yml
|
||||
block:
|
||||
- name: Check if pre.yml exists
|
||||
|
|
Loading…
Reference in a new issue