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

Playbook #53

Open
wackelfinger opened this issue Sep 8, 2024 · 2 comments
Open

Playbook #53

wackelfinger opened this issue Sep 8, 2024 · 2 comments

Comments

@wackelfinger
Copy link

hello,

i am new to ansible and dont understand how to write the playbook for this module, can anybody provide me an example of an usable playbook?

thank you so much

@nickilby
Copy link


  • name: Login with credentials once and register the result
    lucasheld.uptime_kuma.login:
    api_url: "{{ kuma_api_url }}"
    api_username: "{{ kuma_api_username }}"
    api_password: "{{ kuma_api_password }}"
    register: result

  • name: Extract the token from the result and set it as fact
    ansible.builtin.set_fact:
    api_token: "{{ result.token }}"

  • name: Create a Parent Group
    lucasheld.uptime_kuma.monitor:
    api_url: "{{ kuma_api_url }}"
    api_token: "{{ api_token }}"
    name: "Google"
    type: group
    state: present

  • name: Create a Monitor
    lucasheld.uptime_kuma.monitor:
    api_url: "{{ kuma_api_url }}"
    api_token: "{{ api_token }}"
    name: "Google"
    type: http
    url: "https://www.google.com"
    parent_name: "Google"
    state: present

@wackelfinger
Copy link
Author

Thank you so much

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

2 participants