add rustdesk role
This commit is contained in:
29
roles/rustdesk/molecule/default/client-binary-existance.yml
Normal file
29
roles/rustdesk/molecule/default/client-binary-existance.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: "Get public IP"
|
||||
register: public_ip
|
||||
changed_when: false
|
||||
ansible.builtin.uri:
|
||||
url: https://ifconfig.me
|
||||
return_content: true
|
||||
headers:
|
||||
Accept: text/plain
|
||||
User-Agent: curl/7.68.0
|
||||
|
||||
|
||||
- name: "Get public key"
|
||||
register: public_key
|
||||
changed_when: false
|
||||
ansible.builtin.command: "cat /opt/rustdesk-server/lib/id_ed25519.pub"
|
||||
|
||||
- name: "Get client rustdesk binary information"
|
||||
changed_when: false
|
||||
register: rustdesk_bin
|
||||
ansible.builtin.stat:
|
||||
path: "/opt/rustdesk-server/lib/rustdesk-host={{ public_ip.content }},key={{ public_key.stdout }}.exe"
|
||||
|
||||
- name: "Check if client binary exists"
|
||||
changed_when: false
|
||||
ansible.builtin.assert:
|
||||
that: "rustdesk_bin.stat.exists"
|
||||
success_msg: "Rustdesk binary exists and named correctly"
|
||||
fail_msg: "Rustdesk binary not found"
|
||||
Reference in New Issue
Block a user