请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

ansible-playbook -i inventory/mycluster/hosts.yaml -b cluster.yml -vvvv报错

ansible-playbook -i inventory/mycluster/hosts.yaml -b cluster.yml -vvvv
二进制文件也下载了,报这个错误

TASK [kubernetes/preinstall : Install packages requirements] ***********************************************************************************************************
task path: /root/kubespray-2.15.0/roles/kubernetes/preinstall/tasks/0070-system-packages.yml:58
fatal: [srv4]: FAILED! => {
“attempts”: 4,
“changed”: false,
“invocation”: {
“module_args”: {
“allow_downgrade”: false,
“autoremove”: false,
“bugfix”: false,
“conf_file”: null,
“disable_excludes”: null,
“disable_gpg_check”: false,
“disable_plugin”: [],
“disablerepo”: [],
“download_dir”: null,
“download_only”: false,
“enable_plugin”: [],
“enablerepo”: [],
“exclude”: [],
“install_repoquery”: true,
“install_weak_deps”: true,
“installroot”: “/”,
“list”: null,
“lock_timeout”: 30,
“name”: [
“libselinux-python”,
“device-mapper-libs”,
“nss”,
“conntrack”,
“openssl”,
“curl”,
“rsync”,
“socat”,
“unzip”,
“e2fsprogs”,
“xfsprogs”,
“ebtables”,
“ipvsadm”,
“ipset”
],
“releasever”: null,
“security”: false,
“skip_broken”: false,
“state”: “latest”,
“update_cache”: false,
“update_only”: false,
“use_backend”: “auto”,
“validate_certs”: true
}
},
“msg”: “\n\n One of the configured repositories failed (Unknown),\n and yum doesn’t have enough cached data to continue. At this point the only\n safe thing yum can do is fail. There are a few ways to work “fix” this:\n\n 1. Contact the upstream for the repository and get them to fix the problem.\n\n 2. Reconfigure the baseurl/etc. for the repository, to point to a working\n upstream. This is most often useful if you are using a newer\n distribution release than is supported by the repository (and the\n packages for the previous distribution release still work).\n\n 3. Run the command with the repository temporarily disabled\n yum --disablerepo= …\n\n 4. Disable the repository permanently, so yum won’t use it by default. Yum\n will then just ignore the repository until you permanently enable it\n again or use --enablerepo for temporary usage:\n\n yum-config-manager --disable \n or\n subscription-manager repos --disable=\n\n 5. Configure the failing repository to be skipped, if it is unavailable.\n Note that yum will try to contact the repo. when it runs most commands,\n so will have to try and fail each time (and thus. yum will be be much\n slower). If it is a very temporary problem though, this is often a nice\n compromise:\n\n yum-config-manager --save --setopt=.skip_if_unavailable=true\n\nCannot find a valid baseurl for repo: base/7/x86_64\n”,
“rc”: 1,
“results”: []
}
PLAY RECAP *************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
srv3 : ok=75 changed=1 unreachable=0 failed=1 skipped=81 rescued=0 ignored=0
srv4 : ok=60 changed=1 unreachable=0 failed=1 skipped=69 rescued=0 ignored=0
srv5 : ok=58 changed=1 unreachable=0 failed=1 skipped=71 rescued=0 ignored=0

正在回答

1回答

看一下你的yum源是否正常,如果不正常,找找别的yum源

0 回复 有任何疑惑可以回复我~
  • 提问者 慕容7192790 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2021-05-05 12:38:12
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号