From 69acb7a82a68eeb439e55b994281056df52c81b1 Mon Sep 17 00:00:00 2001 From: repliqa Date: Wed, 23 Jul 2025 14:06:15 +0600 Subject: v0.0.1alpha --- roles/xray/tasks/check_xray_exists.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 roles/xray/tasks/check_xray_exists.yaml (limited to 'roles/xray/tasks/check_xray_exists.yaml') diff --git a/roles/xray/tasks/check_xray_exists.yaml b/roles/xray/tasks/check_xray_exists.yaml new file mode 100644 index 00000000..c0fdc525 --- /dev/null +++ b/roles/xray/tasks/check_xray_exists.yaml @@ -0,0 +1,21 @@ +--- +- name: "Check if xray is already installed" + ansible.builtin.stat: + path: /var/reactance/xray + register: xray_directory + +- name: "Check if xray is configured" + ansible.builtin.stat: + path: /var/reactance/xray/etc/config.json + register: xray_config + +- name: "Install xray if directory doesn't exist" + ansible.builtin.include_tasks: install_xray.yaml + when: xray_directory.stat.exists == false + +- name: "Configure xray" + ansible.builtin.include_tasks: configure_xray.yaml + when: xray_config.stat.exists == false + +- name: "Create xray users" + ansible.builtin.include_tasks: create_users_xray.yaml -- cgit v1.2.3