-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into decrypted_check
- Loading branch information
Showing
35 changed files
with
443 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
splunk_firewall_ports: | ||
- "{{ splunkweb_port }}" | ||
- "{{ splunkapi_port }}" | ||
- "{{ splunktcpin_port }}" | ||
- "{{ splunkhec_port }}" |
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,7 @@ | ||
--- | ||
splunk_firewall_ports: | ||
- "{{ splunkweb_port }}" | ||
- "{{ splunkapi_port }}" | ||
- "{{ splunktcpin_port }}" | ||
- "{{ splunkhec_port }}" | ||
- "{{ splunkidxcrep_port }}" |
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,5 @@ | ||
--- | ||
splunk_firewall_ports: | ||
- "{{ splunkweb_port }}" | ||
- "{{ splunkapi_port }}" | ||
- "{{ splunkshcrep_port }}" |
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
- splunk_authenticationconf is defined | ||
- ad_bind_password != 'undefined' | ||
notify: restart splunk | ||
no_log: true |
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,62 @@ | ||
--- | ||
- name: Ensure {{ firewall_service }} package is installed | ||
ansible.builtin.package: | ||
name: "{{ firewall_service }}" | ||
state: present | ||
become: true | ||
|
||
- name: Configure firewalld for Splunk | ||
block: | ||
- name: Ensure firewalld is Started and Enabled | ||
ansible.builtin.systemd: | ||
name: "{{ firewall_service }}" | ||
state: started | ||
enabled: true | ||
become: true | ||
|
||
- name: Add splunk firewalld service | ||
ansible.builtin.template: | ||
src: firewalld_service.xml.j2 | ||
dest: /etc/firewalld/services/{{ splunk_firewall_service }}.xml | ||
backup: true | ||
mode: 0644 | ||
owner: root | ||
group: root | ||
become: true | ||
register: firewalld | ||
|
||
- name: reload firewalld | ||
command: firewall-cmd --reload | ||
become: true | ||
when: firewalld.changed | ||
|
||
- name: Activate splunk firewalld service | ||
ansible.posix.firewalld: | ||
service: "{{ splunk_firewall_service }}" | ||
permanent: true | ||
state: enabled | ||
immediate: true | ||
notify: reload firewalld | ||
become: true | ||
when: firewall_service == "firewalld" | ||
|
||
- name: Configure UFW for Splunk | ||
block: | ||
- name: Ensure SSH is enabled | ||
community.general.ufw: | ||
port: 22 | ||
proto: tcp | ||
rule: allow | ||
state: enabled | ||
become: true | ||
|
||
- name: Add splunk port to UFW | ||
community.general.ufw: | ||
port: "{{ item.number }}" | ||
proto: "{{ item.protocol }}" | ||
rule: allow | ||
state: reloaded | ||
comment: "{{ item.desc | default('') }}" | ||
become: true | ||
loop: "{{ splunk_firewall_ports }}" | ||
when: firewall_service == "ufw" |
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
Oops, something went wrong.