websoft9/apps/application.yml
2022-07-19 16:12:40 +08:00

33 lines
1.1 KiB
YAML

- name: Deploy Application
hosts: all
become: yes
become_method: sudo
vars_files:
- vars/main.yml
pre_tasks:
- name: Get applist
block:
- name: Get appname and dependencies, combine to a applist
shell : |
echo "{{appname}}" > /tmp/applist
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/apps/roles/{{appname}}/meta/main.yml
cat main.yml | sed -n '/dependencies/,/galaxy_info/{//!p}'|grep -|awk -F'- ' '{print $2}' >>/tmp/applist
cat /tmp/applist
register: applist
- name: Change Public IP for http_url if APP_URL_REPLACE=true
shell: |
wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/changeIP.sh
bash changeIP.sh "{{appname}}"
rm -f changeIP.sh
roles:
- { role: role_common, tags: "role_common" }
- { role: role_cloud, tags: "role_cloud" }
- { role: "{{appname}}", tags: "{{appname}}" }
- { role: role_nginx, tags: "role_nginx" }
- { role: role_init, tags: "role_init" }
- { role: role_preend, tags: "preend" }
- { role: role_end, tags: "role_end" }