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