added xray-core role
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
---
|
||||
- name: ensure /etc/xray-core exists
|
||||
ansible.builtin.file:
|
||||
path: /etc/xray-core/config
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: ensure /var/log/xray-core exists
|
||||
ansible.builtin.file:
|
||||
path: /var/log/xray-core
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: deploy static xray-core config
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/xray-core/config/{{ item }}"
|
||||
mode: "0744"
|
||||
loop:
|
||||
- dns.jsonc
|
||||
- inbounds.jsonc
|
||||
- log.jsonc
|
||||
- policy.jsonc
|
||||
|
||||
- name: deploy dynamic xray-core config
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/xray-core/config/{{ item }}"
|
||||
mode: "0744"
|
||||
loop:
|
||||
- observatory.jsonc
|
||||
- outbounds.jsonc
|
||||
- routing.jsonc
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: install unbound
|
||||
ansible.builtin.package:
|
||||
name: unbound
|
||||
state: present
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
#- name: include unbound install
|
||||
# ansible.builtin.include_tasks: install.yml
|
||||
|
||||
- name: include xray-core configurure
|
||||
ansible.builtin.include_tasks: configure.yml
|
||||
Reference in New Issue
Block a user