-
Notifications
You must be signed in to change notification settings - Fork 186
/
site.yml
47 lines (41 loc) · 1.49 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
---
- name: Run default Splunk provisioning
hosts: localhost
gather_facts: true
strategy: free
environment: "{{ ansible_environment | default({}) }}"
tasks:
- block:
- name: Execute pre-setup playbooks
loop: "{{ ansible_pre_tasks }}"
loop_control:
loop_var: ansible_pre_tasks_item
include_tasks: execute_adhoc_plays.yml
vars:
playbook: "{{ ansible_pre_tasks_item }}"
when:
- ansible_pre_tasks_item is defined
- ansible_pre_tasks_item is not none
- ansible_pre_tasks_item is match("^(http|https|file)://.*")
- name: Provision role
include_role:
name: "{{ splunk.role }}"
when:
- splunk.role is defined
- name: Execute post-setup playbooks
loop: "{{ ansible_post_tasks }}"
loop_control:
loop_var: ansible_post_tasks_item
include_tasks: execute_adhoc_plays.yml
vars:
playbook: "{{ ansible_post_tasks_item }}"
when:
- ansible_post_tasks_item is defined
- ansible_post_tasks_item is not none
- ansible_post_tasks_item 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 }}"