include:
---
- name: ansible playbook
hosts: all
remote_user: root
become: yes
vars:
user_name: 'test'
var_files:
tasks:
- include: test.yml
test.yml:
---
- name: 常用工具
yum:
name: '{{ item }}'
state: latest
with_items:
- tree
- zip
tags:
- common