我想使用以下几行来更新剧本中的所有软件包,
---
- name: First play
hosts: all
tasks:
- name: Update all the current software packages on the system
yum: name=* state=latest
但是我一直收到错误消息,说语法有问题。
The offending line appears to be:
- name: Update all the current software packages on the system
yum: name=* state=latest
^ here
答案 0 :(得分:0)
您的“ yum”之前没有正确的附加空间,并且“-name”需要与任务保持一致。试试这个:
---
- name: First play
hosts: all
tasks:
- name: Update all the current software packages on the system
yum:
name: *
state: latest