ansible - 这个“ansible -m ping all”是什么意思?
问题描述
ansible -m ping all
为什么我在尝试运行 Playbook 时会收到相同的警告和错误?(海星.yml)
所以,这意味着:我的剧本是对的吗?但重要的是不是。那是什么?请帮助...谢谢。
带着希望,普拉巴卡兰
以下是警告和错误:
/usr/lib/python2.7/site-packages/ansible/parsing/vault/__init_.py:44: CyptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography.exceptions import InvalidSignature
[WARNING]: * Failed to parse /etc/ansible/hosts with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: No JSON object could be decoded Syntax Error while loading YAML. expected '<document start>', but found '[' The error appears to be in '/etc/ansible/hosts': line 4, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: ] [starfish] ^ here
[WARNING]: * Failed to parse /etc/ansible/hosts with ini plugin: need more than 2 values to upack
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
解决方案
我认为您需要遵循此文档https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html来构建您的 ansible 库存。
推荐阅读
- excel - 如何使用标题进行列过滤,就像我们在 excel 中进行行过滤一样
- nlp - 使用依赖解析来预测自定义实体标签
- azure-devops - Azure Pipelines GitHub 包不起作用
- angular - 更新到 Angular 9 httpclient 和 rxjs 类型错误
- azure-log-analytics - Azure 日志分析和 Azure AD 登录日志
- php - 每晚自动上传文件+php
- javascript - insertRule() 没有插入规则但没有给出任何错误
- vba - 如何提取 word .docx 中的所有嵌入对象(多种类型)并将它们保存到文件夹中?
- javascript - discord.js 我如何在机器人不在的公会中获得成员?
- string - 为什么这个 Haskell 程序会产生反斜杠?