4.2. 为您的私有自动化中心启用只查看访问
通过启用 view-only 权限,您可以授予用户查看私有自动化 hub 上的集合或命名空间的访问权限,而无需登录。view-only 权限允许您与未授权的用户共享内容,同时限制他们查看或下载源代码的能力。它们没有编辑私有自动化中心上的任何内容的权限。
要为私有自动化中心启用 view-only 访问,您必须编辑 Red Hat Ansible Automation Platform 安装程序中的清单文件。
-
如果要安装 Ansible Automation Platform 的新实例,请将
automationhub_enable_unauthenticated_collection_access
和automationhub_enable_unauthenticated_collection_download
参数添加到您的清单(inventory)
文件中,以及其他安装配置: -
如果您要更新现有的 Ansible Automation Platform 安装使其包含 view-only 访问权限,请将
automationhub_enable_unauthenticated_collection_access
和automationhub_enable_unauthenticated_collection_download
参数添加到inventory
文件中,然后运行setup.sh
脚本以应用更新:
流程
导航到安装程序。
- 捆绑的安装程序
$ cd ansible-automation-platform-setup-bundle-<latest-version>
- 在线安装程序
$ cd ansible-automation-platform-setup-<latest-version>
-
使用文本编辑器打开
清单
文件。 将
automationhub_enable_unauthenticated_collection_access
和automationhub_enable_unauthenticated_collection_download
参数添加到清单文件,并把它设置为True
,如下例所示:[all:vars] automationhub_enable_unauthenticated_collection_access = True 1 automationhub_enable_unauthenticated_collection_download = True 2
-
运行
setup.sh
脚本。安装程序启用对私有自动化中心的 view-only 权限。
验证
安装完成后,通过尝试在不登录的情况下查看私有自动化中心中的内容,验证您在私有自动化中心上具有 view-only 权限。
- 进入您的私有自动化中心。
- 在登录屏幕中,单击 。
验证您是否能够在自动化 hub 上查看内容,如命名空间或集合,而无需登录。