Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Gumprich committed May 10, 2015
1 parent 3438fe7 commit b8a7852
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ puppet/.tmp
puppet/.vagrant
chef/cookbooks
chef/.vagrant
ansible/.vagrant
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ansible/provisioning/ansible-ssh-hardening"]
path = ansible/provisioning/ansible-ssh-hardening
url = https://github.com/hardening-io/ansible-ssh-hardening
47 changes: 47 additions & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Example Ansible Hardening

Demonstrates the use of the hardening roles via Ansible to increase the security of your server. It also captures the best practice for using multiple hardening modules.

## Modules

This playbook installs the following on your server:

- [ansible-ssh-hardening](https://github.com/hardening-io/ansible-ssh-hardening)

## Prerequisites

Install [Ansible](http://docs.ansible.com/intro_installation.html) on your workstation.

## Usage

The is kept as simple as possible. With just two commands you are able to harden your server in less than 5 minutes.

```bash
# download this repository
git clone https://github.com/hardening-io/hardening

# change to the ansible-directory
cd hardening/ansible/provisioning

# add your to be hardened host to the inventory file

# run the playbook
ansible-playbook playbook.yml -i inventory
```


## Usage with Vagrant

Just fire up vagrant:

```bash
vagrant up
```

That's it. Enjoy testing your box via:

```bash
vagrant ssh ubuntu-trusty
```


19 changes: 19 additions & 0 deletions ansible/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

# Ubuntu
config.vm.define "ubuntu-trusty" do |c|
c.vm.box = "ubuntu/trusty64"
c.vm.network :private_network, ip: "192.168.33.44"

c.vm.provision :shell, inline: "apt-get update"
c.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/playbook.yml"
ansible.inventory_path = "provisioning/inventory"
ansible.sudo = true
end
end

end
1 change: 1 addition & 0 deletions ansible/provisioning/ansible-ssh-hardening
Submodule ansible-ssh-hardening added at ee61f7
2 changes: 2 additions & 0 deletions ansible/provisioning/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#ubuntu-trusty ansible_ssh_host=192.168.33.44 ansible_ssh_port=22
zufallsheld ansible_ssh_port=222 ansible_sudo=true
5 changes: 5 additions & 0 deletions ansible/provisioning/playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: all
roles:
- ansible-ssh-hardening/roles/ansible-ssh-hardening/

0 comments on commit b8a7852

Please sign in to comment.