提升自动化技巧的 10 篇 Ansible 文章
Ansible

> 
> 今年，准备好，用出色的 Ansible 自动化技能装备自己的技能包吧。
> 
> 
> 


![](/data/attachment/album/202001/07/231057fbtfjwrn29ficxj0.jpg)


今年我关注了大量关于 Ansible 的文章，以下这些内容都值得每个人学习，无论是否是 Ansible 的新手。


这些文章值得大家标记为书签，或者设置个计划任务（亦或者是设置一个 Tower/AWX 任务），用来提醒自己常读常新。


如果你是 Ansible 的新手，那么就从这些文章开始着手吧：


* 《[Ansible 快速入门指南](https://opensource.com/article/19/2/quickstart-guide-ansible)》拥有一些对新手非常有用的信息，同时还介绍了一些更高级的话题。
* 《[你需要知道的 10 个 Ansible 模块](https://opensource.com/article/19/9/must-know-ansible-modules)》和《[5 个 Ansible 运维任务](/article-11312-1.html)》（译文）这两篇文章有每一位 Ansible 管理员都应该熟悉并认真研习的一些最基础的 Ansible 功能。
* 《[如何使用 Ansible 记录流程](https://opensource.com/article/19/4/ansible-procedures)》这篇文章是对一些额外话题的纵览，我猜你一定会感到很有趣。


剩余的这些文章包含了更多高级的话题，比如 Windows 管理、测试、硬件、云和容器，甚至包括了一个案例研究，如何管理那些对技术有兴趣的孩子的需求。


我希望你能像我一样好好享受 Ansible 带来的乐趣。不要停止学习哦！


1. 《[Ansible 如何为我的家庭带来和平](https://opensource.com/article/19/9/ansible-documentation-kids-laptops)》这个异想天开的案例，你能看到如何利用 Ansible 为孩子们快速部署一个新的笔记本（或者重装旧笔记本）
2. Taz Brown 和 Abner Malivert 的《[适用于 Windows 管理员的 Ansible](https://opensource.com/article/19/2/ansible-windows-admin)》：你知道 Ansible 也可以管理 Windows 的节点吗？这篇文章以部署一个 IIS 为案例，阐述了基础的 Ansible 服务器和 Windows 客户端的安装。
3. Shashank Hegde 的《[你需要知道的 10 个 Ansible 模块](https://opensource.com/article/19/9/must-know-ansible-modules)》是个学习你最应该知道的那些最常见、最基础的 Ansible 模块的好文章。运行命令、安装软件包和操作文件是许多有用的自动化工作的基础。
4. Marco Bravo 的《[如何使用 Ansible 记录流程](https://opensource.com/article/19/4/ansible-procedures)》：Ansible 的 YAML 文件易于阅读，因此它们可以被用于记录完成任务所需的手动步骤。这一特性可以帮助你调试与扩展，这令工作变得异常轻松。同时，这篇文章还包含关于测试和分析等 Ansible 相关主题的指导。
5. Clement Verna 的《[使用 Testinfra 和 Ansible 验证服务器状态](/article-10943-1.html)》（译文）：测试环节是任何一个 CI/CD DevOps 流程不可或缺的一部分。所以为什么不把测试 Ansible 的运行结果也纳入其中呢？这个测试架构 Testinfra 的入门级文章可以帮助你检查配置结果。
6. Mark Phillips 的《[Ansible 硬件起步](https://opensource.com/article/19/5/hardware-bootstrapping-ansible)》：这个世界并不是完全已经被容器和虚拟机所占据。许多系统管理员仍然需要管理众多硬件资源。通过 Ansible 与一点 PXE、DHCP 以及其他技巧的结合，你可以创建一个方便的管理框架使硬件易于启动和运行。
7. Jairo da Silva Junior 的《[你需要了解的关于 Ansible 模块的知识](https://opensource.com/article/19/3/developing-ansible-modules)》：模块给 Ansible 带来了巨大的潜力，已经有许多模块可以拿来利用。但如果没有你所需的模块，那你可以尝试给自己打造一个。看看这篇文章吧，它能让你了解如何从零开始打造自己所需的模块。
8. Mark Phillips 的《[5 个 Ansible 运维任务](/article-11312-1.html)》（译文）：这是另一个有关于如何使用 Ansible 来管理常见的系统操作任务的文章。这里描述了一系列可以取代命令行操作的 Tower（或 AWX）的案例。
9. Chris Short 的《[Ansible 快速入门指南](https://opensource.com/article/19/2/quickstart-guide-ansible)》是个可以下载的 PDF 文档。它可以作为一本随时拿来翻阅的手册。这篇文章的开头有助于初学者入门。同时，还包括了一些其他的研究领域，比如模块测试、系统管理任务和针对 K8S 对象的管理。
10. Mark Phillips 的《[Ansible 参考指南，带有 Ansible Tower 和 GitHub 的 CI/CD，等等](https://opensource.com/article/19/7/ansible-news-edition-one)》：这是一篇每月进行总结更新的文章，充满了有趣的链接。话题包括了 Ansible 的基础内容、管理 Netapp 的 E 系列存储产品、调试、打补丁包和其他一些相关内容。文章中还包括了一些视频以及一些聚会的链接。请查看详情。


如果你也有一些你喜爱的 Ansible 文章，那请留言告诉我们吧。




---


via: <https://opensource.com/article/19/12/ansible-resources>


作者：[James Farrell](https://opensource.com/users/jamesf) 选题：[lujun9972](https://github.com/lujun9972) 译者：[BrunoJu](https://github.com/BrunoJu) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
This year saw a wide range of really helpful Ansible articles. Whether you are just starting out with Ansible or a seasoned pro, there is something for everyone here to learn from.

A good number of these articles are worthy of your bookmarking and perhaps a cron (or maybe a Tower/AWX job) reminder to reread them periodically.

If you are new to Ansible, start with the following articles:

has some good starter information as well as deeper dives into more advanced topics*A quickstart guide to Ansible*and*10 Ansible modules you need to know*review some of the more fundamental functions that every Ansible admin should be familiar with*5 ops tasks to do with Ansible*also presents a survey of additional topics you might find it interesting to follow up on*How to use Ansible to document procedures*

The remainder of these articles cover more advanced topics like Windows management, testing, hardware, cloud, and containers—and even a case study in managing the demands of tech-curious children.

I hope you enjoyed this Ansible year as much as I did. Never stop learning!

is a whimsical case study in applying Ansible skills to quickly provision new (or rather old) laptops for my children.[How Ansible brought peace to my home](https://opensource.com/article/19/9/ansible-documentation-kids-laptops)by Taz Brown and Abner Malivert: Did you know Ansible can manage Windows nodes as well? This piece reviews basic Ansible server and Windows client setups with an example on how to deploy an IIS server.[Ansible for the Windows admin](https://opensource.com/article/19/2/ansible-windows-admin)by Shashank Hegde is a great place to start for some of the most common and basic Ansible modules all admins should know. Running commands, installing packages, and handling files are the basis for many useful automation plays.[10 Ansible modules you need to know](https://opensource.com/article/19/9/must-know-ansible-modules)by Marco Bravo: Ansible’s YAML files make for easy reading, so much so that they can be used to document the manual steps needed to accomplish a task. This makes your work easier to debug and extend later on. Also contained in this article are pointers on related topics like testing and analysis.[How to use Ansible to document procedures](https://opensource.com/article/19/4/ansible-procedures)by Clement Verna: Testing is an integral part of any CI/CD DevOps pipeline, so why not test Ansible’s results as well? This primer on Testinfra can be used to help check the configuration results you need.[Using Testinfra with Ansible to verify server state](https://opensource.com/article/19/5/using-testinfra-ansible-verify-server-state)by Mark Phillips: Not all the world is containers and virtual machines. Many of us sysadmins still have significant hardware deployments to manage. With a little PXE dust and DHCP magic (among other tidbits), you can create a convenient framework using Ansible to get real hardware up and running easily.[Hardware bootstrapping with Ansible](https://opensource.com/article/19/5/hardware-bootstrapping-ansible)by Jairo da Silva Junior: Modules bring real power to Ansible. Many modules are already available, but when there is none, you may need to roll your own. Read this article to look a bit deeper into how modules are made.[What you need to know about Ansible modules](https://opensource.com/article/19/3/developing-ansible-modules)by Mark Phillips: This is another more basic review of Ansible use to manage common system operations tasks. The draw here is the list of examples given in Tower (or AWX) instead of the old familiar command line.[5 ops tasks to do with Ansible](https://opensource.com/article/19/8/ops-tasks-ansible)by Chris Short is a great PDF download that you should keep on hand and reread from time to time. It begins with a great primer to get started in Ansible. It also covers other areas of interest including Molecule testing, sysadmin tasks, and Kubernetes object management, to name a few.[A quickstart guide to Ansible](https://opensource.com/article/19/2/quickstart-guide-ansible)by Mark Phillips: This is a monthly round-up article full of interesting links to follow. Topics span Ansible basics, managing Netapp E-Series storage, debugging, patching, and more. Videos are included here as well as some pointers to Ansible meetup groups. Check it out![An Ansible reference guide, CI/CD with Ansible Tower and GitHub, and more news](https://opensource.com/article/19/7/ansible-news-edition-one)

Let us know if you had a favorite Ansible article this year and why in the comments.

## 2 Comments