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'

~                                                                          
~                                                                          
~                                                                          
~                              

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM