mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 17:10:27 +00:00
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
- name: Deployment Application
|
|
hosts: all
|
|
become: yes
|
|
become_method: sudo
|
|
|
|
vars_files:
|
|
- vars/main.yml
|
|
- roles/{{appname}}/vars/main.yml
|
|
|
|
pre_tasks:
|
|
- name: Create directory and clone the app-project
|
|
block:
|
|
- name: Create app directory
|
|
shell: mkdir -p /data/apps
|
|
- name: Delete {{appname}} dir for sec_installation
|
|
shell: rm -rf /data/apps/{{appname}}
|
|
- name: Clone {{appname}} in Websoft9
|
|
git:
|
|
repo: "https://github.com/Websoft9/docker-{{appname}}.git"
|
|
dest: /data/apps/{{appname}}
|
|
|
|
- name: Check interfaction exists
|
|
stat:
|
|
path: roles/{{appname}}/tests/test.yml
|
|
register: interfaction_exists
|
|
|
|
- include: roles/{{appname}}/tests/test.yml
|
|
when: interfaction_exists.stat.exists
|
|
|
|
roles:
|
|
- { role: role_common, tags: "role_common" }
|
|
- { role: role_cloud, tags: "role_cloud" }
|
|
- { role: role_docker, tags: "role_docker" }
|
|
- { role: role_nginx, tags: "role_nginx" }
|
|
- { role: install, tags: "install" }
|
|
- { role: "{{appname}}", tags: "{{appname}}" }
|
|
- { role: role_init, tags: "role_init" }
|
|
- { role: role_preend, tags: "preend" }
|
|
- { role: role_end, tags: "role_end" }
|