Migrate services part
This commit is contained in:
parent
7c59e4ae57
commit
73bce8f6e5
157 changed files with 3883 additions and 9 deletions
roles/teamspeak_fallback/tasks
36
roles/teamspeak_fallback/tasks/main.yml
Normal file
36
roles/teamspeak_fallback/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
- name: Set common facts
|
||||
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
||||
|
||||
- name: Deploy {{ svc.name }}
|
||||
vars:
|
||||
svc: "{{ teamspeak_fallback_svc }}"
|
||||
block:
|
||||
- name: Import tasks to create service directory
|
||||
ansible.builtin.import_tasks: tasks/steps/create-service-directory.yml
|
||||
|
||||
- name: Copy the docker-compose file
|
||||
ansible.builtin.copy:
|
||||
src: docker-compose.yml
|
||||
dest: "{{ (service_path, 'docker-compose.yml') | path_join }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Template the conditional-start script
|
||||
ansible.builtin.template:
|
||||
src: conditional-start.sh.j2
|
||||
dest: "{{ (service_path, 'conditional-start.sh') | path_join }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Copy the system service
|
||||
ansible.builtin.template:
|
||||
src: teamspeak-fallback.service.j2
|
||||
dest: /etc/systemd/system/teamspeak-fallback.service
|
||||
mode: "0644"
|
||||
become: true
|
||||
- name: Enable the system service
|
||||
ansible.builtin.systemd_service:
|
||||
name: teamspeak-fallback.service
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue