75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
---
|
|
- 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 |