ansible 报错解决:ERROR! this task '****' has extra params, which is only allowed in the following modules:..
这个问题一般是模块参数的问题,仔细核对一下模块的参数。
少baseurl参数
#!/bin/bash ansible all -m yum_repository -a 'name=abc description=abcabc file=test baseurl=http://study.lab0.example.com/rhel8/BaseOS gpgcheck=yes gpgkey=http://study.lab0.example.com/rhel8/RPM-GPG-KEY-redhat-release' ansible all -m yum_repository -a 'name=abc01 description="abc abc" file=test01 baseurl=http://study.lab0.example.com/rhel8/AppStream gpgcheck=yes gpgkey=http://study.lab0.example.com/rhel8/RPM-GPG-KEY-redhat-release' ~ ~ ~ ~
加油,愿被这世界温柔以待 ^_^