第 2 章 安装 JBoss Web 服务器集合


作为使用 Ansible 自动部署 Red Hat JBoss Web Server 的第一步,您必须从 Ansible 自动化 hub 下载并安装 JBoss Web Server 集合。JBoss Web 服务器集合在 Ansible 自动化中心 中命名为 redhat.jws。在安装 JBoss Web 服务器集合前,您必须确保您的系统符合特定先决条件。

先决条件

  • 您可以通过安装 Red Hat Ansible Automation Platform 2.x,在系统上的控制节点上安装了 ansible-core 软件包版本 2.16 或更高版本。

    有关安装 Red Hat Ansible Automation Platform 的更多信息,请参阅 Red Hat Ansible Automation Platform 安装指南

  • 您已更新了 ansible.cfg 文件,以使用 Ansible Automation Hub 作为 Ansible 集合 的主要源。有关更新 ansible.cfg 文件的更多信息,请参阅开始使用自动化中心

流程

  • 在 Ansible 控制节点上输入以下命令:

    $ ansible-galaxy collection install redhat.jws
    注意

    如果前面的命令生成 Failed to find collection redhat.jws:* 错误消息,请确保正确更新了 ansible.cfg 文件以使用 Ansible Automation hub,如 开始使用自动化中心 所述。

    前面的命令会产生以下输出:

    Starting galaxy collection install process
    
    Process install dependency map
    
    Starting collection install process
    
    ...
    
    redhat.jws:<version> was installed successfully
    
    ...
    
    redhat.runtimes_common:<version> was installed successfully
    
    ...
    
    ansible.posix:<version> was installed successfully

    对于 brevity,前面的示例使用 ellipses 来表示忽略的文本。在前面的输出中,&lt ;version& gt; 代表安装的 redhat.jwsredhat.runtimes_commonansible.posix 集合的最新可用版本。

验证

  • 在 Ansible 控制节点上输入以下命令:

    $ ansible-galaxy collection list

    前面的命令显示安装的集合列表。例如:

    Collection                 Version
    -------------------------- -------
    ansible.posix              <version>
    redhat.jws                 <version>
    redhat.runtimes_common     <version>
    ...

如上例所示,当安装 redhat.jws 集合时,ansible.posixredhat.runtimes_common 集合的最新版本也会自动下载并安装到 Ansible 控制节点上。redhat.runtimes_common 集合提供了一组标准实用程序,以支持各种红帽运行时产品的自动部署,如 JBoss Web 服务器。

注意

如果 Ansible 控制节点上已存在最新版本的 ansible.posixredhat.runtimes_common 集合,则这些集合不会被再次自动安装。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部