websoft9/apps/roles/role_init/tasks/main.yml

28 lines
584 B
YAML
Raw Normal View History

2022-07-11 14:03:55 +08:00
- block:
2022-07-11 14:40:24 +08:00
- name: Create credentials Folder
file:
path: /credentials
state: directory
2022-07-11 14:03:55 +08:00
2022-07-11 15:13:23 +08:00
- name: Create a symbolic link of app
2022-07-11 14:40:24 +08:00
file:
2022-07-12 11:55:57 +08:00
src: "{{installpath}}/{{appname}}/.env"
dest: "/credentials/password.txt"
2022-07-11 14:40:24 +08:00
state: link
2022-07-11 14:03:55 +08:00
- name: Copy Init Script
template:
src: init.sh.jinja2
dest: /credentials/init.sh
mode: 0750
2022-07-11 14:40:24 +08:00
2022-07-11 14:03:55 +08:00
- name: Upload init-apps.service
template:
src: init-apps.service.jinja2
dest: /lib/systemd/system/init-apps.service
- name: Enable service
service:
name: init-apps
enabled: yes