Last active
January 15, 2016 04:20
-
-
Save theqwan-chengwei/18e0840fe5b6960d8828 to your computer and use it in GitHub Desktop.
透過 ansible 修復 CVE-2016-0777、CVE-2016-0778,執行的時候記得輸入自己的 host
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
#ansible 1.9.2 | |
- name: fix_CVE-2016-0777_0778 | |
hosts: "{{ myhost }}" | |
sudo: True | |
sudo_user: root | |
tasks: | |
- name: upgrade openssh | |
apt: name={{ item }} state=latest update_cache=yes | |
with_items: | |
- openssh-client | |
- openssh-server | |
- openssh-sftp-server | |
- name: UseRoaming no | |
lineinfile: dest=/etc/ssh/ssh_config insertafter=EOF line='UseRoaming no' | |
- name: Restart openssh | |
service: name=ssh state=restarted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment