Ansible使用介绍

72课时
1.9K学过
8分

课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
2分钟

17 示例5:引用系统自带变量

ansible all -m setup |grep ansible_fqdn 查看系统自带变量

vim var.yml

– hosts: websrvs

remote_user: root

tasks:

– name: create log file

file: name=/data/{{ ansible_fqdn }}.log state=touch