-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Gumprich
committed
May 10, 2015
1 parent
3438fe7
commit b8a7852
Showing
7 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ puppet/.tmp | |
puppet/.vagrant | ||
chef/cookbooks | ||
chef/.vagrant | ||
ansible/.vagrant |
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,3 @@ | ||
[submodule "ansible/provisioning/ansible-ssh-hardening"] | ||
path = ansible/provisioning/ansible-ssh-hardening | ||
url = https://github.com/hardening-io/ansible-ssh-hardening |
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,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 | ||
``` | ||
|
||
|
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,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 |
Submodule ansible-ssh-hardening
added at
ee61f7
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,2 @@ | ||
#ubuntu-trusty ansible_ssh_host=192.168.33.44 ansible_ssh_port=22 | ||
zufallsheld ansible_ssh_port=222 ansible_sudo=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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- hosts: all | ||
roles: | ||
- ansible-ssh-hardening/roles/ansible-ssh-hardening/ | ||
|