Settings more info on kuma create

This commit is contained in:
Dryusdan 2023-03-10 11:09:25 +01:00
parent 3b23d1d12f
commit f3164f714a
1 changed files with 27 additions and 0 deletions

View File

@ -81,6 +81,10 @@
name: "{{ item.monitoring_name }}"
type: http
url: "{{ item.monitoring_url }}"
expiryNotification: True
interval: 30
maxredirects: 0
maxretries: 3
state: present
loop: "{{ nginx_vhost }}"
become: yes
@ -93,6 +97,29 @@
tags:
- vhost
- name: Create a website tag on monitor
lucasheld.uptime_kuma.monitor_tag:
api_url: https://kuma.dryusdan.net
api_token: "{{ api_token }}"
monitor_name: "{{ item.monitoring_name }}"
tag_name: Website
state: present
loop: "{{ nginx_vhost }}"
become: yes
become_user : "ansible"
become_method: su
become_flags: '-s /bin/bash'
delegate_to: "127.0.0.1"
when:
- item.state == "present" or item.state is not defined
tags:
- vhost
- name: "Create certificate"
shell: "certbot certonly --non-interactive --webroot --email {{ nginx_letsencrypt_email }} --agree-tos --webroot-path=/var/www/letsencrypt {% for domain in item.server_name %} -d {{ domain }} {% endfor %} --expand --rsa-key-size 4096;"
when:
- item.ssl
- name: "Create certificate"
shell: "certbot certonly --non-interactive --webroot --email {{ nginx_letsencrypt_email }} --agree-tos --webroot-path=/var/www/letsencrypt {% for domain in item.server_name %} -d {{ domain }} {% endfor %} --expand --rsa-key-size 4096;"
when: