第 6 章 续订和更改 SSL/TLS 证书


如果您的当前 SSL/TLS 证书已过期或很快过期,您可以续订或替换 Ansible Automation Platform 使用的 SSL/TLS 证书。

如果您需要使用新信息(如新主机)重新生成它们,则必须续订 SSL/TLS 证书。

如果要使用内部证书颁发机构签名的证书,您必须替换 SSL/TLS 证书。

6.1. 基于容器的安装

您可以更改基于容器的 Ansible Automation Platform 安装的 TLS 证书和密钥。这个过程涉及一个准备步骤,提供新的自定义证书、删除或移动旧证书,然后运行安装程序。

6.1.1. 使用安装程序更改 TLS 证书和密钥

以下流程描述了如何使用安装程序更新 TLS 证书和密钥。

流程

  1. 要准备证书和密钥,请选择以下方法之一:

    • 要提供自定义证书 - 对于需要更新的 TLS 证书的每个服务,请将新证书和密钥复制到相对于 Ansible Automation Platform 安装程序的路径。然后,使用新文件的绝对路径更新清单文件变量。

      # Platform gateway
      gateway_tls_cert=<path_to_tls_certificate>
      gateway_tls_key=<path_to_tls_key>
      gateway_pg_tls_cert=<path_to_tls_certificate>
      gateway_pg_tls_key=<path_to_tls_key>
      gateway_redis_tls_cert=<path_to_tls_certificate>
      gateway_redis_tls_key=<path_to_tls_key>
      
      # Automation controller
      controller_tls_cert=<path_to_tls_certificate>
      controller_tls_key=<path_to_tls_key>
      controller_pg_tls_cert=<path_to_tls_certificate>
      controller_pg_tls_key=<path_to_tls_key>
      
      # Automation hub
      hub_tls_cert=<path_to_tls_certificate>
      hub_tls_key=<path_to_tls_key>
      hub_pg_tls_cert=<path_to_tls_certificate>
      hub_pg_tls_key=<path_to_tls_key>
      
      # Event-Driven Ansible
      eda_tls_cert=<path_to_tls_certificate>
      eda_tls_key=<path_to_tls_key>
      eda_pg_tls_cert=<path_to_tls_certificate>
      eda_pg_tls_key=<path_to_tls_key>
      eda_redis_tls_cert=<path_to_tls_certificate>
      eda_redis_tls_key=<path_to_tls_key>
      
      # PostgreSQL
      postgresql_tls_cert=<path_to_tls_certificate>
      postgresql_tls_key=<path_to_tls_key>
      
      # Receptor
      receptor_tls_cert=<path_to_tls_certificate>
      receptor_tls_key=<path_to_tls_key>
      Copy to Clipboard Toggle word wrap
    • 要生成新的证书 - 如果您希望安装程序为服务生成新证书,请删除或移动现有证书和密钥。

      Expand
      表 6.1. 每个服务的证书和密钥文件路径
      服务证书文件路径密钥文件路径

      自动化控制器

      ~/aap/controller/etc/tower.cert

      ~/aap/controller/etc/tower.key

      Event-Driven Ansible

      ~/aap/eda/etc/eda.cert

      ~/aap/eda/etc/eda.key

      平台网关

      ~/aap/gateway/etc/gateway.cert

      ~/aap/gateway/etc/gateway.key

      Automation hub

      ~/aap/hub/etc/pulp.cert

      ~/aap/hub/etc/pulp.key

      PostgreSQL

      ~/aap/postgresql/server.crt

      ~/aap/postgresql/server.key

      Receptor

      ~/aap/receptor/etc/receptor.crt

      ~/aap/receptor/etc/receptor.key

      Redis

      ~/aap/redis/server.crt

      ~/aap/redis/server.key

  2. 准备证书后,从 安装 目录中运行安装 playbook:

    ansible-playbook -i <inventory_file_name> ansible.containerized_installer.install
    Copy to Clipboard Toggle word wrap

验证

通过检查服务是否正在运行并可以访问,验证新的 TLS 证书是否正在使用。要做到这一点,使用 curl 检查特定端点:

$ curl -vk https://<hostname_or_ip>:<port_number>/api/v2/
Copy to Clipboard Toggle word wrap

此命令的输出提供有关 TLS 握手的详细信息。查找以下输出以确认使用了正确的证书:

*  SSL certificate verify OK
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat