dnsservice/ansible/playbook.yml

32 lines
861 B
YAML
Raw Normal View History

2024-08-02 04:27:30 +00:00
#vi ft: yaml.ansible
---
- hosts:
- dns_ord
tags: ["dns"]
tasks:
- import_tasks: ./tasks/debian.yml
- import_tasks: ./tasks/caddy.yml
- import_tasks: ./tasks/caddy-dns.yml
- import_tasks: ./tasks/dns.yml
handlers:
- name: restart sdns
service: name=sdns state=restarted enabled=yes
listen: "restart sdns"
- name: reload caddy
service: name=caddy state=restarted enabled=yes
listen: "reload caddy"
- hosts: lb_ord
tags: ["lb"]
tasks:
- import_tasks: ./tasks/debian.yml
- import_tasks: ./tasks/caddy.yml
- import_tasks: ./tasks/caddy-lb.yml
- import_tasks: ./tasks/envoy.yml
handlers:
- name: reload caddy
service: name=caddy state=restarted enabled=yes
listen: "reload caddy"
- name: restart sshd
service: name=sshd state=restarted enabled=yes
listen: "restart sshd"