-
Notifications
You must be signed in to change notification settings - Fork 2
/
new-slave.yml
45 lines (37 loc) · 989 Bytes
/
new-slave.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- hosts: new-slave
remote_user: centos
sudo: yes
roles:
- common
- hosts: all
remote_user: root
gather_facts: yes
- hosts: new-slave
remote_user: root
roles:
- mariadb
- pdns
- hosts: ns-master
remote_user: root
tasks:
- name: Add New server to the pool
template: src=templates/designate.conf.j2 dest=/etc/designate/designate.conf
- name: Restart Designate
service: name=designate-pool-manager state=restarted
- name: Create pdns DB
command: designate-manage powerdns sync {{ hostvars[item]['ansible_product_uuid'] }}
with_items: "{{ groups['new-slave'] }}"
- hosts: new-slave
remote_user: root
tasks:
- name: Restart PDNS
service: name=pdns state=started enabled=yes
- hosts: ns-master
remote_user: root
tasks:
- name: Sync DB
environment: keystone_env
command: designate sync-all
- name: Add the server as an Authoritative of the existing zones
command: echo yes