ansible git 安装
时间: 2023-08-19 08:16:15 浏览: 253
回答: 要在Ansible中安装Git,你可以使用yum模块来执行安装操作。首先,你需要确保在控制节点上安装了Git。然后,你可以使用以下命令在目标主机上安装Git:ansible 主机 -m yum -a 'name=git state=present'。其中,主机是你要安装Git的目标主机的名称或IP地址。这个命令会在目标主机上执行yum安装命令来安装Git。\[3\]
#### 引用[.reference_title]
- *1* *3* [ansible权威指南笔记(一)—— 安装配置、常用命令与模块](https://blog.csdn.net/Hehuyi_In/article/details/110233095)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Ansible概述及安装](https://blog.csdn.net/loo_Charles_ool/article/details/124256757)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文