-
Notifications
You must be signed in to change notification settings - Fork 3
/
deployer_tower.yml
57 lines (54 loc) · 1.29 KB
/
deployer_tower.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: YUM Nutanix Deployer
hosts: localhost
gather_facts: false
tasks:
- name: Provision Ansible Tower on Nutanix
include_role:
name: nutanix_provisioner
vars:
vm_defs: "{{ vm_defs_tower }}"
tags:
- provision
- name: Refresh inventory after provisioning
meta: refresh_inventory
# Deploy ansible private key to VM
- name: Ansible private key
hosts: tower
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
#Deploy and Configure Tower
- name: Deploy Ansible Tower
hosts: tower
remote_user: ansible
become: no
tasks:
- name: Use role to deploy/config ansible tower cluster
include_role:
name: tower_cluster