Open blka opened 2 weeks ago
hi, found your repo by google, so maybe someone will be happy with this update. no auth tokens to download latest rpm. enjoy! :)
- name: Install Nessus Agent hosts: all connection: local become: yes vars: base_url: "https://www.tenable.com/downloads/nessus-agents" rpm_filename_pattern: "el8.x86_64.rpm" download_url_template: "https://www.tenable.com/downloads/api/v1/public/pages/nessus-agents/downloads/{{ rpm_id }}/download?i_agree_to_tenable_license_agreement=true" tasks: - name: Get the Nessus Agent download page uri: url: "{{ base_url }}" return_content: yes register: download_page - name: Extract the file id and version for el8.x86_64.rpm set_fact: rpm_id: "{{ download_page.content | regex_search('{\"id\":([0-9]+),\"file\":\"NessusAgent-[0-9]+.[0-9]+.[0-9]+-el8.x86_64.rpm\",', '\\1') |first }}" rpm_version: "{{ download_page.content | regex_search('{\"id\":[0-9]+,\"file\":\"NessusAgent-([0-9]+.[0-9]+.[0-9]+)-el8.x86_64.rpm\",', '\\1') |first }}" - name: Debug the extracted ID and version debug: msg: "Extracted RPM ID: {{ rpm_id }}, Version: {{ rpm_version }}" - name: Construct full RPM download URL set_fact: rpm_url: "{{ download_url_template }}" - name: Download the latest Nessus Agent RPM get_url: url: "{{ rpm_url }}" dest: "/tmp/NessusAgent-{{ rpm_version }}-{{ rpm_filename_pattern }}" mode: '0644'
Oh nice, thx. I will see if i find some time to implement it.
hi, found your repo by google, so maybe someone will be happy with this update. no auth tokens to download latest rpm. enjoy! :)