Skip to content

Instantly share code, notes, and snippets.

@hash-d
Last active October 25, 2025 19:18
Show Gist options
  • Save hash-d/69ebba99ef72dbbea72c53c33192e39f to your computer and use it in GitHub Desktop.
Save hash-d/69ebba99ef72dbbea72c53c33192e39f to your computer and use it in GitHub Desktop.

Investigating whether skupper-ansible respects until/retries keywords.

---
- name: Investigate skupper.v2 and retries/until
hosts: localhost
gather_facts: no
vars:
#bad_uri: http://localhost:1234/bad
bad_uri: https://raw.githubusercontent.com/skupperproject/skupper-example-redis/refs/heads/v2/podman-crs/listener-podman.yaml
tasks:
- name: Fail and retry
block:
- name: Fail
ansible.builtin.fail:
register: simple_fail
delay: 1
retries: 3
until: simple_fail is success
rescue:
- name: Ignore this
ansible.builtin.debug:
msg: Ignore
- name: URI fetch fail
block:
- name: Fetch bad URI
ansible.builtin.uri:
url: "{{ bad_uri }}"
register: uri_fail
delay: 1
retries: 3
until: uri_fail is success
rescue:
- name: Ignore this
ansible.builtin.debug:
msg: Ignore
- name: What about skupper.v2?
block:
- name: Fail on resource
skupper.v2.resource:
path: "{{ bad_uri }}"
namespace: some_ns
#kubeconfig: "{{ kubeconfig }}"
register: skupper_fail
delay: 1
retries: 3
until: skupper_fail is success
rescue:
- name: Ignore this
ansible.builtin.debug:
msg: Ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment