-
Notifications
You must be signed in to change notification settings - Fork 3
/
deployer_loadbalancer.yml
58 lines (52 loc) · 1.25 KB
/
deployer_loadbalancer.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
46
47
48
49
50
51
52
53
54
55
56
57
---
- name: LBs VMs Provisioner
hosts: localhost
gather_facts: false
tasks:
- name: Provision LBs VMs on Nutanix
include_role:
name: nutanix_provisioner
vars:
vm_defs: "{{ vm_defs_lbs }}"
tags:
- provision
- name: Refresh inventory after provisioning
meta: refresh_inventory
- name: Post provision configuration
hosts: loadbalancers
remote_user: ansible
become: yes
tasks:
- name: Deploy private key to server
copy:
content: "{{ ansible_ssh_private_key }}"
dest: /home/ansible/.ssh/id_rsa
owner: ansible
group: ansible
mode: 0600
- name: Install ntpd
yum:
name: "ntp"
state: "latest"
- name: Configure ntp server
template:
src: "ntp.conf.j2"
dest: "/etc/ntp.conf"
- name: Disable chrony
service:
name: "chronyd"
state: stopped
enabled: false
- name: Start/enable ntpd
service:
name: "ntpd"
state: started
enabled: true
- name: Configure OCP Master Loadbalancer servers
hosts: loadbalancers
gather_facts: true
become: yes
tasks:
- name: Handle Load Balancer Prereqs
include_role:
name: loadbalancer_ha