-
Notifications
You must be signed in to change notification settings - Fork 7
/
site.yml
54 lines (43 loc) · 1.43 KB
/
site.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
# vim: set ft=ansible
# main.yml
---
# Deploy to OpenStack Servers
- include: openstack.yml
when: use_openstack_deploy
# Deploy Jenkins Master and Slave
- include: jenkins.yml
# Include the ELK stack playbook
- include: elk.yml
when: elk_deployed
# Include FileBeat setup
- include: filebeat.yml
when: filebeat_deployed
# Section that provides post-installation information
- hosts: kibana
vars_files:
- "{{ inventory_dir }}/{{ vars_files_relative }}/vars/main.yml"
- ~/.ansible/vars/toad_vars.yml
tags:
- kibana
- elk
post_tasks:
- name: Where is Kibana located?
debug:
msg: "Kibana can be reached at http://{{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}}:5601/"
when: elk_deployed and ansible_connection != 'docker'
- name: Where is Kibana located? (docker)
debug:
msg: "Kibana can be reached at http://localhost:5601/"
when: elk_deployed and ansible_connection == 'docker'
- hosts: jenkins_master
tags:
- jenkins_master
post_tasks:
- name: Where is Jenkins Master located?
debug:
msg: "Jenkins Master can be reached at http://{{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}}:8080/"
when: ansible_connection != 'docker'
- name: Where is Jenkins Master located? (docker)
debug:
msg: "Jenkins Master can be reached at http://localhost:8080/"
when: ansible_connection == 'docker'