From 7831c59c8cff344bafe915b6f61460721859176d Mon Sep 17 00:00:00 2001 From: Chewbaccalakis Date: Thu, 25 Jun 2026 11:52:59 -0700 Subject: [PATCH] added remoteterm setup --- ansible/plays/machine_setup/remoteterm.yml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 ansible/plays/machine_setup/remoteterm.yml diff --git a/ansible/plays/machine_setup/remoteterm.yml b/ansible/plays/machine_setup/remoteterm.yml new file mode 100644 index 0000000..71d3964 --- /dev/null +++ b/ansible/plays/machine_setup/remoteterm.yml @@ -0,0 +1,75 @@ +--- +- name: Set up remoteterm LXC + hosts: remoteterm + become: yes + tasks: + - name: default_packages + ansible.builtin.include_tasks: ../../templates/default_packages.yml + + - name: create_user + ansible.builtin.include_tasks: ../../templates/create_user.yml + vars: + username: nick + github_user: Chewbaccalakis + + - name: Install base dependencies + ansible.builtin.apt: + name: + - python3 + - curl + - gnupg + state: present + update_cache: yes + + - name: Add NodeSource repository for Node.js 22 LTS + ansible.builtin.shell: + cmd: curl -fsSL https://deb.nodesource.com/setup_22.x | bash - + creates: /etc/apt/sources.list.d/nodesource.list + + - name: Install Node.js + ansible.builtin.apt: + name: nodejs + state: present + update_cache: yes + + - name: Install UV package manager + ansible.builtin.shell: + cmd: curl -LsSf https://astral.sh/uv/install.sh | sh + creates: /usr/local/bin/uv + environment: + UV_INSTALL_DIR: /usr/local/bin + + - name: Clone remoteterm repo + ansible.builtin.git: + repo: https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git + dest: /opt/remoteterm + version: main + update: yes + + - name: Set repo permissions + ansible.builtin.file: + path: /opt/remoteterm + owner: root + group: root + mode: "0755" + recurse: yes + + - name: uv sync + ansible.builtin.command: + cmd: uv sync + chdir: /opt/remoteterm + + - name: npm install frontend + community.general.npm: + path: /opt/remoteterm/frontend + + - name: npm build frontend + ansible.builtin.command: + cmd: npm run build + chdir: /opt/remoteterm/frontend + +# Install Script has options, need to solve that +# - name: Run service install script +# ansible.builtin.command: +# cmd: bash scripts/setup/install_service.sh +# chdir: /opt/remoteterm \ No newline at end of file