You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
---
|
|
- 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 }}"
|