Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: basic ansible playbooks #3

Merged
merged 2 commits into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -188,7 +188,7 @@ echo '
// \ |‾‾‾\_ | ‾‾
// _\| _\|

zot zot, thots.'
zoot zoot!'


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