From 3e967f58d25832131c3688803b88023ad50b4c4c Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Mon, 29 May 2023 07:40:36 +0000 Subject: [PATCH] ansible fixes [skip ci] --- ansible/roles/trmm_dev/defaults/main.yml | 2 +- ansible/roles/trmm_dev/tasks/main.yml | 9 +++++++++ ansible/roles/trmm_dev/templates/local_settings.j2 | 8 ++------ ansible/roles/trmm_dev/templates/quasar.env.j2 | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ansible/roles/trmm_dev/defaults/main.yml b/ansible/roles/trmm_dev/defaults/main.yml index 02e15a80..0b9226bc 100644 --- a/ansible/roles/trmm_dev/defaults/main.yml +++ b/ansible/roles/trmm_dev/defaults/main.yml @@ -1,7 +1,7 @@ --- user: "tactical" python_ver: "3.11.3" -go_ver: "1.20.3" +go_ver: "1.20.4" backend_repo: "https://github.com/amidaware/tacticalrmm.git" frontend_repo: "https://github.com/amidaware/tacticalrmm-web.git" scripts_repo: "https://github.com/amidaware/community-scripts.git" diff --git a/ansible/roles/trmm_dev/tasks/main.yml b/ansible/roles/trmm_dev/tasks/main.yml index cbcb5fcd..5bbcfe81 100644 --- a/ansible/roles/trmm_dev/tasks/main.yml +++ b/ansible/roles/trmm_dev/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: Append subdomains to hosts + tags: hosts + become: yes + ansible.builtin.lineinfile: + path: /etc/hosts + backrefs: yes + regexp: '^(127\.0\.1\.1 .*)$' + line: "\\1 {{ api }} {{ mesh }} {{ rmm }}" + - name: set mouse mode for vim tags: vim become: yes diff --git a/ansible/roles/trmm_dev/templates/local_settings.j2 b/ansible/roles/trmm_dev/templates/local_settings.j2 index 3b9601a6..a231680d 100644 --- a/ansible/roles/trmm_dev/templates/local_settings.j2 +++ b/ansible/roles/trmm_dev/templates/local_settings.j2 @@ -2,10 +2,6 @@ SECRET_KEY = "{{ django_secret }}" DEBUG = True ALLOWED_HOSTS = ['{{ api }}'] ADMIN_URL = "admin/" -CORS_ORIGIN_WHITELIST = [ - "http://{{ rmm }}:8080", - "https://{{ rmm }}:8080", -] CORS_ORIGIN_ALLOW_ALL = True DATABASES = { 'default': { @@ -19,7 +15,7 @@ DATABASES = { } REDIS_HOST = "localhost" ADMIN_ENABLED = True -CERT_FILE = "{{ fullchain_src }}" -KEY_FILE = "{{ privkey_src }}" +CERT_FILE = "{{ fullchain_dest }}" +KEY_FILE = "{{ privkey_dest }}" MESH_USERNAME = "{{ mesh_user }}" MESH_SITE = "https://{{ mesh }}" diff --git a/ansible/roles/trmm_dev/templates/quasar.env.j2 b/ansible/roles/trmm_dev/templates/quasar.env.j2 index 9ef40a1b..53b01a98 100644 --- a/ansible/roles/trmm_dev/templates/quasar.env.j2 +++ b/ansible/roles/trmm_dev/templates/quasar.env.j2 @@ -1,4 +1,4 @@ DEV_URL = "http://{{ api }}:8000" -DEV_HOST = "{{ rmm }}" +DEV_HOST = "0.0.0.0" DEV_PORT = "8080" USE_HTTPS = false \ No newline at end of file