-
Notifications
You must be signed in to change notification settings - Fork 3
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 #3 from UCI-CCDC/feat-ansible-playbook-for-audit-s…
…cript feat: basic ansible playbooks
- Loading branch information
Showing
6 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: Run Audit Script on Inventory Hosts | ||
hosts: all | ||
become: true | ||
vars: | ||
op: "{{ operation }}" | ||
debianPackages: "sudo nmap tmux vim hostname htop clamav lynis debsums" | ||
tasks: | ||
- name: Display help | ||
script: ../audit.sh -h | ||
register: output | ||
when: op == "h" | ||
|
||
- name: Install Debian packages | ||
command: apt-get install {{ debianPackages }} -y -q | ||
register: output | ||
when: op == "i" and ansible_os_family == "Debian" | ||
|
||
- debug: msg="{{ output }}" |
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 @@ | ||
[server] | ||
{server_ip_thingy} | ||
|
||
[server:vars] | ||
ansible_user=ubuntu | ||
ansible_ssh_private_key_file=./keys/{key_thingy} |
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,9 @@ | ||
- name: Run Snort Install Script on Inventory Hosts | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: run the install snort script | ||
script: ../snort-install.sh | ||
register: output | ||
- debug: msg="{{ output.stdout_lines }}" | ||
- debug: msg="{{ output.stderr_lines }}" |
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,9 @@ | ||
- name: Run Splunk Ent Install Script on Inventory Hosts | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: run the install splunk-ent-install script | ||
script: ../splunk-ent-install.sh | ||
register: output | ||
- debug: msg="{{ output.stdout_lines }}" | ||
- debug: msg="{{ output.stderr_lines }}" |
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,9 @@ | ||
- name: Run Splunk Forwarder Setup Script on Inventory Hosts | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: run the install splunkforwarder-setup script | ||
script: ../splunkforwarder-setup.sh | ||
register: output | ||
- debug: msg="{{ output.stdout_lines }}" | ||
- debug: msg="{{ output.stderr_lines }}" |
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