Skip to content

Instantly share code, notes, and snippets.

@yauh
Created January 24, 2014 13:37
Show Gist options
  • Save yauh/8597367 to your computer and use it in GitHub Desktop.
Save yauh/8597367 to your computer and use it in GitHub Desktop.
---
# file: group_vars/all
bootstrap_user: stephan # change this to your user account that manages the server
use_sudo: True
admin_email: [email protected]
---
# file: hardening.yml
- hosts: all
sudo: "{{ use_sudo }}"
sudo_user: "{{ bootstrap_user }}"
remote_user: "{{ bootstrap_user }}"
roles:
- { role: hardening, tags: hardening}
---
# file: roles/hardening/tasks/hardening_debian.yml
- name: Install recommended security packages
action: apt pkg={{ item }} state=latest
with_items:
- fail2ban
results in an error asking me whether I am root (apt-get cannot get a lock, so I assume I am not sudo'ing correctly here)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment