Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Feature request: Variable for number of attempts (default: 3) on install_agent role #37

Closed
quentin-rey opened this issue Sep 23, 2024 · 5 comments · Fixed by #38
Closed
Labels
enhancement New feature or request work in progress

Comments

@quentin-rey
Copy link
Contributor

SUMMARY

It would be useful to be able to define a variable that manages the number of tries for the ‘Fail if new client does not appear in management console’ task.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

sva.sentinelone.install_agent

ADDITIONAL INFORMATION

The number of retries is defined in the mail.yml of the install_agent role, on the last task.

- name: "Fail if new client does not appear in management console"
  ansible.builtin.uri:
    url: "{{ api_url }}agents?siteIds={{ siteid }}&computerName={{ ansible_hostname | urlencode }}&isActive=true"
    method: GET
    return_content: true
    headers:
      Accept: application/json
      Authorization: "APIToken {{ api_token }}"
    validate_certs: true
    status_code: 200
  register: registrationstatus
  delegate_to: localhost
  no_log: "{{ hide_sensitive }}"
  until: ((registrationstatus.json.data | length) > 0) and (registrationstatus.status == 200)
  retries: 3
  delay: 20
@quentin-rey quentin-rey changed the title ✨ Feature request: Variable for number of attempts (default: 3) ✨ Feature request: Variable for number of attempts (default: 3) on _install_agent_ role Sep 23, 2024
@quentin-rey quentin-rey changed the title ✨ Feature request: Variable for number of attempts (default: 3) on _install_agent_ role ✨ Feature request: Variable for number of attempts (default: 3) on install_agent role Sep 23, 2024
@mwester117
Copy link
Collaborator

Hi @quentin-rey,

I added the requested feature. New release will follow in the next days. I will keep you on track

@quentin-rey
Copy link
Contributor Author

Hi @quentin-rey,

I added the requested feature. New release will follow in the next days. I will keep you on track

Awesome, thank you for responding so quickly! 🙏

@quentin-rey
Copy link
Contributor Author

When will the next release be deployed? Thanks for your time!

@mwester117
Copy link
Collaborator

When will the next release be deployed? Thanks for your time!

I just released some new commits to main. Tests look good so far. If testing is successfull I will release tomorrow.

@mwester117
Copy link
Collaborator

Hi @quentin-rey,

I just released Version 2.0.0 of the collection.
You can now use check_console_retries and check_console_retry_delay to adjust the behaviour. For more details see https://svalabs.github.io/sva.sentinelone/branch/main/collections/sva/sentinelone/install_agent_role.html

Note: If you used the download_agent with state: info you have to switch to the new agent_info module. See CHANGELOG for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work in progress
Projects
None yet
2 participants