You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did notice a minor issue. This was partly/mostly caused by my misconfiguration of not passing the correct key in variable nessus_agent_key on first run of the role (stupid I am). The state is then that the agent is installed but not linked
the status is now :
sudo /opt/nessus_agent/sbin/nessuscli agent status
Running: Yes
Linked to: None
Link status: Not linked to a manager
Proxy: None
Plugin set: (null)
Scanning: No (0 jobs pending)
Last scanned: Never
Last connect: Never
Last connection attempt: Never
and return code is zero :
echo $?
0
Then the task "- name: Configure Nessus Agent" will not run because the above return code (registered in nessus_link) is zero. However I still need it to try and link to the Manager.
My workaround was a change to the "when" condition as below :
- name: Configure Nessus Agent
command: >
/opt/nessus_agent/sbin/nessuscli agent link
--key={{nessus_agent_key}}
--host={{nessus_agent_host}}
--port={{nessus_agent_port}}
--groups="{{nessus_agent_group}}"
become: yes
when: "nessus_link failed or 'Not linked to a manager' in nessus_link.stdout"
notify: restart nessusagent
This change probably wouldn't be needed on a good first-run of the role, but ideally the role can be re-runnable and more robust with above minor change.
Thanks again
The text was updated successfully, but these errors were encountered:
Firstly - thanks for the ansible role.
I did notice a minor issue. This was partly/mostly caused by my misconfiguration of not passing the correct key in variable nessus_agent_key on first run of the role (stupid I am). The state is then that the agent is installed but not linked
the status is now :
and return code is zero :
Then the task "- name: Configure Nessus Agent" will not run because the above return code (registered in nessus_link) is zero. However I still need it to try and link to the Manager.
My workaround was a change to the "when" condition as below :
This change probably wouldn't be needed on a good first-run of the role, but ideally the role can be re-runnable and more robust with above minor change.
Thanks again
The text was updated successfully, but these errors were encountered: