Created
January 16, 2016 21:57
-
-
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
This file contains hidden or 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
| --- | |
| # 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