diff --git a/excuse/excuse.yml b/excuse/excuse.yml new file mode 100644 index 0000000..d89c660 --- /dev/null +++ b/excuse/excuse.yml @@ -0,0 +1,18 @@ +--- +- name: Retrieve random bofh excuse + hosts: localhost + gather_facts: false + become: false + + tasks: + - name: Retrieve excuse data + ansible.builtin.uri: + url: "https://bofh-api.bombeck.io/v1/excuses/random" + return_content: true + register: excuse + + - name: Display the excuse + when: excuse is succeeded + ansible.builtin.debug: + msg: "{{ excuse.json | map(attribute='quote') }}" +