websoft9/apps/application.yml

40 lines
1.2 KiB
YAML
Raw Normal View History

2022-05-10 09:35:30 +00:00
- name: Deployment Application
hosts: all
become: yes
become_method: sudo
vars_files:
- vars/main.yml
2022-05-16 00:55:47 +00:00
- roles/{{appname}}/vars/main.yml
2022-05-11 09:39:42 +00:00
pre_tasks:
2022-05-13 00:59:20 +00:00
- 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}}
2022-05-11 09:39:42 +00:00
- name: Check interfaction exists
stat:
path: roles/{{appname}}/tests/test.yml
register: interfaction_exists
2022-05-10 09:35:30 +00:00
2022-05-11 09:39:42 +00:00
- include: roles/{{appname}}/tests/test.yml
when: interfaction_exists.stat.exists
2022-05-12 06:09:58 +00:00
2022-05-10 09:35:30 +00:00
roles:
2022-05-11 01:51:13 +00:00
- { role: role_common, tags: "role_common" }
- { role: role_cloud, tags: "role_cloud" }
- { role: role_docker, tags: "role_docker" }
- { role: role_nginx, tags: "role_nginx" }
2022-05-12 06:09:58 +00:00
- { role: install, tags: "install" }
2022-05-11 01:51:13 +00:00
- { role: "{{appname}}", tags: "{{appname}}" }
- { role: role_init, tags: "role_init" }
- { role: role_preend, tags: "preend" }
- { role: role_end, tags: "role_end" }