mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Adding ability to start and plumb splunk instance (#12183)
This commit is contained in:
51
tools/docker-compose/ansible/plumb_splunk.yml
Normal file
51
tools/docker-compose/ansible/plumb_splunk.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- name: Plumb a splunk instance
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: False
|
||||
vars:
|
||||
awx_host: "https://localhost:8043"
|
||||
collections:
|
||||
- splunk.es
|
||||
|
||||
tasks:
|
||||
- name: create splunk_data_input_network
|
||||
splunk.es.data_input_network:
|
||||
name: "9199"
|
||||
protocol: "tcp"
|
||||
source: "http:tower_logging_collections"
|
||||
sourcetype: "httpevent"
|
||||
state: "present"
|
||||
vars:
|
||||
ansible_network_os: splunk.es.splunk
|
||||
ansible_user: admin
|
||||
ansible_httpapi_pass: splunk_admin
|
||||
ansible_httpapi_port: 8089
|
||||
ansible_httpapi_use_ssl: yes
|
||||
ansible_httpapi_validate_certs: False
|
||||
ansible_connection: httpapi
|
||||
|
||||
- name: Load existing and new Logging settings
|
||||
set_fact:
|
||||
existing_logging: "{{ lookup('awx.awx.controller_api', 'settings/logging', host=awx_host, verify_ssl=false) }}"
|
||||
new_logging: "{{ lookup('template', 'logging.json.j2') }}"
|
||||
|
||||
- name: Display existing Logging configuration
|
||||
debug:
|
||||
msg:
|
||||
- "Here is your existing SAML configuration for reference:"
|
||||
- "{{ existing_logging }}"
|
||||
|
||||
- pause:
|
||||
prompt: "Continuing to run this will replace your existing logging settings (displayed above). They will all be captured except for your connection password. Be sure that is backed up before continuing"
|
||||
|
||||
- name: Write out the existing content
|
||||
copy:
|
||||
dest: "../_sources/existing_logging.json"
|
||||
content: "{{ existing_logging }}"
|
||||
|
||||
- name: Configure AWX logging adapter
|
||||
awx.awx.settings:
|
||||
settings: "{{ new_logging }}"
|
||||
controller_host: "{{ awx_host }}"
|
||||
validate_certs: False
|
||||
Reference in New Issue
Block a user