Skip to content

Instantly share code, notes, and snippets.

@zealot128
Created January 16, 2016 21:57
Show Gist options
  • Select an option

  • Save zealot128/70c887498983376d1863 to your computer and use it in GitHub Desktop.

Select an option

Save zealot128/70c887498983376d1863 to your computer and use it in GitHub Desktop.
Ansible: quickly disable ssh roaming + upgrade ssh-server + openssl for all your servers
---
# Disable roaming for all servers, upgrade ssh-server + openssl
# you can test with: ssh whoami.filippo.io
# run with: ansible-playbook -i YOURINVENTORY hotfix.yml
- hosts: all
tasks:
- lineinfile:
insertafter: 'Host *'
line: ' UseRoaming no'
dest: '/etc/ssh/ssh_config'
notify: 'reload ssh'
- apt:
update_cache: yes
pkg: '{{item}}'
state: latest
with_items:
- openssl
- openssh-server
handlers:
- name: 'reload ssh'
service: name=ssh state=reloaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment