2.3. 设置清单文件
在升级 Red Hat Ansible Automation Platform 安装前,请编辑 inventory
文件,使其与您的所需配置匹配。您可以从现有 Ansible Automation Platform 部署中保留相同的参数,或者修改参数以匹配环境的任何更改。
流程
进入安装程序目录。
- 捆绑的安装程序
$ cd ansible-automation-platform-setup-bundle-<latest-version>
- 在线安装程序
$ cd ansible-automation-platform-setup-<latest-version>
-
打开
inventory
文件以进行编辑。 修改
inventory
文件,以置备新节点、取消置备节点或组,以及导入或生成自动化中心 API 令牌。如果没有更改环境,您可以使用现有 Ansible Automation Platform 2.1 安装中的同一
inventory
文件。注意默认情况下,自动化中心要求不会自动更新。如果要在升级过程中更新自动化中心要求,请在清单文件中设置
automationhub_upgrade=true
。
在集群中置备新节点
添加新节点以及
inventory
文件中的现有节点,如下所示:[controller] clusternode1.example.com clusternode2.example.com clusternode3.example.com [all:vars] admin_password='password' pg_host='' pg_port='' pg_database='<database_name>' pg_username='<your_username>' pg_password='<your_password>'
在集群中取消置备节点或组
-
将
node_state-deprovision
附加到inventory
文件中的节点或组。
导入和生成 API 令牌
使用
automationhub_api_token
标志导入现有的 API 令牌,如下所示:automationhub_api_token=<api_token>
生成一个新的 API 令牌,并使用
generate_automationhub_token
标志使任何现有令牌无效,如下所示:generate_automationhub_token=