包管理器,通过包管理器安装软件
一、主要参数
name :指定要安装的软件包名
state: present 安装 absent 卸载
二、示例
示例1
[admin@node1 ~]$ ansible webserver -m package -a "name=openssl-devel state=present" -b --ask-sudo-pass
示例2
- name: install_from_source | Ensure dependencies for building from source are installed.
package: "name={{ item }} state=installed"
with_items: "{{ php_packages }}"
————Blueicex 2020/2/1 16:00 blueice1980@126.com
来源:CSDN
作者:blueicex2020
链接:https://blog.csdn.net/blueicex2017/article/details/104134674