-
Notifications
You must be signed in to change notification settings - Fork 186
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 #810 from splunk/check-for-UDS-file-and-not-tcp-flag
Check for uds file and not UDS flag
- Loading branch information
Showing
8 changed files
with
78 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
- name: Check if requests_unixsocket exists | ||
command: "pip list | grep 'requests-unixsocket'" | ||
register: requests_unixsocket_check | ||
ignore_errors: true | ||
|
||
- name: Install and upgrade pip | ||
pip: | ||
name: pip | ||
extra_args: --upgrade | ||
executable: pip3 | ||
when: requests_unixsocket_check is failed | ||
|
||
- name: Check if pip3 unixsocket exits | ||
command: "pip3 list | grep 'requests-unixsocket'" | ||
register: requests_unixsocket_check_py3 | ||
when: requests_unixsocket_check is failed | ||
ignore_errors: true | ||
|
||
- name: Install missing requests_unixsocket | ||
ansible.builtin.pip: | ||
name: "requests_unixsocket" | ||
when: requests_unixsocket_check is succeeded and (requests_unixsocket_check.stdout | length == 0 or requests_unixsocket_check.stdout.find("requests-unixsocket") == -1) | ||
|
||
- name: Install missing requests_unixsocket PY3 | ||
ansible.builtin.pip: | ||
name: "requests_unixsocket" | ||
when: requests_unixsocket_check_py3 is succeeded and (requests_unixsocket_check_py3.stdout | length == 0 or requests_unixsocket_check_py3.stdout.find("requests-unixsocket") == -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
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,16 @@ | ||
--- | ||
- name: Set mgmt port | ||
ini_file: | ||
dest: "{{ splunk.home }}/etc/system/local/web.conf" | ||
section: settings | ||
option: "mgmtHostPort" | ||
value: "0.0.0.0:{{ splunk.svc_port }}" | ||
owner: "{{ splunk.user }}" | ||
group: "{{ splunk.group }}" | ||
when: | ||
- "'svc_port' in splunk" | ||
register: set_mgmt_port | ||
|
||
# Restart only when Splunk is running and when any of the above have changed | ||
- include_tasks: ../handlers/restart_splunk.yml | ||
when: set_mgmt_port is changed |
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