这个问题一般是模块参数的问题,仔细核对一下模块的参数。

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'

~                                                                          
~                                                                          
~                                                                          
~                              

 

 

ansible 报错解决:ERROR! this task '****' has extra params, which is only allowed in the following modules:..

 

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
猜你喜欢
  • 2022-01-24
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-01-15
相关资源
相似解决方案