forked from splunk/splunk-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
40 lines (34 loc) · 1.2 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
---
- name: Run default Splunk provisioning
hosts: localhost
gather_facts: true
environment: "{{ ansible_env }}"
tasks:
- block:
- name: Execute pre-setup playbooks
include_tasks: execute_adhoc_plays.yml
vars:
playbook: "{{ ansible_pre_tasks }}"
when:
- ansible_pre_tasks is defined
- ansible_pre_tasks is not none
- ansible_pre_tasks is match("^(http|https|file)://.*")
- name: Provision role
include_role:
name: "{{ splunk.role }}"
when:
- splunk.role is defined
- name: Execute post-setup playbooks
include_tasks: execute_adhoc_plays.yml
vars:
playbook: "{{ ansible_post_tasks }}"
when:
- ansible_post_tasks is defined
- ansible_post_tasks is not none
- ansible_post_tasks is match("^(http|https|file)://.*")
- name: Check all instances for required restarts
include_tasks: ./roles/splunk_common/tasks/check_for_required_restarts.yml
- name: Flush restart handlers
meta: flush_handlers
become: yes
become_user: "{{ splunk.user }}"