b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

python installation aborted_advanced installation_updating a(3)

电脑杂谈  发布时间:2017-05-28 00:07:45  来源:网络整理

pip是python的包管理工具,使用它来安装Ansible非常简单,但是,需要注意的是这样安装的软件不会随操作系统的升级而升级,然而这样也无所谓。下面是从pip安装的命令

pip install ansible

从源码安装

从源码安装是获取最新版本的一个好方式,但是通过源码安装的版本没有发行版本那样经过良好的测试。在自己更新的时候也要很小心,同时还要确保操作系统系统更新之后,软件还能继续工作。从git库下载然后安装,使用以下命令

$ git clone git://github.com/ansible/ansible.git
$ cd ansible
$ sudo make install
Setting up Ansible
Ansible needs to be able to get an inventory of the machines that you want to configure
in order to manage them. This can be done in many ways due to inventory plugins.
Several different inventory plugins are included with the base install. We will go over
these later in the book, but for now we will cover the  hosts file inventory.
The default Ansible inventory file is named hosts and placed in /etc/ansible . It is
formatted like an INI file. Group names are enclosed in square braces, and everything
underneath it, down to the next group heading, gets assigned to that group. Machines
can be in many groups at one time. Groups are used to allow you to configure many
machines at once. You can use a group instead of a hostname as a host pattern in later
examples, and Ansible will run the module on the entire group at once.
In the following example, we have three machines in a group named webservers ,
namely site01 , site02 , and site01-dr . We also have a production group that
consists of site01 , site02 , db01 , and bastion .
[webservers]
site01
site02
[production]
site01
site02
db01
bastion

要管理设备,我们的Ansible首先要有一个设备清单。建立设备清单有很多自带的不同的插件,我们将在稍后介绍,现在我们先来建立一个简单的主机文件清单。默认的设备清单配置文件在/etc/ansible。python installation aborted他是一个类是ini的配置文件。其中,组名被方括号包裹,组名下面,在2个组名之间的配置是当前组的配置信息,一个主机可以同时属于多个组。组的设置可以让我们一次性配置管理多台主机。在稍后的例子里面,在pattern选项中,你可以使用组名来替代主机名,Ansible会一次在组内的所有主机上运行模块命令。在接下来的列子中,我们有3台机器在一个叫做webservers的组中,他们的名字分别是site01,site02 site01-dir。另外我们还有一个生产组,包括4台主机,分别是site01,site02,db01,bastion。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shouji/article-49614-3.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...