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

WeChat public account
Shulou
2025-11-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail how to deploy and install ansible management tools in the environment. The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to deploy and install the environment of ansible management tools" can help you solve your doubts.
Environmental preparation:
Management host: 172.16.1.30
Managed host: 172.16.1.31
Deployment: (manage hosts)
Step one:
First, perform local hosts resolution on the management host:
# vi / etc/hosts# cat / etc/hosts172.16.1.30 ansible172.16.1.31 zabbix
Then synchronize the local hosts file to the managed host:
# scp / etc/hosts 172.16.1.31:/etc/### enter the password of the managed host
Step two
Generate a key pair on the administrative host:
# ssh-keygen-t dsa-f / root/.ssh/id_dsa-N ""
The following figure shows that the key pair is generated successfully:
Distribute the public key file to the managed host in an interaction-free manner:
# yum-y install sshpass# sshpass-p123123 ssh-copy-id-I / root/.ssh/id_dsa.pub "- o StrictHostKeyChecking=no 172.16.1.31"
Step three
Install the ansible software:
# yum-y install ansible# rpm-qa | grep ansibleansible-2.6.20-1.el6.noarch
The fourth step
Configuration management host list:
# cd / etc/ansible/#lsansible.cfg hosts roles# cp hosts hosts.bak# vi hosts# cat hosts[zabbix] 172.16.1.31
Step five
Test:
# ansible zabbix-m command-a "hostname" 172.16.1.31 | SUCCESS | rc=0 > > zabbix
The test can see that the hostname of the controlled host indicates that the configuration is successful.
After reading this, the article "how to deploy and install the environment of ansible management tools" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it to understand it. If you want to know more about related articles, 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.