Skip to content

Commit

Permalink
Merge pull request #3 from UCI-CCDC/feat-ansible-playbook-for-audit-s…
Browse files Browse the repository at this point in the history
…cript

feat: basic ansible playbooks
  • Loading branch information
aton4 committed Oct 23, 2021
2 parents 1f60359 + 9d3770a commit ae33308
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Linux/ansible/audit.yml
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 }}"
6 changes: 6 additions & 0 deletions Linux/ansible/inventory
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}
9 changes: 9 additions & 0 deletions Linux/ansible/snort-install.yml
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 }}"
9 changes: 9 additions & 0 deletions Linux/ansible/splunk-ent-install.yml
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 }}"
9 changes: 9 additions & 0 deletions Linux/ansible/splunkforwarder-setup.yml
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 }}"
2 changes: 1 addition & 1 deletion Linux/audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ echo '
// \ |‾‾‾\_ | ‾‾
// _\| _\|
zot zot, thots.'
zoot zoot!'


#generate inv directory, audit.txt, and set up variables for redirection
Expand Down

0 comments on commit ae33308

Please sign in to comment.