-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.yml
32 lines (26 loc) · 784 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- hosts: xray-cloud
become: true
pre_tasks:
- name: Load configuration (with defaults from example file)
ansible.builtin.include_vars: "{{ item }}"
loop:
- config.yml
- name: Ensure apt cache is up to date
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when:
- ansible_facts.os_family == "Debian"
handlers:
- name: Include handlers
ansible.builtin.import_tasks: tasks/handlers.yml
tasks:
- name: Setup Docker
ansible.builtin.import_tasks: tasks/docker.yml
- name: Setup xray
ansible.builtin.import_tasks: tasks/xray-xui.yml
when: xray_enable
- name: Remove Containers
ansible.builtin.import_tasks: tasks/remove.yml
when: remove_xray