Ansible进阶 、 Ansible Role

playbook
模块
# 在test组中的主机上,安装httpd、php、php-mysqlnd
[root@control ansible]# vim pkg.yml
---
- name: install pkgs
hosts: test
tasks:
- name: install web pkgs
yum:
name: httpd,php,php-mysqlnd
state: present
# 安装多个软件包,还可以写为:
---
- name: install pkgs
hosts: test
tasks:
- name: install web pkgs
yum:
name: [httpd,php,php-mysqlnd]
state: present

# 安装多个软件包,

Ansible进阶 、 Ansible Role最先出现在Python成神之路

版权声明:
作者:congcong
链接:https://www.techfm.club/p/16145.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>