diff options
Diffstat (limited to 'roles/xray/tasks/check_xray_exists.yaml')
| -rw-r--r-- | roles/xray/tasks/check_xray_exists.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
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 |
