尝试使用Ansible Lightspeed
首先
2023年11月1日正式发布的Ansible Lightspeed(※2),截至2023年11月13日,仍可使用TechPreview,因此我进行了尝试。
※1
https://www.redhat.com/en/about/press-releases/red-hat-launches-red-hat-ansible-lightspeed-ibm-watsonx-code-assistant-ai-driven-enterprise-it-automation
红帽公司推出了红帽Ansible Lightspeed和IBM Watsonx Code Assistant,这是一款基于人工智能的企业级IT自动化解决方案。
※2
光速:使用IBM Watson的代码助手Code Assistant来生成Playbook,以辅助创建功能
https://www.redhat.com/en/technologies/management/ansible/ansible-lightspeed
步骤 (bù
0. 运行环境
Windows 11专业版(23H2)
WSL + Ubuntu 22.04.02
1. 預先準備
1-1. 安装VSCode
※Lightspeed 作为 VS Code 的 Ansible 扩展功能。
请从以下网址下载并安装。
https://code.visualstudio.com
1-2. 安装 VSCode 扩展

1-3. 从VSCode连接到WSL

在WSL的Ubuntu上安装Ansible扩展。

1-5. 启用 Ansible 扩展的 Lightspeed


1-6. 将ansible引入到WSL的Ubuntu中
使用VSCode打开终端,执行以下命令,将Ansible引入到WSL的Ubuntu中。
$ mkdir lightspeed
$ cd lightspeed
$ apt-get update
$ apt install python3.10-venv
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install ansible
1-7. 连接到光速网络









尝试自动生成代码





