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

Need retry functionality in install_extensions #252

Open
lask79 opened this issue Oct 11, 2023 · 0 comments
Open

Need retry functionality in install_extensions #252

lask79 opened this issue Oct 11, 2023 · 0 comments

Comments

@lask79
Copy link

lask79 commented Oct 11, 2023

I am having sometimes 503 erros while installing the defined extensions for multiple machines and multiple users per machine at the same time.

I fixed this by adding the register, until, retries and delay. It would be great if you would add such functionality in install_extensions.yml so that the internal module would be called again in case of those errors.

---
- name: Install extensions
  become: yes
  become_user: "{{ item.0.username }}"
  visual_studio_code_install_extension:
    executable: "{{ visual_studio_code_exe }}"
    name: "{{ item.1 }}"
  with_subelements:
    - "{{ users }}"
    - visual_studio_code_extensions
    - skip_missing: yes
  loop_control:
    label: "{{ item.0.username }}: {{ item.1 }}"
  register: install_extension_result
  until: install_extension_result is successful
  retries: 5
  delay: 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant