In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to ansible batch upgrade CentOS sudo, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
Brief introduction
Sudo recently has a vulnerability, which requires an upgrade version and a large number of servers, so it needs to be updated in batch using ansible.
Ansible playbook
Vim update_sudo.yml
-name: update sudo hosts: "{{hosts}}" remote_user: root tasks:-name: CentOS 7 Update sudo yum: name: sudo state: latest when: ansible_distribution_major_version = = "7"-name: CentOS 6 Update sudo shell: rpm-Q sudo-1.9.5-3.el6.x86_64 | | rpm-Uvh https://github.com/ Sudo-project/sudo/releases/download/SUDO_1_9_5p2/sudo-1.9.5-3.el6.x86_64.rpm when: ansible_distribution_major_version = = "6"
CentOS6 has stopped updating, and you can download the new version directly from github. If the download speed is slow, you can download it first and put it into the local shared web directory I for download.
Use
Ansible-playbook-I / etc/ansible/hosts-e hosts=192.168.100.3192.168.100.34 update_sudo.yml the above is how to ansible batch upgrade CentOS sudo, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.