- New role: xray_client (deploys Xray VLESS+Reality client container) - New playbook: xray-client.yml - New inventory group: [xray] (emby-sascha, emby-chris) - pfannkuchen.sh: new command 'xray' - Prepared for migration from FRP to Xray tunnel
28 lines
682 B
YAML
28 lines
682 B
YAML
---
|
|
- name: Ensure xray config directory exists
|
|
file:
|
|
path: /app-config/xray
|
|
state: directory
|
|
mode: '0750'
|
|
|
|
- name: Copy xray client config
|
|
copy:
|
|
src: "{{ xray_config_path }}"
|
|
dest: /app-config/xray/client.json
|
|
mode: '0640'
|
|
notify: restart xray-client
|
|
|
|
- name: Pull xray image
|
|
community.docker.docker_image:
|
|
name: "{{ xray_image }}"
|
|
source: pull
|
|
|
|
- name: Start xray-client container
|
|
community.docker.docker_container:
|
|
name: "{{ xray_container_name }}"
|
|
image: "{{ xray_image }}"
|
|
state: started
|
|
restart_policy: unless-stopped
|
|
network_mode: host
|
|
volumes:
|
|
- "/app-config/xray/client.json:/etc/xray/config.json:ro"
|