Files
updates/beszel_install.yaml
T
2025-05-23 08:04:07 -04:00

27 lines
1.1 KiB
YAML

---
- hosts: debianhosts
tasks:
- name: change working directory
ansible.builtin.command:
cmd: pwd
argv:
chdir: /tmp
- name: Get beszel agent install script
ansible.builtin.uri:
url: https://httpbin.org/post
method: POST
src: /tmp/install-agent.sh
# - name: Setup beszel agent install script
# ansible.builtin.command:: chmod +x /tmp/install-agent.sh
# - name: Execute beszel agent install script
# ansible.builtin.command:: /tmp/install-agent.sh -p 45876 -k "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhA2xm3yiEqzi5dn8UerbbhZTkU538O1g1KF2d7LefT"
# - name: Add beszel agent key
# ansible.builtin.command:: echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhA2xm3yiEqzi5dn8UerbbhZTkU538O1g1KF2d7LefT" >> /root/.ssh/authorized_keys
- hosts: windowshosts
tasks:
tasks:
- name: Install linux beszel agent
command: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser; & iwr -useb https://get.beszel.dev -OutFile "$env:TEMP\install-agent.ps1"; & "$env:TEMP\install-agent.ps1" -Key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhA2xm3yiEqzi5dn8UerbbhZTkU538O1g1KF2d7LefT" -Port 45876