Skip to Content
Ansible:快速入门,第3版
book

Ansible:快速入门,第3版

by Bas Meijer, Lorin Hochstein, René Moser
May 2025
Intermediate to advanced
472 pages
6h 6m
Chinese
O'Reilly Media, Inc.
Content preview from Ansible:快速入门,第3版

第 23 章 Ansible 自动化平台

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

Ansible Automation Platform是 Red Hat 提供的商业软件产品 。Ansible Automation Platform 2 是面向企业的下一代自动化平台。它由重新架构的Automation Controller 4(以前称为 Tower/AWX)和Automation Hub(取代企业内部 Ansible Galaxy 的 Ansible 内容存储库)组成。您可以根据组织的管理策略对 Automation Hub 进行整理,或者直接与社区内容同步。例 23-1是 Automation Hub 管理员可以上传的文件(见图 23-1)。它定义了 Automation Hub 将在本地网络上提供服务的集合。Automation Hub 需要连接互联网才能下载这些内容。

例 23-1. Automation Hub 上社区内容的 requirements.yml
---
collections:
  # Install collections from Ansible Galaxy.
  - name: ansible.windows
    source: https://galaxy.ansible.com
  - name: ansible.utils
    source: https://galaxy.ansible.com
  - name: awx.awx
    source: https://galaxy.ansible.com
  - name: community.crypto
    source: https://galaxy.ansible.com
  - name: community.docker
    source: https://galaxy.ansible.com
  - name: community.general
    source: https://galaxy.ansible.com
  - name: community.kubernetes
    source: https://galaxy.ansible.com
...
图 23-1. 上传需求文件

如果使用 Ansible Automation Platform 2 中的 Private Automation Hub,可以在ansible.cfg中为ansible-galaxy 命令配置多个服务器 例 23-2

例 23-2. ansible.cfg
 [galaxy] server_list = automation_hub, release_galaxy, my_org_hub, my_test_hub [galaxy_server.automation_hub] url=https://cloud.redhat.com/api/automation-hub/ auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token token=my_ah_token [galaxy_server.release_galaxy] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Terraform:启动与运行,第三版

Terraform:启动与运行,第三版

Yevgeniy Brikman
写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9798341656987