当前位置: 首页 > news >正文

ansible注意的和错误代码分析

一、需要注意的点

  • 分清楚这个是主控节点还是被控节点的操作,有的时候是一个文件从主控到被控节点,还是被控节点的文件到主控节点上面了

剧本执行报错代码

# 仔细看,报错的原因就是ansibel_lvm 未定义,写错了变量名TASK [research not exsist] *********************************************************************
fatal: [node1]: FAILED! => {"msg": "The conditional check 'ansible_hostname=='node1' and 'research' not in ansibel_lvm.vgs' failed. The error was: error while evaluating conditional (ansible_hostname=='node1' and 'research' not in ansibel_lvm.vgs): 'ansibel_lvm' is undefined. 'ansibel_lvm' is undefined\n\nThe error appears to be in '/home/devops/ansible/yml/lvs.yml': line 20, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n      when: \"ansible_hostname=='node1' and 'research' in ansible_lvm.vgs\"\n    - name: research not exist\n      ^ here\n"}
http://www.hskmm.com/?act=detail&tid=17399

相关文章:

  • 用 Rust 和 Tesseract OCR 识别验证码
  • 基于寄存器地址amp;标准外设库的LED流水灯
  • 用 Swift 和 Tesseract OCR 实现验证码识别
  • Rust 和 Tesseract OCR 实现验证码识别
  • AI-Powered-ToDo-List
  • Netty:完成RPC服务(实战)
  • Python 在 Web 开发中的应用与趋势
  • LLM MOE的进化之路
  • 相交链表-leetcode
  • AtCoder ARC114 总结 (A-C)
  • 告别单张保存!PPT 图片无损批量提取,这 3 种方法亲测有效!
  • ?模拟赛(2) 赛后总结
  • 日总结 8
  • 完整教程:讲一下ZooKeeper的持久化机制
  • 2025.9.25 sos dp小记
  • 英语_阅读_A farmer dream_待读
  • docker 私有仓库 harbor
  • vite+ts取别名@
  • 掌握C2重定向器:红蓝队攻防实战指南
  • 2025秋_3
  • day004
  • 软件测试团队准备解散了......
  • 2025秋_4
  • 【STM32H7】从零开始搭建的HAL库工程模板(基于CubeMX)
  • 重生之从零开始的神经网络算法学习之路 —— 第八篇 大型数据集与复杂模型的 GPU 训练实践
  • Avalonia:开发Android应用
  • MIT s6.828环境搭建
  • kubernetes事件监控工具--Kube-Event
  • 实用指南:【 GUI自动化测试】GUI自动化测试(一) 环境安装与测试
  • 喵喵大王の新日记