Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (16 sloc) 370 Bytes
---
- hosts: all
sudo: true
tasks:
- name: Update apt cache
apt: update_cache=yes
- name: Install ufw package
apt: name=ufw
- name: Setup ufw
ufw: state=enabled policy=deny
- name: Allow SSH in ufw
ufw: rule=allow name=OpenSSH
- name: Reboot server
command: shutdown -r now
- name: Display uptime
command: /usr/bin/uptime