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

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.
主站蜘蛛池模板: 休宁县| 慈溪市| 高密市| 阜新市| 客服| 茂名市| 长汀县| 教育| 昆山市| 丹寨县| 金坛市| 莒南县| 崇左市| 呈贡县| 铁力市| 陈巴尔虎旗| 五指山市| 襄城县| 磴口县| 元江| 百色市| 襄垣县| 金秀| 许昌县| 襄樊市| 民乐县| 新田县| 彰武县| 哈巴河县| 峨山| 阿拉善左旗| 涿州市| 汤阴县| 北辰区| 黎平县| 信阳市| 开封市| 城固县| 洛宁县| 广平县| 南宁市|