官术网_书友最值得收藏!

Debian package installation

For Debian users, as you may already know, if you want to use the latest versions of a tool, you need to be running the latest stable or testing release of the Debian OS. The testing release is not recommended, but is used by some people. Because Debian is very reliable, operating system administrators tend to set up a Debian server and then forget about it for years and years, because it continues to do what it is supposed to do without a single problem. Often, administrators tend to have lots of old, stable Debian releases running. We don't recommend using these if you want to have the latest Ansible version, with all its perks, modules, and plugins, unless you do an alternative installation (with PyPI, a source installation, or via a container).

We are going to be using Debian 9 (Stretch) as it is the latest Debian stable release. Debian 9 allows you to use many Ubuntu package sources for Ansible. We can either add the DEB line to the source.list file or add the Personal Package Archives (PPA) to the list. First, we need to install the software properties package:

sudo apt-get install -y software-properties-common

We then use a text editor and add the following DEB to /etc/apt/source.list:

deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
A faster way to add a DEB line at the end of the source file is as follows: echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/source.list

Then authenticate the link by adding its key to apt:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
For the latest Debian release, the PPA repository can be used directly  as well, by adding the link to the APT repository: sudo apt-add-repository ppa:ansible/ansible

Usually, adding a repository requires you to update the package manager cache:

sudo apt update

Then we can install Ansible:

sudo apt install -y ansible

Most of the tutorials in further chapters are  carried out on Debian 8 (Jessie) with Ansible installed and updated using Python PyPI. This is just as stable, up to date, and reliable as any other standard way of installing Ansible on an operating system's latest release.
主站蜘蛛池模板: 怀集县| 拉萨市| 柳江县| 和林格尔县| 柳江县| 南汇区| 平谷区| 鱼台县| 巨野县| 西乌珠穆沁旗| 融水| 惠水县| 左云县| 海南省| 本溪| 郴州市| 府谷县| 东丽区| 武强县| 修文县| 平陆县| 阿克陶县| 日喀则市| 万宁市| 惠水县| 萍乡市| 民丰县| 建宁县| 芦溪县| 蒙山县| 蒙山县| 英山县| 宾阳县| 儋州市| 兴安县| 兴安县| 鹤峰县| 大厂| 松桃| 会理县| 紫金县|