-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from splunk/develop
Release/806
- Loading branch information
Showing
46 changed files
with
401 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: GET OptInVersion | ||
uri: | ||
url: "{{ cert_prefix }}://127.0.0.1:{{ splunk.svc_port }}/servicesNS/nobody/splunk_instrumentation/admin/telemetry/general?output_mode=json" | ||
method: GET | ||
user: "{{ splunk.admin_user }}" | ||
password: "{{ splunk.password }}" | ||
validate_certs: false | ||
status_code: 200 | ||
timeout: 10 | ||
return_content: yes | ||
register: telemetry | ||
no_log: "{{ hide_password }}" | ||
|
||
- name: Disable Popups | ||
uri: | ||
url: "{{ cert_prefix }}://127.0.0.1:{{ splunk.svc_port }}/{{ item.key }}" | ||
method: POST | ||
user: "{{ splunk.admin_user }}" | ||
password: "{{ splunk.password }}" | ||
body: "{{ item.value }}" | ||
validate_certs: false | ||
status_code: 200,201,409 | ||
with_items: | ||
- { key: "servicesNS/admin/user-prefs/data/user-prefs/general", value: "hideInstrumentationOptInModal=1¬ification_python_3_impact=false&showWhatsNew=0" } | ||
- { key: "servicesNS/nobody/splunk_instrumentation/admin/telemetry/general", value: "showOptInModal=0&optInVersionAcknowledged={{ telemetry['json']['entry'][0]['content']['optInVersion'] }}" } | ||
- { key: "servicesNS/admin/search/data/ui/ui-tour/search-tour", value: "tourPage=search&viewed=1" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
- name: Set admin access via seed | ||
when: first_run | bool | ||
block: | ||
- name: "Hash the password" | ||
command: "{{ splunk.exec }} hash-passwd {{ splunk.password }}" | ||
register: hashed_pwd | ||
changed_when: hashed_pwd.rc == 0 | ||
become: yes | ||
become_user: "{{ splunk.user }}" | ||
no_log: "{{ hide_password }}" | ||
|
||
- name: "Generate user-seed.conf (Linux)" | ||
ini_file: | ||
owner: "{{ splunk.user }}" | ||
group: "{{ splunk.group }}" | ||
dest: "{{ splunk.home }}/etc/system/local/user-seed.conf" | ||
section: user_info | ||
option: "{{ item.opt }}" | ||
value: "{{ item.val }}" | ||
with_items: | ||
- { opt: 'USERNAME', val: '{{ splunk.admin_user }}' } | ||
- { opt: 'HASHED_PASSWORD', val: '{{ hashed_pwd.stdout }}' } | ||
loop_control: | ||
label: "{{ item.opt }}" | ||
when: ansible_system is match("Linux") | ||
no_log: "{{ hide_password }}" | ||
|
||
- name: "Generate user-seed.conf (Windows)" | ||
ini_file: | ||
dest: "{{ splunk.home }}/etc/system/local/user-seed.conf" | ||
section: user_info | ||
option: "{{ item.opt }}" | ||
value: "{{ item.val }}" | ||
with_items: | ||
- { opt: 'USERNAME', val: '{{ splunk.admin_user }}' } | ||
- { opt: 'HASHED_PASSWORD', val: '{{ hashed_pwd.stdout }}' } | ||
loop_control: | ||
label: "{{ item.opt }}" | ||
when: ansible_system is match("CYGWIN*|Win32NT") | ||
no_log: "{{ hide_password }}" | ||
|
||
- name: Establish declarative admin access | ||
when: | ||
- "'declarative_admin_password' in splunk and splunk.declarative_admin_password | bool" | ||
- not first_run | bool | ||
block: | ||
- name: Apply admin password | ||
command: "{{ splunk.exec }} cmd splunkd rest --noauth POST /services/admin/users/{{ splunk.admin_user }} 'password={{ splunk.password }}'" | ||
register: declarative_pw | ||
changed_when: False | ||
become: yes | ||
become_user: "{{ splunk.user }}" | ||
no_log: "{{ hide_password }}" | ||
|
||
- include_tasks: trigger_restart.yml |
Oops, something went wrong.